Deploying HCL Commerce Version 9.1 with Solr-based search and an IBM Db2 database using Docker Compose
The following steps highlight a basic deployment of HCL Commerce Version 9.1 with Docker
Compose. This deployment is configured to deploy HCL Commerce Version 9.1 with the Solr-based
search solution, and utilizes the IBM Db2 Database as the database solution.
Before you begin
- Ensure that you have completed the prerequisites that are required. For the prerequisites for this Docker Compose deployment, see Prerequisites for deploying HCL Commerce Version 9.1 with Docker Compose.
- If you are using the provided IBM Db2 Database Docker image, you must change the price mode to ensure that the price data shows up as expected in an Aurora-based storefront. For more information, see Using the preconfigured IBM Db2 Docker image.
Procedure
- Deploy the HCL Commerce authoring environment applications.
- Copy the contents of the provided docker-compose-solr-commerce-db2-auth-template.yml Docker Compose file into your custom docker-compose.yml Docker Compose file.
- Update the file to reflect the environment that you want to deploy.
- Accept the LICENSE required for all Docker containers. For example,
- LICENSE=accept
. - Update the image tag for all HCL Commerce Docker containers. For example,
image: ts-app:9.1
. - Update the mandatory configuration parameters for the Transaction server Docker container.
Parameter name Description MERCHANTKEY_ENCRYPT The encrypted merchant key that was created when you or an administrator loaded the HCL Commerce database schema. For more information, see Loading the HCL Commerce database schema. 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 if the environment is using the Elasticsearch-based or Solr-based search solution. Accepted values are true for Elasticsearch-based search, and false for Solr-based search. STORE_HOST Store server hostname. 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 the Elasticsearch-based search solution 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. SESSION_KEY_ENCRYPT
The encrypted session key. Note: This parameter was optional in all releases prior to HCL Commerce 9.1.12.0.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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTFWU3NsS1dHRnAybmlpdUdzR293Qk5zR1hLWGU0SDI4cWlMZmdIMWVGdWVmdl81cEZOSUlKYlVSUjBkVWtPWGlxTDRrNTBxQ1Nmemo4S0ROTmsyYV9KakdobTZ6dFNPTnBtSDdzSWZJX2o3YlF4WWNzaVN4cklSWnBSOGdNem5TNmV2VXJmMWZZVWpVbEszd2RoMi1vc2t6NTVGR1A4YXdCRnlQTEhWbmo5S1VtaU1zdHR2eTg1VW9COTBuT3d5U0Q5UHl3clF3el9pMlIzcUVIYWJSQ0FVOGY4MnRKTE9HeWxrbUhnY2NaYmk0d0FBWG1JemJwTzVxYTFrV2lBVGMyRjVYTGNUOE1KVHZRdkZPWFNjTGs5LTBWYzNpYnF3WEx4Slg0MENVbUpzSEdESTZ2c3hPWEh1LXBfVW5HOV91bVEiLCJlIjoiQVFBQ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pbFhzbVVuWVNudW9rSVhNeTJRSTl5eDZLQ1NFMk9GWUdNcXlqYzRDN2JaZV82QUhRaGJzelNaYWJrUjJBaFExNnI2WlRXbGN0bnNsMjQ0b1dzM3FVSjczZWRVUS1rIiwiZHEiOiJlYWF1TDkyNGVoXzJITWUxd1NDNk9rU1dlRjVBS1cxRjA5cXdxXzdqeDBwUjlMOUdFeWdld2xrTVBQRTROS19aOXRpOGo5cFpaN1R2YlpoU09tMDM0eU04aVpBTV9qbjZ0ZHJPSWl4bkhId1N2TXUzUElMVmlKeloxUnJaV0RmWmpIX2FUcVhpbzZONDhETUdYam8tQ3lUQW1BekNxM3lGNlROR1Z5b1MyVkUiLCJxaSI6IllUWFI4QjVRUE1jbzIzelo2Wi1jLTFhSVJuOF9BRWk5TGplZ2xEaVJ0T2E4dHpPZUdQeU9mX0h4WnpzMFItaVdpMWFET1dWR2tDd1pLdG5Uc2lMdFBQRUdSVzFRNXZlVHdZdjVlWHozR2F2VTBzS2RLQzBJSkpJaWdNa053UFIxLU5hLTRBVHprQ0pqbGd3QVFHZ0FySTR5Vk1TR2RGYXpCRm9FdjM3OTFkWSJ9XX0= - JWKS_KEYID=k1 - TOOLING_BASE_URL=https://auth.hclcommerce.com:7443/tooling - STOREWEB_HOST=auth.hclcommerce.com
- Update the mandatory configuration for your Search-master container.
Parameter name Description Configuration SPIUSER_NAME Your SPIUSER name. The default value is spiuser. Note: This value is optional as of HCL Commerce 9.1.7.0.
Container environment variable/Vault SPIUSER_PWD The encrypted password for the spiuser. For more information, see Setting the spiuser password in your Docker images. Container environment variable/Vault ADMIN_SPIUSER_PWD The ADMIN_SPIUSER_PWD must be the same value as SPIUSER_PWD but kept as plain text. Container environment variable/Vault DBHOST The database hostname. Container environment variable/Vault DBNAME The name of the database. Container environment variable/Vault DBUSER The database user name. Container environment variable/Vault DBPASS The database user password. Container environment variable/Vault DBPORT The database port. Container environment variable/Vault DBAUSER The database administrator. Container environment variable/Vault DBAPASSENCRYPT The database administrator password that is encrypted with the wcs_encrypt.sh utility. Container environment variable/Vault DBPASSENCRYPT The database user password that is encrypted with the wcs_encrypt.sh utility. Container environment variable/Vault SESSION_KEY_ENCRYPT
The encrypted session key. Note: This parameter was optional in all releases prior to HCL Commerce 9.1.12.0.Container environment variable/Vault For example,- SPIUSER_NAME=spiuser - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk= - DBHOST=authdb.hclcommerce.com - DBNAME=mall - DBUSER=wcs - DBPASS=wcs1 - DBPORT=50000 - DBTYPE=db2
- Accept the LICENSE required for all Docker containers. For example,
- Update the
base64SpiUserPassword parameter within the health check section of the Search
Master container, to the base64 encoded values
of spiUser:spiPassword.You can obtain this value by passing the values through the base64 system utility:
For example, the resulting value isecho -n "spiUser:spiPassword" | base64
c3BpdXNlcjpwYXNzdzByZA==
with the defaultspiuser
:passw0rd
combination. - Start the HCL Commerce authoring environment.Run
docker-compose up -d
. - Verify that all of the Docker containers are up and healthy.Run
docker-compose ps
.
- Deploy the HCL Commerce live environment applications.
- Copy the contents of the provided docker-compose-solr-commerce-db2-live-template.yml Docker Compose file into your custom docker-compose.yml Docker Compose file.
- Update the file to reflect the environment that you want to deploy.
- Accept the LICENSE required for all Docker containers. For example,
- LICENSE=accept
. - Update the image tag for all HCL Commerce Docker containers. For example,
image: ts-app:9.1
. - Update the following configuration parameters for the Transaction server Docker container.
Parameter name Description MERCHANTKEY_ENCRYPT The encrypted merchant key that was created when you or an administrator loaded the HCL Commerce database schema. For more information, see Loading the HCL Commerce database schema. 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 if the environment is using the Elasticsearch-based or Solr-based search solution. Accepted values are true for Elasticsearch-based search, and false for Solr-based search. STORE_HOST Store server hostname. 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 the Elasticsearch-based search solution 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. SESSION_KEY_ENCRYPT
The encrypted session key. Note: This parameter was optional in all releases prior to HCL Commerce 9.1.12.0.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}eyJrZXlzIjpbeyJrdHkiOiJSU0EiLCJraWQiOiJrMSIsIm4iOiJtc1NIbE9pVlRFRUgzMW9KYk1XcTFWU3NsS1dHRnAybmlpdUdzR293Qk5zR1hLWGU0SDI4cWlMZmdIMWVGdWVmdl81cEZOSUlKYlVSUjBkVWtPWGlxTDRrNTBxQ1Nmemo4S0ROTmsyYV9KakdobTZ6dFNPTnBtSDdzSWZJX2o3YlF4WWNzaVN4cklSWnBSOGdNem5TNmV2VXJmMWZZVWpVbEszd2RoMi1vc2t6NTVGR1A4YXdCRnlQTEhWb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MEFBaVlnOW5HN1ZlaVFUTzRwMDE0N0RlaDBxX3pFR1UyYzFWOUNFR1BhVUhNcEdSZGc4UVRCc01mRTVZWEx2ZkE2dVVqWllWaHNSVSIsImRwIjoiTFlRVWItSVA0M09Dc3g3SmVRZ3pUdE5ZZ3c0dnJzR01fVDh5Y3BVR25DQ0pDVTBDUW9VaTRpeWlNcXh6SFZXZUdGYzNjSWlVOFc5QnJpbFhzbVVuWVNudW9rSVhNeTJRSTl5eDZLQ1NFMk9GWUdNcXlqYzRDN2JaZV82QUhRaGJzelNaYWJrUjJBaFExNnI2WlRXbGN0bnNsMjQ0b1dzM3FVSjczZWRVUS1rIiwiZHEiOiJlYWF1TDkyNGVoXzJITWUxd1NDNk9rU1dlRjVBS1cxRjA5cXdxXzdqeDBwUjlMOUdFeWdld2xrTVBQRTROS19aOXRpOGo5cFpaN1R2YlpoU09tMDM0eU04aVpBTV9qbjZ0ZHJPSWl4bkhId1N2TXUzUElMVmlKeloxUnJaV0RmWmpIX2FUcVhpbzZONDhETUdYam8tQ3lUQW1BekNxM3lGNlROR1Z5b1MyVkUiLCJxaSI6IllUWFI4QjVRUE1jbzIzelo2Wi1jLTFhSVJuOF9BRWk5TGplZ2xEaVJ0T2E4dHpPZUdQeU9mX0h4WnpzMFItaVdpMWFET1dWR2tDd1pLdG5Uc2lMdFBQRUdSVzFRNXZlVHdZdjVlWHozR2F2VTBzS2RLQzBJSkpJaWdNa053UFIxLU5hLTRBVHprQ0pqbGd3QVFHZ0FySTR5Vk1TR2RGYXpCRm9FdjM3OTFkWSJ9XX0= - JWKS_KEYID=k1 - TOOLING_BASE_URL=https://live.hclcommerce.com:7443/tooling - ELASTICSEARCH_ENABLED=false - STOREWEB_HOST=live.hclcommerce.com
- Update the following configuration for the search-repeater and search-slave containers:
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 DBHOST The database hostname. DBNAME The name of the database. DBUSER The database user name. DBPASS The database user password. DBTYPE The database type. - SPIUSER_NAME=spiuser - SPIUSER_PWD=DFrt/KnXFukMl3VyuSg4vYm6f7Y7f1RogMUIUAdMakk= - DBHOST=livedb.hclcommerce.com - DBNAME=mall - DBUSER=wcs - DBPASS=wcs1 - DBPORT=50000 - DBTYPE=db2
- Update the search-master host configuration for the search-repeater containers:
Parameter name Description search_master The IP and port of the search node to poll from. Mandatory for the search-repeater/subordinate on the live environment. - For the search-repeater node, specify the
search-master-ip:3737
- For the search-subordinate node, specify the
search-repeater-ip:3737
For example,- "search_master:searchmaster.hclcommerce.com"
- For the search-repeater node, specify the
- Update the
base64SpiUserPassword parameter within the health check section of the
search-repeater and search-slave containers, to the base64 encoded values
of spiUser:spiPassword.You can obtain this value by passing the values through the base64 system utility:
For example, the resulting value isecho -n "spiUser:spiPassword" | base64
c3BpdXNlcjpwYXNzdzByZA==
with the defaultspiuser
:passw0rd
combination.
- Accept the LICENSE required for all Docker containers. For example,
- Start the HCL Commerce live environment.Run
docker-compose up -d
. - Verify that all of the Docker containers are up and healthy.Run
docker-compose ps
.
Results
What to do next
- Build your Search index. For information on building your Search index, see Building the HCL Commerce Search index.
- Access your new environment tools:
- Management Center for HCL Commerce: https://commerceHost:8000/lobtools
- The Aurora B2C starter store: https://commerceHost:8443/wcs/shop/en/auroraesite
- The Aurora B2B starter store: https://commerceHost:8443/wcs/shop/en/aurorab2besite