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.
- 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.
- Go to the .
- Search for Package ID HCL_Commerce_Devops_Version_9.1, or File ID HCL_Commerce_DevOps_9.1.x.x.bundle.
- Download the file.
- 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
docker load -i imagename
For example:
docker load -i HCL_Commerce_Enterprise_9.1.0.0_Data_Query_Server_x86-64.tgz
- Clone the project in Git from the downloaded git bundle, and check the code into your
source control management system. Run the following
command.
Where:git clone bundleName projectName
- bundleName
- The filename of the bundle you are cloning.
- projectName
- The name of the git project that you are creating.
git clone HCL_Commerce_DevOps_9.1.0.0.bundle HCL_Commerce_DevOps
Deploy Docker containers for production with Elasticsearch-based search using
- Set up the Authoring database using the instructions in Using an IBM Db2 database.
- 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)
- Copy file docker-compose-elasticsearch-data-db2-template.yml to docker-compose.yml.
- Update the Docker image level for all Docker containers. For example:
image: search-nifi-app:9.1
. - Accept the LICENSE for all Docker containers, for
example:
- LICENSE=accept
. - 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"
- Create a directory named nifiLogs at the same location where
docker-compose.yml is kept and ensure that its permissions are set
to
777
. - Start the Elasticsearch
platform.
docker-compose up -d
- Verify that all of the containers are up and healthy.
Deploy an Authoring environment with Elasticsearch using
- In the docker-compose folder, rename the docker-compose-elasticsearch-commerce-db2-template.yml file to docker-compose.yml.
- Update the image level for all Docker containers, for example:
image: ts-app:9.1
. - Accept the LICENSE for all docker containers, for example:
- LICENSE=accept
. - Set ENVTYPE for the and Query container to
auth
.- ENVTYPE=auth
- 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
- Run the following command to start up the Authoring
environment.
docker-compose up -d
- Verify that all of the containers are up and healthy.
Deploy the Live environment with Elasticsearch using
- Rename the file docker-compose-elasticsearch-commerce-db2-template.yml to docker-compose.yml.
- Update the image level for all Docker containers. For example:
image: search-nifi-app:9.1
. - Accept the LICENSE for all Docker containers:
- LICENSE=accept
. - Set the ENVTYPE for the and query
containers to live.
- ENVTYPE=live
- 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
- Run the following command to start the Authoring
environment.
docker-compose up -d
- 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.