Setting up the HCL Commerce Solr-based Nextjs Store development environment
The Orchestration service acts as a bridge between Ruby applications that can only recognize Elastic-based search formats, and Solr-based search services. If you plan to develop for Ruby applications for use with a Solr-based search solution, you must configure the Orchestration service to test your storefronts in an HCL Commerce development environment.
For more information on the Orchestration service, see Orchestration service.
Before you begin
- Set up an HCL Commerce development environment:
- Install or upgrade to HCL Commerce Developer 9.1.16.0 or greater.
- Configure your HCL Commerce Developer Legacy environment for use with the Solr-based search solution. For more information on the Solr-based search solution, see Using Apache Solr as your search solution.
- Set up an HCL Commerce Developer Next.js Store environment.
- Ensure that your environment meets both hardware and software requirements:
- For software requirements, review Supported software levels, fixes, and settings for HCL Commerce.
- For hardware requirements, review Hardware requirements for HCL Commerce.
- HCL Cache caches classes that can be modified in newer versions of HCL Commerce. To avoid errors in de-serializing an old version of the class, it is strongly recommended to clear Redis keys after upgrading HCL Commerce. Redis keys can be cleared with the Redis flushdb or flushall commands.
- If you are using Microsoft Windows:
- Ensure that ample resources are allocated to Docker.
To allocate resources to Docker, right click on your Docker executable, or shortcut to it, and select Advanced. Allocate at minimum: 8 CPU cores, 32GB of memory, and 80GB of storage to ensure adequate performance.
- Ensure that the following network setting is enabled within the
Expose daemon on tcp://localhost:2375 port
settings:
- Ensure that ample resources are allocated to Docker.
Procedure
-
Download and unzip the HCL Commerce 9.1.1.16.1 patch
(HCL_Commerce_Config_9.1.16.1.zip).
- Log in to the HCL License and Delivery portal.
- Locate and download HCL_Commerce_Config_9.1.16.1.zip.
- Extract the contents to a working directory.
-
Modify your HCL Commerce Developer installation.
Open the WCDE_Installdir\workspace\search-ear\lib\ directory.
- Back up and delete the following files.
- search-solr-ext-9.1.16.0-SNAPSHOT.jar
- search-index-9.1.16.0-SNAPSHOT.jar
- search-core-9.1.16.0-SNAPSHOT.jar
- search-api-9.1.16.0-SNAPSHOT.jar
- classic-foundation-stub-9.1.16.0-SNAPSHOT.jar
- Replace the files with those from the working patch directory, from within the
workspace\search-ear\lib\ directory.
- search-solr-ext-9.1.16.1-SNAPSHOT.jar
- search-index-9.1.16.1-SNAPSHOT.jar
- search-core-9.1.16.1-SNAPSHOT.jar
- search-api-9.1.16.1-SNAPSHOT.jar
- classic-foundation-stub-9.1.16.1-SNAPSHOT.jar
- Copy the configureSolrNextjsStore configuration utility from the
patch into your HCL Commerce Developer installation.
Move the toolkit\WCDE\bin\configureSolrNextjsStore.bat file into your WCDE_Installdir\bin\ directory.
- Back up and delete the following files.
-
Modify your Search server configuration.
-
Modify your HCL Commerce Tooling SDK.
- Clone the HCL_Commerce_DevOps_9.1.16.1.bundle git bundle.
-
Ensure that your
STORECONF
database table is correctly configured.- Ensure that
wc.search.priceMode.compatiblePriceIndex
is set to 0 for your store. - Ensure that
hcl.imagePath
is set to your image path for your store.For the default Nextjs sample store, use the following SQL to set it to /hclstore.INSERT INTO WCS.STORECONF (STOREENT_ID, NAME, VALUE) VALUES(41, 'hcl.imagePath', '/hclstore'); INSERT INTO WCS.STORECONF (STOREENT_ID, NAME, VALUE) VALUES(42, 'hcl.imagePath', '/hclstore');
- Ensure Check
headlessStore
is set to true for your store.For the default Nextjs sample store, use the following SQL to set it to true.INSERT INTO WCS.STORECONF (STOREENT_ID, NAME, VALUE) VALUES(41, 'headlessStore', 'true'); INSERT INTO WCS.STORECONF (STOREENT_ID, NAME, VALUE) VALUES(42, 'headlessStore', 'true');
- Ensure that
-
Download, load, and deploy the HCL Commerce 9.1.1.16.1 Elasticsearch-based
search data and orchestration Docker images for your HCL Commerce development environment.
Review the following task and deployment reference information:
- Deploying Elasticsearch in a development environment.
- The Docker Compose deployment env.sh configuration file.
SEARCH_ENGINE=solr DEPLOY_TYPE=toolkit REACT_STORE_ENABLED=false LICENSE_ACCEPTED=accept ENV_TYPE=auth TOOLKIT_HOST=<toolkitHost> TOOLKIT_HOST_IP=<toolkitHostIP> TOOLING_HOST=<toolingHost> ORCHESTRATION_ENABLED=true ORCHESTRATION_IMAGE=<orchestrationImage> SPIUSER_PWD_ENCRYPTED=<encryptedSpiUserPassord>
- Verify that all of the containers are up and healthy.
-
Run the HCL Commerce Developer Nextjs store configuration script.
Results
What to do next
Note: the Cache Manager application can be deployed more easily by updating your deployment env.sh file and setting the CACHE_ENABLED and CACHE_APP_IMAGE parameters.