Deploying Apache Solr using DB2 in a runtime environment

Use these instructions to deploy your HCL Commerce search system in a runtime environment using Apache Solr as your search engine and Db2 as your database.

Before you begin

To start the deployment process, download the required software.
  1. Review the list of the latest available download packages to ensure that you are obtaining the most up-to-date version of HCL Commerce software.
  2. Go to the .
  3. Search for Package ID HCL_Commerce_Devops_Version_9.1, or File ID HCL_Commerce_DevOps_9.1.x.x.bundle.
  4. Download the file.
  5. Download the Data Docker images.
    • HCL_Commerce_Enterprise_9.1.x.x_Data_Query_Server_x86-64.tgz
    • HCL_Commerce_Enterprise_9.1.x.x_Data_NiFi_Server_x86-64.tgz
    • HCL_Commerce_Enterprise_9.1.x.x_Data_NiFi_Registry_Server_x86-64.tgz
    • HCL_Commerce_Enterprise_9.1.x.x_Data_Ingest_Server_x86-64.tgz
    • Optional:HCL_Commerce_Enterprise_9.1.x.x_Approval_Server_x86-64.tgz
    • Optional:HCL_Commerce_Enterprise_9.1.x.x_GraphQL_Server_x86-64.tgz
    Load each Docker image. For each downloaded image file, run the following command.
    docker load -i imagename

    For example:

    docker load -i HCL_Commerce_Enterprise_9.1.0.0_Data_Query_Server_x86-64.tgz
  6. Clone the project in Git from the downloaded git bundle, and check the code into your source control management system. Run the following command.
    git clone bundleName projectName
    Where:
    bundleName
    The filename of the bundle you are cloning.
    projectName
    The name of the git project that you are creating.
    For example:
    git clone HCL_Commerce_DevOps_9.1.0.0.bundle HCL_Commerce_DevOps

Deploy the Commerce Authoring environment with Solr search using DB2

This process enables Apache Solr within the following environment. Each component of the the environment runs in its own Docker container or containers.

  1. Setup the Authoring database.

    Using an IBM Db2 database

  2. Deploy HCL Commerce auth environment with solr search.
    1. From the docker-compose folder, copy the file docker-compose-solr-commerce-db2-auth-template.yml to docker-compose.yml
    2. Update the image level for all docker container, for example: image: ts-app:9.1
    3. Accept LICENSE for all docker container, for example: - LICENSE=accept
    4. Update the following configuration for txn container. SPIUSER_PWD, DBAPASSENCRYPT and DBPASSENCRYPT are encrypted with wcs_encrypt. JWKS can be generated by generateJWKS utility, see utilities for details.
       - adminPassword=<admin password>
        - SPIUSER_NAME=<spiUserName>
        - SPIUSER_PWD=<encryptedSpiUserPassword>
        - DBHOST=<dbHOST> 
        - DBNAME=<dbName>
        - DBUSER=<dbUser> 
        - DBPASS=<dbPassword>
        - DBPORT=<dbPort>
        - DBTYPE=db2
        - DBAUSER=<dbaUser>
        - DBAPASSENCRYPT=<encryptedDbaUserPassword>
        - DBPASSENCRYPT=<encryptedDbUserPassword>
        - JWKS=<jwks>
        - JWKS_KEYID=<kid>
        - TOOLING_BASE_URL=https://<commerceHost>:7443/tooling
        - STOREWEB_HOST=<commerceHost>
      

      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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRF ...
        - JWKS_KEYID=k1
        - TOOLING_BASE_URL=https://auth.hclcommerce.com:7443/tooling
        - STOREWEB_HOST=auth.hclcommerce.com
      
    5. Update the following configuration for search-master.
        - SPIUSER_NAME=<spiUserName>
        - SPIUSER_PWD=<encryptedSpiUserPassword>
        - DBHOST=<dbHOST>
        - DBNAME=<dbName>
        - DBUSER=<dbUser>
        - DBPASS=<dbPassword>
        - DBPORT=<dbPort>
        - DBTYPE=db2
      

      for example:

        - SPIUSER_NAME=spiuser
        - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk=
        - DBHOST=authdb.hclcommerce.com
        - DBNAME=mall
        - DBUSER=wcs
        - DBPASS=wcs1
        - DBPORT=50000
        - DBTYPE=db2
      
    6. Update <base64SpiUserPassword> in the healthcheck to the base64 encoded values of <spiUser>:<spiPassword> for for search_master container. You can get this value by running `echo -n "<spiUser>:<spiPassword>" | base64`. e.g if `c3BpdXNlcjpwYXNzdzByZA==` is the result with `<spiUser>` set to `spiuser` and `<spiPassword>` set to `passw0rd`.
    7. Run the following command to start up Commerce.
        docker-compose up -d
      
    8. Verify all the containers are up and healthy.

Deploy a Commerce Live environment with Solr search using DB2

This process enables Apache Solr within the following environment. Each component of the the environment runs in its own Docker container or containers.

  1. Setup the live database using the instructions in Using an IBM Db2 database.
  2. Deploy HCL Commerce live environment with solr search.
    1. Copy file docker-compose-solr-commerce-db2-live-template.yml to docker-compose.yml
    2. Update the image level for all docker container, for example: image: ts-app:9.1
    3. Accept LICENSE for all docker container, for example: - LICENSE=accept
    4. Update the following configuration for txn container. SPIUSER_PWD, DBAPASSENCRYPT and DBPASSENCRYPT are encrypted with wcs_encrypt. JWKS can be generated by generateJWKS utility, see utilities for details.
        - adminPassword=<adminPassword>
        - SPIUSER_NAME=<spiUserName>
        - SPIUSER_PWD=<encryptedSpiUserPassword>
        - DBHOST=<dbHOST>
        - DBNAME=<dbName>
        - DBUSER=<dbUser>
        - DBPASS=<dbPassword>
        - DBPORT=<dbPort>
        - DBTYPE=db2
        - DBAUSER=<dbaUser>
        - DBAPASSENCRYPT=<encryptedDbaUserPassword>
        - DBPASSENCRYPT=<encryptedDbUserPassword>
        - JWKS=<jwks>
        - JWKS_KEYID=<kid>
        - TOOLING_BASE_URL=https://<commerceHost>:7443/tooling
        - STOREWEB_HOST=<commerceHost>
      

      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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFR ...
        - JWKS_KEYID=k1
        - TOOLING_BASE_URL=https://live.hclcommerce.com:7443/tooling
        - STOREWEB_HOST=live.hclcommerce.com
      
    5. Update the following configuration for search-repeater and search-subordinate.
        - SPIUSER_NAME=<spiUserName>
        - SPIUSER_PWD=<encryptedSpiUserPassword>
        - DBHOST=<dbHOST>
        - DBNAME=<dbName>
        - DBUSER=<dbUser>
        - DBPASS=<dbPassword>
        - DBPORT=<dbPort>
        - DBTYPE=db2
      

      For example:

        - SPIUSER_NAME=spiuser
        - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk=
        - DBHOST=livedb.hclcommerce.com
        - DBNAME=mall
        - DBUSER=wcs
        - DBPASS=wcs1
        - DBPORT=50000
        - DBTYPE=db2
      
    6. Update search master host for search_repeater container.
        - "search_master:<searchMasterHost>"
       for example:
        - "search_master:searchmaster.hclcommerce.com"
      
    7. Update <base64SpiUserPassword> in the healthcheck to base64 encoded values of <spiUser>:<spiPassword> for search_repeater and search_slave containers. You can get this value by running `echo -n "<spiUser>:<spiPassword>" | base64`. e.g if `c3BpdXNlcjpwYXNzdzByZA==` is the result with `<spiUser>` set to `spiuser` and `<spiPassword>` set to `passw0rd`.
    8. Run the following command to start up Commerce.
        docker-compose up -d
      
    9. Verify all the containers are up and healthy.