Upgrading a Node.js server

If you are using a NodeJS server that shipped with Rational Team Concert, you can upgrade the server.

About this task

The following steps assume that the Node.js server is running on a Linux system.

Procedure

  1. Shut down the Node.js server. For more information, see Shutting down a Node.js server.
  2. Rename the directory where the previous server was running. For example, rename /rtc-git-server-toolkit to /rtc-git-server-toolkit-old.
  3. Download a Rational Team Concert™ Node.js server from the download page. The Rational Team Concert Git Integration toolkit is packaged as a compressed file named Git-Server-Toolkit-release.zip. Extract the package into a local directory, such as /rtc-git-server-toolkit/.
  4. Copy the config.json file from the /rtc-git-server-toolkit-old/server directory to the /rtc-git-server-toolkit/ server directory.
  5. To install dependencies, from the command line, browse to the /rtc-git-server-toolkit/server directory and run npm install -–production.
    Note: If you can access the server only through a proxy, run the following commands to configure the proxy and rerun the npm install -–production command.

    npm config set proxy http://"username:password"@proxy:port
    npm config set https-proxy http://"username:password"@proxy:port

    Alternatively, you can also set the HTTP_PROXY and HTTPS_PROXY environment variables to the same values, and try again.

    Note: If you cannot access the internet through a proxy, you can also download the modules into a node_modules directory within your working directory (the directory is created if it does not exist). After all the dependencies are downloaded, copy the dependency modules into the /rtc-git-server-toolkit/server/node_modules directory on the Git server by using a copy utility such as scp.
  6. To enable logging for the Node.js server, set the environment variable RTC_GIT_SERVER_TRACE_LEVEL to one of the following a trace level values:
    Value Trace level
    1 Error
    2 Warning
    3 Informational
    4 Verbose
  7. To start the server, browse to the /rtc-git-server-toolkit/server directory and run the following command: nohup node main.js &. The trace log is generated onto the standard output. To redirect the log to a file, run the following command: nohup node main.js > server.log &. When the server starts, the config file is automatically upgraded to correspond to the new format.
    Note: It is better to use nohup to run the server, even after you close the terminal window.
    Optional: Alternatively, you can start the server by running startServer.sh or startServer.bat. The logs are stored in rtc-git-server-toolkit/server/logs/server.log. To run startServer.sh or startServer.bat, you must meet the following requirements:
    • On Windows: You have permission to create and delete folders within the rtc-git-server-toolkit\server folder.
    • On Linux: You have permission to create and delete files and folders within rtc-git-server-toolkit/server folder. The kernel version should be 2.6.12 or greater and must support emulation if the server folder is stored in an NFS file system.

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki