Deploying Apache Solr with an Oracle database

Use these instructions to deploy your HCL Search system using Apache Solr as your search engine and Oracle 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

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 Authoring database.

    Follow the instruction to setup Oracle database described in

    Using an Oracle database.
  2. Deploy HCL Commerce auth environment with solr search
    1. From the docker-compose folder, copy the file docker-compose-solr-commerce-oracle-auth-template.yml to docker-compose.yml
    2. pdate the image level for all docker containers, for example: image: ts-app:9.1
    3. Accept LICENSE for all docker containers: - LICENSE=accept
    4. Update the following configuration for the Transaction 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=oracle
        - 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=orclpdb1
        - DBUSER=wcs
        - DBPASS=wcs1
        - DBPORT=1521
        - DBTYPE=oracle
        - DBAUSER=system
        - DBAPASSENCRYPT=u5fOjsJvd7QYYs29qTnqx418LVytXLHxhEu1Pg5IrzQ=
        - DBPASSENCRYPT=WVRDsn+rEpaSbm59Iw/yoYsNnH1U2ovg52j5nzdW1L0=
        - JWKS={base64}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTF ...
        - 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=oracle
      
      for example:
        - SPIUSER_NAME=spiuser
        - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk=
        - DBHOST=authdb.hclcommerce.com
        - DBNAME=orclpdb1
        - DBUSER=wcs
        - DBPASS=wcs1
        - DBPORT=1521
        - DBTYPE=oracle
      
    6. Also update <base64SpiUserPassword> in the healthcheck to the base64 encoded values of <spiUser>:<spiPassword> 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. Copy Oracle ojdbc 8 driver (ojdbc8.jar) to the same location where docker compose file is located.
    8. Run the following command to start up Commerce.
        docker-compose up -d
      
    9. Verify all the containers are up and healthy.

Deploy the Commerce Live environment with Solr search using Oracle

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 live database, following the instructions in Using an Oracle database.
  2. Deploy HCL Commerce live environment with solr search.
    1. Copy file docker-compose-solr-commerce-oracle-live-template.yml docker-compose.yml
    2. Update the image level for all docker containers, for example: image: ts-app:9.1
    3. Accept LICENSE for all docker containers: - 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=oracle
       - 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=orclpdb1
       - DBUSER=wcs
       - DBPASS=wcs1
       - DBPORT=1521
       - DBTYPE=oracle
       - DBAUSER=system
       - DBAPASSENCRYPT=u5fOjsJvd7QYYs29qTnqx418LVytXLHxhEu1Pg5IrzQ=
       - DBPASSENCRYPT=WVRDsn+rEpaSbm59Iw/yoYsNnH1U2ovg52j5nzdW1L0=
       - JWKS={base64}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgz ...
       - 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=oracle
      

      for example:

       - SPIUSER_NAME=spiuser
       - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk=
       - DBHOST=livedb.hclcommerce.com
       - DBNAME=orclpdb1
       - DBUSER=wcs
       - DBPASS=wcs1
       - DBPORT=1521
       - DBTYPE=oracle
      
    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 the 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. Copy Oracle ojdbc 8 driver (ojdbc8.jar) to the same location where docker compose file is located.
    9. Run the following command to start up Commerce.
        docker-compose up -d
      
    10. Verify all the containers are up and healthy.