ChemLocator how to

    Upgrade

    To update ChemLocator to a newer version first download the required tarball files from ChemLocator product page and compare the changes in the configuration files to the version you have installed or consult our changelog and check if changes were made to the configuration files.

    • Navigate to the folder where the configuration files were unpacked during the initial installation of the product (e.g. /usr/share/chemaxon/chemlocator)
    • Apply the changes to the configuration files
    • Edit .env file and change the value for _CLVERSION to the new version
    • Login to hub.chemaxon.com
      docker login hub.chemaxon.com
    • Pull the new images
      docker-compose pull
    • Stop and start the Docker containers:
      docker-compose stop
      docker-compose start

    An in-depth guide can be found here.

    Upgrade Docker JPC

    To update Docker JChem PostgreSQL Cartridge we will be performing a backup of data, removal of container and data, upgrade image and then restore the backup.

    Step 1 - Backup database

    To backup the database you can use pg_dump or pg_dumpall depending on the configuration.

    Example for pg_dump:

    pg_dump -Fc --encoding=UTF-8 --dbname=postgresql://postgres:postgres@localhost:5432/chemlocator > chemlocator_psql.back

    Replace connection string parameter (database name, server address, port, username and passwors) as configured in your installation.

    Step 2 - Container and data removal

    For example, if you are running all services on one server you can run the following command after navigating to the folder where the configuration files were unpacked during the initial installation of the product (e.g. /usr/share/chemaxon/chemlocator).

    To remove the container stop ChemLocator application and related services by running the follwoing command:

    docker-compose stop

    Next copy the container identifier for jpc service by running docker ps -a.

    To remove the jpc container the follwing command must be run:

    docker container remove <CONTAINER ID>

    Now, the volumes of the container need to be removed. These containers are definded in docker-compose.yml file under jpc service in volumes section and are as follows:

    • postgres_config
    • postgres_data
    • postgres_log
    • jpc_config
    • jpc_data
    • jpc_log

    List the volumes present in Docker by running the following command:

    docker volume list

    If the location of the configuration file is the default one (/usr/share/chemaxon/chemlocator) then the names of the volumes that need to be removed should be:

    • chemlocator_postgres_config
    • chemlocator_postgres_data
    • chemlocator_postgres_log
    • chemlocator_jpc_config
    • chemlocator_jpc_data
    • chemlocator_jpc_log

    To remove the volumes related to jpc service the following command needs to be run:

    docker volume rm chemlocator_postgres_config chemlocator_postgres_data chemlocator_postgres_log chemlocator_jpc_config chemlocator_jpc_data chemlocator_jpc_log

    {info} NOTE: Replace chemlocator_ to the correct prefix

    Step 3 - Download the new version

    After the volumes are removed edit .env file and change JPC_VERSION variable value to 21.9.0.r13210 and run the following command:

    docker-compose pull

    After the download finishes we need to start the jpc service alone. In order to do that run the following command:

    docker-compose up -d jpc

    Step 4 - Restore the data

    After the container starts we need to restore the data. In order to do this we will run pg_restore command:

    pg_restore -v -d chemlocator --dbname=postgresql://postgres:postgres@localhost:5432/chemlocator chemlocator_psql.back

    {info} NOTE: Replace the connection info in --dbname argument with the correct values (they can be found in your .env file).

    Step 5 - Start the rest of the services

    The final step is to start the other service defined in the docker-compose.yml file:

    docker-compose up -d

    Upgrade JPC

    If JPC is hosted directly on a bare-metal machine or virtual machine, please refer to JChem PostgreSQL Cartdrige upgrade documentation.

    {info} NOTE: JChem PostgreSQL Cartridge version support:

    • ChemLocator versions until 3.3.11.20 support JChem PostgreSQL Cartridge version 20.15.0.r12003
    • ChemLocator versions starting with 3.3.11.20 support JChem PostgreSQL Cartridge version 21.9.0.r13210

    {warning} NOTE: Backup the data before any upgrade attempt.

    Change license

    When the license expires the new license must be made available to ChemLocator. For this to happen we need to copy the license file to the configured location and restart ChemLocator images and JPC.

    1. To find the configured location, check the docker-compose.yml file in the folder where the configuration files were created/unpacked during the installation process (e.g. /usr/share/chemaxon/chemlocator).

      There you will be able to locate ${CL_PATH}/license.cxl:/app/license.cxl setting that specifies the path of the file where ChemLocator will look for the file. CL_PATH is defined in .env file, but if not configured differently than written in our installtion and configuration guides, the path is the same as to the one where docker-compose.yml and .env files are located. Copy the new license file over the old one found at the path specified in variable CL_PATH (keep the old license file name).

    2. If JPC is hosted in Docker skip to the next step, otherwise refer to the official documentation on how to configure license in Install your license file section and after copying the license file restart JPC serivce.

    3. In order for the license files to be loaded a restart of ChemLocator service must be performed by stopping and then starting ChemLocator containers:

      • navigate to the folder where the configuration files were created/unpacked during the installation process
      • docker-compose stop
      • docker-compose start