HCL Commerce DeveloperHCL Commerce Version 9.1.16.1

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

Before you can enable the use of the Orchestration service and test your site using the Solr-based search solution, you must:

Procedure

  1. Download and unzip the HCL Commerce 9.1.1.16.1 patch (HCL_Commerce_Config_9.1.16.1.zip).
    1. Log in to the HCL License and Delivery portal.
    2. Locate and download HCL_Commerce_Config_9.1.16.1.zip.
    3. Extract the contents to a working directory.
  2. Modify your HCL Commerce Developer installation.
    Open the WCDE_Installdir\workspace\search-ear\lib\ directory.
    1. 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
    2. 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
    3. 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.

  3. Modify your Search server configuration.
    1. Open the Liberty_Installdir\usr\servers\searchServer\resources\search\runtime\config\com.ibm.commerce.search\ directory.
    2. Back up and replace the following three files with those that are contained within the searchServer\resources\search\runtime\config\com.ibm.commerce.search\ patch directory.
      • wc-component.xml
      • wc-query.tpl
      • wc-search.xml
    3. Open the Liberty_Installdir\usr\servers\searchServer\resources\search\runtime\config\com.ibm.commerce.rest\ directory.
    4. Back up and replace the wc-rest-resourceconfig.xml configuration file with the copy from within the searchServer\resources\search\runtime\config\com.ibm.commerce.rest\ patch directory.
  4. Modify your HCL Commerce Tooling SDK.
    1. Back up and replace the following two files with those that are contained within the toolkit\HCL-Commerce-Tooling patch directory.
      • commerce-tooling/proxy.conf.js
      • commerce-tooling/src/assets/config.json
  5. Clone the HCL_Commerce_DevOps_9.1.16.1.bundle git bundle.
  6. 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'); 
  7. 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:Using the following env.sh configuration to enable orchestration within your HCL Commerce development environment.
    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>
  8. Verify that all of the containers are up and healthy.
  9. Run the HCL Commerce Developer Nextjs store configuration script.
    1. Navigate to the WCDE_Installdir\bin\ directory.
    2. Run the following command script.
      configureSolrNextjsStore.bat orchestrationHost orchestrationPort nextjsStoreHost nextjsStorePort transactionHost transactionPort toolingSDKInstallDir nextjsStoreSDKInstallDir
      Where:
      orchestrationHost
      The hostname or IP address of the Orchestration server. Specifying localhost does not work.
      orchestrationPort
      The port number for the Orchestration server. For example, 19443.
      nextjsStoreHost
      The hostname or IP address of the Nextjs Store server. For example, localhost.
      nextjsStorePort
      The port number for the Nextjs Store server. For example, 3343.
      transactionHost
      The hostname or IP address of the Transaction server.
      transactionPort
      The port number for the Transaction server. For example, 443.
      toolingSDKInstallDir
      The installation directory for the Tooling SDK.
      nextjsStoreSDKInstallDir
      The installation directory for the Nextjs Store SDK.
      For example:
      configureSolrNextjsStore.bat orchestration.commerce.com 19443 localhost 3343 localhost 443 C:\HCL_Commerce_Tooling C:\HCL_Commerce_Nextjs

Results

Your HCL Commerce development environment is now configured and deployed with the Orchestration service. You can now test Ruby applications using the Solr-based search solution.

What to do next

Enable the HCL Commerce Cache Manager application.

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.