Deploying HCL Commerce Version 9.1 with Elasticsearch-based search and an IBM Db2 database using Docker Compose

The following steps highlight a basic production deployment of HCL Commerce Version 9.1 with Docker Compose. This deployment is configured to deploy HCL Commerce Version 9.1 authoring and live environments with the Elasticsearch-based search solution, and utilizes two instances of the IBM Db2 Database.

Before you begin

Procedure

  1. Deploy the Elasticsearch-based Search solution containers.
    1. Copy the contents of the provided docker-compose-elasticsearch-data-db2-template.yml Docker Compose file into your custom docker-compose.yml Docker Compose file.
    2. Update the file to reflect the environment that you want to deploy.
      1. Accept the LICENSE required for all Docker containers. For example, - LICENSE=accept.
      2. Update the image tag for all HCL Commerce Docker containers. For example, image: ts-app:9.1.
      3. Update the following configuration parameters for the Nifi container.
        Parameter name Description
        AUTH_JDBC_URL The auth database JDBC URL.
        AUTH_JDBC_DRIVER_CLASSNAME The auth database JDBC driver class name.
        AUTH_JDBC_DRIVER_LOCATION The auth database driver location on Nifi.
        AUTH_JDBC_USER_NAME The auth JDBC database user name.
        AUTH_JDBC_USER_PASSWORD The auth JDBC database user password.
        LIVE_JDBC_URL The live database JDBC URL.
        LIVE_JDBC_DRIVER_LOCATION The live database driver location on Nifi.
        LIVE_JDBC_USER_NAME The live JDBC database user name.
        LIVE_JDBC_USER_PASSWORD The live JDBC database user password.
        NLP_ENABLE_LANGUAGE_CODE The language code for the Natural Language Processing (NLP) feature.
        For example,
        AUTH_JDBC_URL: "jdbc:db2://authdb.hclcommerce.com:50000/mall"
        AUTH_JDBC_DRIVER_CLASSNAME: "com.ibm.db2.jcc.DB2Driver"
        AUTH_JDBC_DRIVER_LOCATION: "/opt/nifi/nifi-current/lib/db2jcc4.jar" 
        AUTH_JDBC_USER_NAME: "wcs" 
        AUTH_JDBC_USER_PASSWORD: "wcs1" 
           
        LIVE_JDBC_URL: "jdbc:db2://livedb.hclcommerce.com:50000/mall" 
        LIVE_JDBC_DRIVER_LOCATION: "/opt/nifi/nifi-current/lib/db2jcc4.jar" 
        LIVE_JDBC_USER_NAME: "wcs" 
        LIVE_JDBC_USER_PASSWORD: "wcs1"
        NLP_ENABLE_LANGUAGE_CODE: "EN"
         
    3. In the same directory where your docker-compose.yml Docker Compose file is located, ensure that the following sub-directories are present, and their permissions are set to 777.
      • nifiLogs
      • HCL Commerce Version 9.1.1.0 or laterelasticsearch/data
      • HCL Commerce Version 9.1.1.0 or laterelasticsearch/config
      • HCL Commerce Version 9.1.1.0 or laterzookeeper
      • HCL Commerce Version 9.1.1.0 or laternifi/data
      • HCL Commerce Version 9.1.2.0 or laterredis/data
    4. HCL Commerce Version 9.1.2.0 or laterCopy the hcl-cache-search folder to the location where the Docker Compose file (docker-compose.yml) is located.
    5. Start the authoring environment Elasticsearch-based Search solution containers.
      Run docker-compose up -d.
    6. Verify that all of the Docker containers are up and healthy.
      Run docker-compose ps.
  2. Deploy the HCL Commerce authoring environment applications.
    1. Copy the contents of the provided docker-compose-elasticsearch-commerce-db2-template.yml Docker Compose file into your custom docker-compose.yml Docker Compose file.
    2. Update the file to reflect the environment that you want to deploy.
      1. Accept the LICENSE required for all Docker containers. For example, - LICENSE=accept.
      2. Update the image tag for all HCL Commerce Docker containers. For example, image: ts-app:9.1.
      3. Set the ENVTYPE for the Transaction and Query containers to auth. For example, - ENVTYPE=auth.
      4. Update the following configuration parameters for the Transaction container.
        Parameter name Description
        SPIUSER_NAME Your SPIUSER name. The default value is spiuser.
        SPIUSER_PWD The encrypted password for the spiuser. For more information, see Setting the spiuser password in your Docker images
        JWKS The HCL Commerce Tooling Single Page Application (SPA) uses JSON Web Tokens (JWT) for API authentication. Update this value to set the JSON Web Key Set (JWKS) and key ID in the Transaction server in order to sign and validate JWT. The JWKS can be generated by the generateJWKS utility.
        JWKS_KEYID The Key ID of the JWKS, the default value is k1.
        TOOLING_BASE_URL This value is used by Management Center to load the Tooling SPA from the Tooling Web Server.
        ELASTICSEARCH_ENABLED Specify the environment is using Elasticsearch.
        SEARCH_HOST The Data-query hostname. The default value is data-query.
        INGEST_HOST The Ingest service hostname. The default value is ingest.
        ELASTICSEARCH_HOST The Elasticsearch server hostname. The default value is elasticsearch.
        STOREWEB_HOST The Store web server hostname.
        Note: If you have multiple stores running on multiple domains, you can configure your domains to redirect to STOREWEB_HOST to ensure that preview works for all stores.
        REACT_STORE_HOST The hostname for the React-based store. This is only required when Elasticsearch is enabled.
        DBHOST The database hostname.
        DBNAME The name of the database.
        DBUSER The database user name.
        DBPASS The database user password.
        DBPORT The database port.
        DBAUSER The database administrator.
        DBAPASSENCRYPT The database administrator password that is encrypted with the wcs_encrypt.sh utility.
        DBPASSENCRYPT The database user password that is encrypted with the wcs_encrypt.sh utility.
        For example,
        
        - adminPassword=passw0rd 
        - SPIUSER_NAME=spiuser 
        - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk= 
           
        - DBHOST=authdb.hclcommerce.com   
        - DBNAME=mall   
        - DBUSER=wcs  
        - DBPASS=wcs1  
        - DBPORT=50000  
        - DBTYPE=db2  
        - DBAUSER=db2inst1  
        - DBAPASSENCRYPT=u5fOjsJvd7QYYs29qTnqx418LVytXLHxhEu1Pg5IrzQ=  
        - DBPASSENCRYPT=WVRDsn+rEpaSbm59Iw/yoYsNnH1U2ovg52j5nzdW1L0=   
        
        - JWKS={base64}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTFWU3NsS1dHRnAybmlpdUdzR293Qk5zR1hLWGU0SDI4cWlMZmdIMWVGdWVmdl81cEZOSUlKYlVSUjBkVWtPWGlxTDRrNTBxQ1Nmemo4S0ROTmsyYV9KakdobTZ6dFNPTnBtSDdzSWZJX2o3YlF4WWNzaVN4cklSWnBSOGdNem5TNmV2VXJmMWZZVWpVbEszd2RoMi1vc2t6NTVGR1A4YXdCRnlQTEhWbmo5S1VtaU1zdHR2eTg1VW9COTBuT3d5U0Q5UHl3clF3el9pMlIzcUVIYWJSQ0FVOGY4MnRKTE9HeWxr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VZWEx2ZkE2dVVqWllWaHNSVSIsImRwIjoiTFlRVWItSVA0M09Dc3g3SmVRZ3pUdE5ZZ3c0dnJzR01fVDh5Y3BVR25DQ0pDVTBDUW9VaTRpeWlNcXh6SFZXZUdGYzNjSWlVOFc5QnJpbFhzbVVuWVNudW9rSVhNeTJRSTl5eDZLQ1NFMk9GWUdNcXlqYzRDN2JaZV82QUhRaGJzelNaYWJrUjJBaFExNnI2WlRXbGN0bnNsMjQ0b1dzM3FVSjczZWRVUS1rIiwiZHEiOiJlYWF1TDkyNGVoXzJITWUxd1NDNk9rU1dlRjVBS1cxRjA5cXdxXzdqeDBwUjlMOUdFeWdld2xrTVBQRTROS19aOXRpOGo5cFpaN1R2YlpoU09tMDM0eU04aVpBTV9qbjZ0ZHJPSWl4bkhId1N2TXUzUElMVmlKeloxUnJaV0RmWmpIX2FUcVhpbzZONDhETUdYam8tQ3lUQW1BekNxM3lGNlROR1Z5b1MyVkUiLCJxaSI6IllUWFI4QjVRUE1jbzIzelo2Wi1jLTFhSVJuOF9BRWk5TGplZ2xEaVJ0T2E4dHpPZUdQeU9mX0h4WnpzMFItaVdpMWFET1dWR2tDd1pLdG5Uc2lMdFBQRUdSVzFRNXZlVHdZdjVlWHozR2F2VTBzS2RLQzBJSkpJaWdNa053UFIxLU5hLTRBVHprQ0pqbGd3QVFHZ0FySTR5Vk1TR2RGYXpCRm9FdjM3OTFkWSJ9XX0= 
        - JWKS_KEYID=k1  
        
        - TOOLING_BASE_URL=https://auth.hclcommerce.com:7443/tooling 
        
        - ELASTICSEARCH_ENABLED=true 
        - SEARCH_HOST=elasticsearch.hclcommerce.com 
        - INGEST_HOST=elasticsearch.hclcommerce.com 
        - ELASTICSEARCH_HOST=elasticsearch.hclcommerce.com 
        
        - REACT_STORE_HOST=auth.hclcommerce.com 
        - STOREWEB_HOST=auth.hclcommerce.com 
         
      5. Update the following configuration parameters for the Query container.
        Parameter name Description
        ELASTICSEARCH_HOST The Elasticsearch container host name. The default value is elasticsearch.
        ZOOKEEPER_HOST The Zookeeper container host name. The default value is zookeeper.
        NLP_ENABLE_LANGUAGE_CODE The language code for the Natural Language Processing (NLP) feature.
        For example,
        - ELASTICSEARCH_HOST=elasticsearch.hclcommerce.com
        - ZOOKEEPER_HOST=elasticsearch.hclcommerce.com
        - NLP_ENABLE_LANGUAGE_CODE=EN
    3. HCL Commerce Version 9.1.2.0 or laterCopy the hcl-cache-commerce folder to the location where the Docker Compose file (docker-compose.yml) is located.
    4. HCL Commerce Version 9.1.2.0 or laterUpdate the Redis server address in the Redis configuration file (redis_cfg.yaml) located within the hcl-cache-commerce directory.
      address: "redis://searchHost:6379"

      For example,

      address: "redis://elasticsearch.hclcommerce.com:6379"
    5. Start the HCL Commerce authoring environment.
      Run docker-compose up -d.
    6. Verify that all of the Docker containers are up and healthy.
      Run docker-compose ps.
  3. Deploy the HCL Commerce live environment applications.
    1. Copy the contents of the provided docker-compose-elasticsearch-commerce-db2-template.yml Docker Compose file into your custom docker-compose.yml Docker Compose file.
    2. Update the file to reflect the environment that you want to deploy.
      1. Accept the LICENSE required for all Docker containers. For example, - LICENSE=accept.
      2. Update the image level for all HCL Commerce Docker containers. For example, image: ts-app:9.1.
      3. Set the ENVTYPE for the Transaction and Query containers to live. For example, - ENVTYPE=live.
      4. Update the following configuration parameters for the Transaction server Docker container.
        Parameter name Description
        SPIUSER_NAME Your SPIUSER name. The default value is spiuser.
        SPIUSER_PWD The encrypted password for the spiuser. For more information, see Setting the spiuser password in your Docker images
        JWKS The HCL Commerce Tooling Single Page Application (SPA) uses JSON Web Tokens (JWT) for API authentication. Update this value to set the JSON Web Key Set (JWKS) and key ID in the Transaction server in order to sign and validate JWT. The JWKS can be generated by the generateJWKS utility.
        JWKS_KEYID The Key ID of the JWKS, the default value is k1.
        TOOLING_BASE_URL This value is used by Management Center to load the Tooling SPA from the Tooling Web Server.
        ELASTICSEARCH_ENABLED Specify the environment is using Elasticsearch.
        SEARCH_HOST The Data-query hostname. The default value is data-query.
        INGEST_HOST The Ingest service hostname. The default value is ingest.
        ELASTICSEARCH_HOST The Elasticsearch server hostname. The default value is elasticsearch.
        STOREWEB_HOST The Store web server hostname.
        Note: If you have multiple stores running on multiple domains, you can configure your domains to redirect to STOREWEB_HOST to ensure that preview works for all stores.
        REACT_STORE_HOST The hostname for the React-based store. This is only required when Elasticsearch is enabled.
        DBHOST The database hostname.
        DBNAME The name of the database.
        DBUSER The database user name.
        DBPASS The database user password.
        DBPORT The database port.
        DBAUSER The database administrator.
        DBAPASSENCRYPT The database administrator password that is encrypted with the wcs_encrypt.sh utility.
        DBPASSENCRYPT The database user password that is encrypted with the wcs_encrypt.sh utility.
        For example,
        - adminPassword=passw0rd  
        - SPIUSER_NAME=spiuser 
        - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk= 
           
        - DBHOST=livedb.hclcommerce.com 
        - DBNAME=mall  
        - DBUSER=wcs 
        - DBPASS=wcs1 
        - DBPORT=50000 
        - DBTYPE=db2 
        - DBAUSER=db2inst1 
        - DBAPASSENCRYPT=u5fOjsJvd7QYYs29qTnqx418LVytXLHxhEu1Pg5IrzQ= 
        - DBPASSENCRYPT=WVRDsn+rEpaSbm59Iw/yoYsNnH1U2ovg52j5nzdW1L0= 
           
        - JWKS={base64}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTFWU3NsS1dHRnAybmlpdUdzR293Qk5zR1hLWGU0SDI4cWlMZmdIMWVGdWVmdl81cEZOSUlKYlVSUjBkVWtPWGlxTDRrNTBxQ1Nmemo4S0ROTmsyYV9KakdobTZ6dFNPTnBtSDdzSWZJX2o3YlF4WWNzaVN4cklSWnBSOGdNem5TNmV2VXJmMWZZVWpVbEszd2RoMi1vc2t6NTVGR1A4YXdCRnlQTEhWbmo5S1VtaU1zdHR2eTg1VW9COTBuT3d5U0Q5UHl3clF3el9pMlIzcUVIYWJSQ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UhNcEdSZGc4UVRCc01mRTVZWEx2ZkE2dVVqWllWaHNSVSIsImRwIjoiTFlRVWItSVA0M09Dc3g3SmVRZ3pUdE5ZZ3c0dnJzR01fVDh5Y3BVR25DQ0pDVTBDUW9VaTRpeWlNcXh6SFZXZUdGYzNjSWlVOFc5QnJpbFhzbVVuWVNudW9rSVhNeTJRSTl5eDZLQ1NFMk9GWUdNcXlqYzRDN2JaZV82QUhRaGJzelNaYWJrUjJBaFExNnI2WlRXbGN0bnNsMjQ0b1dzM3FVSjczZWRVUS1rIiwiZHEiOiJlYWF1TDkyNGVoXzJITWUxd1NDNk9rU1dlRjVBS1cxRjA5cXdxXzdqeDBwUjlMOUdFeWdld2xrTVBQRTROS19aOXRpOGo5cFpaN1R2YlpoU09tMDM0eU04aVpBTV9qbjZ0ZHJPSWl4bkhId1N2TXUzUElMVmlKeloxUnJaV0RmWmpIX2FUcVhpbzZONDhETUdYam8tQ3lUQW1BekNxM3lGNlROR1Z5b1MyVkUiLCJxaSI6IllUWFI4QjVRUE1jbzIzelo2Wi1jLTFhSVJuOF9BRWk5TGplZ2xEaVJ0T2E4dHpPZUdQeU9mX0h4WnpzMFItaVdpMWFET1dWR2tDd1pLdG5Uc2lMdFBQRUdSVzFRNXZlVHdZdjVlWHozR2F2VTBzS2RLQzBJSkpJaWdNa053UFIxLU5hLTRBVHprQ0pqbGd3QVFHZ0FySTR5Vk1TR2RGYXpCRm9FdjM3OTFkWSJ9XX0= 
        - JWKS_KEYID=k1 
           
        - TOOLING_BASE_URL=https://live.hclcommerce.com:7443/tooling 
           
        - ELASTICSEARCH_ENABLED=true 
        - SEARCH_HOST=elasticsearch.hclcommerce.com 
        - INGEST_HOST=elasticsearch.hclcommerce.com 
        - ELASTICSEARCH_HOST=elasticsearch.hclcommerce.com 
        
        - REACT_STORE_HOST=live.hclcommerce.com 
        - STOREWEB_HOST=live.hclcommerce.com 
         
      5. Update the following configuration parameters for the Query container.
        Parameter name Description
        ELASTICSEARCH_HOST The Elasticsearch container host name. The default value is elasticsearch.
        ZOOKEEPER_HOST The Zookeeper container host name. The default value is zookeeper.
        NLP_ENABLE_LANGUAGE_CODE The language code for the Natural Language Processing (NLP) feature.
        For example,
        - ELASTICSEARCH_HOST=elasticsearch.hclcommerce.com
        - ZOOKEEPER_HOST=elasticsearch.hclcommerce.com
        - NLP_ENABLE_LANGUAGE_CODE=EN
    3. HCL Commerce Version 9.1.2.0 or laterIf it is not already present, copy the hcl-cache-commerce folder to the location where the Docker Compose file (docker-compose.yml) is located.
    4. HCL Commerce Version 9.1.2.0 or laterIf it is not already present, update the Redis server address in the Redis configuration file (redis_cfg.yaml) located within the hcl-cache-commerce directory.
      address: "redis://searchHost:6379"

      For example,

      address: "redis://elasticsearch.hclcommerce.com:6379"
    5. Start the HCL Commerce live environment.
      Run docker-compose up -d.
    6. Verify that all of the Docker containers are up and healthy.
      Run docker-compose ps.

Results

Your production environment is now running via the Docker Compose deployment method.

What to do next

  1. Create your connectors, and build your Search index. For information on creating your connectors and building your Search index, see Building the Elasticsearch index.
  2. Access your new environment tools:
    • Management Center for HCL Commerce: https://commerceHost:8000/lobtools
    • The Emerald B2C reference store: https://commerceHost:6443/Emerald
    • The Sapphire B2B reference store: https://commerceHost:6443/Sapphire
    • The Aurora B2C starter store: https://commerceHost:8443/wcs/shop/en/auroraesite
    • The Aurora B2B starter store: https://commerceHost:8443/wcs/shop/en/aurorab2besite
    • The Query Service Swagger UI: https://searchhost:30921/search/resources/swagger-ui.html#/
    • The Ingest Service Swagger UI: https://searchHost:30801/swagger-ui.html#/
    • Nifi: http://searchHost:30600/nifi
    • Nifi Registry: http://searchHost:30400/nifi-registry