HCL Commerce Developer

Setting up the HCL Commerce Solr-based Next.js 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:
  • Set up an HCL Commerce development environment:
  • Ensure that your environment meets both hardware and software requirements:
    • 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.
  • WindowsConfigure Docker on Windows:
    • If you are using Microsoft Windows: Configure Docker Desktop to support HCL Commerce’s resource and connectivity needs.
      1. Allocate Resources to Docker: HCL Commerce requires significant resources to run smoothly. These settings prevent performance issues with Solr and Orchestration containers.
        • To allocate:
          1. Open Docker Desktop.
          2. Click Settings > Resources > Advanced
          3. Set:
            • CPUs: 8 cores
            • Memory: 32 GB
            • Disk Space: 80 GB
          4. Click Apply and Restart to save the changes and restart Docker.
      2. Enable Docker Daemon Access: This allows HCL Commerce tools to communicate with Docker. HCL Commerce requires quite a bit of resources to run smoothly. These settings prevent performance issues with Solr and Orchestration container.
        1. In Docker Desktop, go to Settings > General
        2. Check Expose daemon on tcp://localhost:2375 without TLS.
        3. Click Apply and Restart to save the changes and restart Docker.

Procedure

  1. 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>
  2. Verify that all of the containers are up and healthy.
  3. 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.