Deploying Elasticsearch using in a production environment

Use these instructions to deploy Elasticsearch in a production environment with a .

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 Docker containers for production with Elasticsearch-based search using

  1. Set up the Authoring database using the instructions in Using an IBM Db2 database.
  2. Optional: Set up the Live database following the instructions in Using an IBM Db2 database. You can skip this step if you only want to set up the Authoring database.

Deploying

(minimum requirement for the machine: 4 CPUs, 12GB RAM, 80G disk ​space on / file system)

  1. Copy file docker-compose-elasticsearch-data-db2-template.yml to docker-compose.yml.
  2. Update the Docker image level for all Docker containers. For example: image: search-nifi-app:9.1.
  3. Accept the LICENSE for all Docker containers, for example: - LICENSE=accept.
  4. Update the following configuration for NiFi.
      AUTH_JDBC_URL: "jdbc:db2://<authDBHost>:50000/mall"
      AUTH_JDBC_DRIVER_LOCATION: "/opt/nifi/nifi-current/lib/db2jcc4.jar"
      AUTH_JDBC_USER_NAME: "<authDBUser>"
      AUTH_JDBC_USER_PASSWORD: "<authDBUserPassword>"
      LIVE_JDBC_URL: "jdbc:db2://<liveDBHost>:50000/mall"
      LIVE_JDBC_DRIVER_LOCATION: "/opt/nifi/nifi-current/lib/db2jcc4.jar"
      LIVE_JDBC_USER_NAME: "<liveDBUser>"
      LIVE_JDBC_USER_PASSWORD: "<liveDBUserPassword>"

    for example:

      AUTH_JDBC_URL: "jdbc:db2://authdb.hclcommerce.com:50000/mall"
      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"
  5. Create a directory named nifiLogs at the same location where docker-compose.yml is kept and ensure that its permissions are set to 777.
  6. Start the Elasticsearch platform.
      docker-compose up -d
  7. Verify that all of the containers are up and healthy.

Deploy an Authoring environment with Elasticsearch using

  1. In the docker-compose folder, rename the docker-compose-elasticsearch-commerce-db2-template.yml file to docker-compose.yml.
  2. Update the image level for all Docker containers, for example: image: ts-app:9.1.
  3. Accept the LICENSE for all docker containers, for example: - LICENSE=accept.
  4. Set ENVTYPE for the and Query container to auth.
      - ENVTYPE=auth
    
  5. Update the following configuration for the . 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>
      - ELASTICSEARCH_ENABLED=true
      - SEARCH_HOST=<searchHost>
      - INGEST_HOST=<searchHost>
      - ELASTICSEARCH_HOST=<searchHost>
      - REACT_STORE_HOST=<commerceHost>
      - 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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW ...
      - 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
  6. Run the following command to start up the Authoring environment.
      docker-compose up -d
  7. Verify that all of the containers are up and healthy.

Deploy the Live environment with Elasticsearch using

  1. Rename the file docker-compose-elasticsearch-commerce-db2-template.yml to docker-compose.yml.
  2. Update the image level for all Docker containers. For example: image: search-nifi-app:9.1.
  3. Accept the LICENSE for all Docker containers: - LICENSE=accept.
  4. Set the ENVTYPE for the and query containers to live.
      - ENVTYPE=live
  5. Update the following configurations for the . 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>
      - ELASTICSEARCH_ENABLED=true
      - SEARCH_HOST=<searchHost>
      - INGEST_HOST=<searchHost>
      - ELASTICSEARCH_HOST=<searchHost>
      - REACT_STORE_HOST=<commerceHost>
      - 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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTF ...
      - 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
  6. Run the following command to start the Authoring environment.
      docker-compose up -d
  7. Verify that all of the containers are up and healthy.

What to do next

To deploy Elasticsearch in a , see Setting up the HCL Commerce Developer Search environment.