Upgrading HCL Compass RESTful server API instance in the HCL Compass Docker container

To update the HCL Compass RESTful server APIs with the latest version, you must have the HCL Compass RESTful server APIs zip file. This quick start guide shows you how to update or patch the HCL Compass RESTful server APIs in the HCL Compass Docker container.

Before you begin

Note: Using HCL Compass on Docker and Docker Compose is not supported when deployed in a production environment. To use HCL Compass in a container in a production environment, deploy HCL Compass to a Kubernetes environment.

For more information, see Deploying HCL Compass on SoFy Sandbox.

Before you can upgrade the HCL Compass RESTful server APIs, you must first:

Procedure

  1. Use the docker volume command to find the mountpoint of the you created and attached to the hcl-compass container.
     $ docker volume ls                             # List the volumes
     $ docker volume inspect [volune_name]          # To get volume Mountpoint folder location
  2. Copy the new HCL Compass RESTful server APIs zip file into the volume mountpoint folder.
    $ cp compass-rest-server-distribution-[version_number].zip /var/lib/docker/volumes/[volune_name]/_data/.
  3. Start a bash shell in a Docker container and execute the docker exec command.
    $ docker exec -it [container_name] /bin/bash
  4. Optionally, backup the logs folder and the data folder in the /compass-rest-server-distribution folder.
    cp -r /opt/hcl/compass/compass-rest-server-distribution/data/tmp/.
    cp -r /opt/hcl/compass/compass-rest-server-distribution/logs/tmp/.
  5. Move into the mounted volume folder (/opt/hcl/compass/compass-rest-server-distribution/logs) inside the container and unzip the RESTful server APIs zip file into the /opt/hcl/compass directory. Set the access permission to folders and files under the compass-rest-server-distribution folder.
    $ unzip -o compass-rest-server-distribution--[version_number].zip  -d /opt/hcl/compass
    $ chmod -R 777 /opt/hcl/compass/compass-rest-server-distribution/*
  6. Stop the HCL Compass RESTful server APIs instance.
    $ cd /opt/hcl/compass/compass-rest-server-distribution/bin
    $ PIDs=$(pgrep -a java | grep Dlogging.config | awk '{ print $1; }')
    $ for val in $PIDs; do echo $val;  kill -9 $val; done
  7. Start the HCL Compass RESTful server APIs instance.
    $ cd /opt/hcl/compass/compass-rest-server-distribution/bin        
    $ export  TZ="EST"
    $ source /opt/hcl/compass/cq_setup.sh
    $ nohup ./start.sh &   
  8. Ensure that the HCL Compass RESTful server APIs instance version has been updated.
    Enter http://localhost:8190/ in a browser to start HCL Compass. Login and click Help > About at the top right corner of the User Interface to see if the version has been updated.