Register a QM Development Environment with a Remote JTS - quality-manager/onboarding GitHub Wiki

Before You Begin

  • Some of the below steps may cause pop-up windows. If your browser blocks them, these steps could fail. Keep an eye out for any blocked pop-up windows.

Re-Initialize Your QM Repository

Your QM repository is almost certainly configured to use "localhost" as the host name for your QM Server. This is not going to work when we are dealing with a remote JTS. We have to tweak the QM Initialize launcher to set the host name to something that the remote JTS can recognize. Here we'll use your machine's public IP address.

  1. Open the QM Initialize launcher (Run -> Run Configurations -> QM Initialize 4.0)
  2. Set com.ibm.team.repository.server.webapp.url to https://your.ip.address:9443/jazz
  3. Run QM Initialize 4.0

Configure/Launch the QM Server

We can't launch the QM Server in exactly the same way that we normally would either. We need to run it in APPLICATION mode rather than STANDALONE mode and we need to again specify the web app's URL like we did in the previous section. We'll also want to configure a teamserver.properties file separate from our usual one as some changes will be persisted to it which are unique to this configuration.

  1. Open the QM server launch file (Debug -> Debug Configurations -> RQM-sample)
  2. Set com.ibm.team.repository.server.mode to APPLICATION
  3. Set com.ibm.team.repository.server.webapp.url to https://your.ip.address:9443/jazz
  4. Set com.ibm.team.server.configURL.preserveTSP to true
  5. Set com.ibm.team.server.configURL to the location of your preferred teamserver.properties file (e.g. file:///${workspace_loc}/Config/teamserver.properties)
  6. Launch the QM Server

Register Your Dev Environment w/ the Remote JTS

Since we are running our dev environment's instance of QM as APPLICATION rather than STANDALONE, it won't function correctly until you connect it to a JTS. To do that, follow these steps.

  1. Navigate to the remote JTS's admin page (e.g. https://remoteserver:9443/jts/admin)
  2. Click "Manage Server"
  3. Click "Registered Applications"
  4. Click "Add..."
  5. Set "discovery URL" to https://your.ip.address:9443/jazz/scr
  6. Set "Name" to any name not taken (e.g. /qm_my_dev)
  7. Set "Consumer Secret" to any string

Finish setup on local server

  1. Login to your local dev environment as the project area admin for the remote server (likely qmadmin, default password is password)
  2. go to https://your.ip.address:9443/jazz/admin
  3. Manage the project area
  4. Add qmadmin as a member and admin
  5. Enable to project for configuration management (If you're trying to connect to a GC)

At this point, your server can communicate with the JTS server

Setup connection to GC

  1. enable your local project for configuration management
    • Within Project administrations -> Configuration Management click 'Enable Configuration Management'
  2. on the remote server create a new Global Configuration Project if it does not exist
  3. Go to browse components and create a new component
  4. Click on the stream in the new component. Then click on Add Configuration and add your dev environment project as well as any other projects like RM or CCM with which you need to integrate
    • 'The server is not responding' - if you see this message, you probably need to enable popups to authenticate

You should now be able to pick the GC from you local QM project

Troubleshooting

  • Check for disabled pop-ups, this can prevent authentication
  • 403 errors could be the result of old data in your browsers cookie for you dev environment hostname. Delete all cookies in your browser with your local host name and this may resolve the issue.
  • If you make a mistake and nothing seems to work, you may need to unregister your local machine from the JTS. Then you will also want to delete your local friend connection to the JTS. Then register again with the JTS to let it recreate your friend connection. If you have to unregister and register again, you might have problems with userid's having permissions. In that case you may need to login as ADMIN and create a new userid and give it the required permissions. It is also possible you may need to restart your local server after you unregister the JTS before you proceed to register again.
  • If the GC application hangs on trying to 'add configuration' it could be due to problem connecting to a server listed in the hosts file. With multiple developers sharing the same server and editing the host file, some developer machines may not always be available. You may need to comment out some developers host machines in the host file while you setup your GC configuration.
  • Sometimes you may enter a situation where you entered wrong password and can not logout.
    • Go to this URL to logout - (your root context)/service/com.ibm.team.repository.service.internal.ILogoutRestService
  • Note, if you later switch back to using local JTS for your dev environment, you may run into issues until you remove the JTS entry from your teamserver.properties. This is currently known to cause some OSLC jUnits to fail
  • If you get errors about services not be activated, it could be that registering failed to set the consumer key. You may see a message in QM log about bad JTS consumer key.
  • Login to QM as ADMIN/ADMIN. Remove the JTS Friends link from QM. Then remove QM as a registered application on JTS and then re-register QM again.

References