Deploying updated Docker images with Docker Compose (for non-production usage)

Updates for HCL Commerce production environments are delivered as Docker images. To update your production environment: download newer release images, and rebuild them as custom images to include your custom code. You then deploy the custom containers.

Before you begin

  • Ensure that your private Docker registry is updated with the latest Docker images.
  • Run the updatedb utility to update your database.
  • HCL Commerce Version 9.1.14.0 or laterBeginning in HCL Commerce 9.1.14.0, application container images are built to be run as a non-root user by default. This change has the potential to break your custom deployment. Therefore, you must review this change and its potential impacts. For more information, see HCL Commerce container users and privileges.
  • HCL Commerce Version 9.1.18.0 or laterExisting Solr 7.3 Search indexes are not compatible with the Solr 9.7 Query runtime container. If you are using Solr and planning to migrate to version 9.1.18.0, make sure to factor the reindexing time into your production cutover planning.
    Note: The 9.1.18 Commerce Solr-based Search upgrade is a significant update. By default, the 9.1.18 Commerce Solr-based Search solution is configured to work with the existing Solr 7.3 runtime provided in version 9.1.17. Upgrading to the 9.1.18 Solr-based Search Query container runtime is optional but recommended to take full advantage of the latest improvements. The 9.1.18 release will work with a 9.1.17 Solr-based Search Query container runtime. If you require this hybrid configuration and are using an Oracle database, open a case with HCL Customer Support to request patch HC-60507 to enable this configuration setup.

About this task

The process of deploying HCL Commerce with Docker Compose was updated in the 9.1.6.0 release.

Improvements include:

  • A simplified directory structure for mounted volumes.
    • For the ease of import of essential files into your Docker images, without the need to create or recreate custom images;
    • For persistence of HCL Commerce demo data, in the event that your containers are taken offline or restarted.
    • HCL Commerce Version 9.1.12.0 or laterAutomated deployment of Docker images for use within an HCL Commerce development environment.
    For more information on mounted volumes, see The Docker Compose deployment /volumes/ directory structure and contents.
  • Improved deployment automation. Simply update the required environment information and run a script to configure and deploy HCL Commerce and related applications. This eliminates the need to manual edit your deployment files, which can be error-prone.

    For more information on deployment configuration, see The Docker Compose deployment env.sh configuration file.

Due to these improvements, the following procedure varies between releases.

Procedure

  1. Clean up any preexisting deployment.
    1. Bring down any active deployment.

      HCL Commerce Version 9.1.6.0 or laterIf you are using a release of HCL Commerce 9.1.6.0, or greater, use the teardown script, teardown.sh, or the docker-compose down command.

      For more information, see the tear down script description within Deploying HCL Commerce Version 9.1.6.0 or greater with Docker Compose (for non-production usage).

      If you are using Docker Compose with a version of HCL Commerce before 9.1.6.0,
      docker-compose -f path_to_compose_yml stop
    2. Remove the old containers.
      For example, run one of the following commands.
      • If your database is running in a Docker container and the container is defined in your Docker Compose YML file, remove all containers except for the database container. If you remove the database container, then you lose your data.
        For example, for an authoring environment, with a a Solr-based search solution,
        docker-compose -f path_to_compose_yml rm redis txn web tooling-web search_master store
      • If your database is not running in a Docker container, then you can use the following command.
        docker-compose -f path_to_compose_yml rm
  2. Update your environment, and deploy the latest version of the HCL Commerce containers.
    • HCL Commerce Version 9.1.6.0 or laterIf you are using a version of HCL Commerce 9.1.6.0 or greater:

      Complete the procedure outlined within Deploying HCL Commerce Version 9.1.6.0 or greater with Docker Compose (for non-production usage).

    • If you are using a version of HCL Commerce prior to 9.1.6.0:
      1. Update the deployment with the newer Docker images.
        1. Open your existing Docker Compose YML files that you used to deploy your production environments.
        2. Update the image path in the YML file to point to the new Docker image.
          For example, for the Transaction server Docker image (ts-app), if you tagged the updated image as 9.0.0.1,
          Deploy with Docker Compose
          Example
          If you are pulling images from your organization's private Docker registry
          image: Private_Docker_registry/library/ts-app:9.0.0.1
          If you used docker load to load the Docker images locally
          image: commerce/ts-app:9.0.0.1
      2. Pull the new images and deploy the new containers.
        docker-compose -f path_to_compose_yml up -d
  3. Verify that the deployment is running updated containers.
    1. Run the following command.
      docker ps
      Ensure that the Docker container tags are the same as the tag that you defined in your deployment YML file.
    2. Enter each container and run the viewlabels command.
      For example,
      docker exec -it container_name bash
      /SETUP/bin/viewlabels
      Ensure that all container labels have the same date stamp.
  4. Build your search index on the updated environment.

Results

Changes to the default containers provided by HCL for HCL Commerce are now applied to your custom containers, and your production environments are updated.