Preparing a Docker host server to launch Utility server Docker container

Setting Up the Utility Server Docker Container for HCL Commerce

The Utility server Docker container is an essential tool for initializing and managing the Commerce+ database schema. This container includes several utilities designed to configure and maintain the Commerce+ environment across various stages, from initial setup to database maintenance. These utilities can be used to manage database schema, load sample data, perform database cleanup, and execute SQL commands in a consistent manner.

This container is particularly helpful for setting up new databases in production, pre-production, or test environments. It allows administrators to manage their databases in a controlled and repeatable way.

How the Utility Server Container Fits into the Environment Setup

The Utility server Docker container is used primarily during the setup phase to prepare a database for use with Commerce+. Once the database is initialized, including loading the Commerce+ schema and setting up any necessary data, the database is ready for use in your production or non-production environments.

The utility container allows seamless connection to various database environments (production, pre-production, test) by configuring the container with the appropriate database credentials and network access.

Steps to Set Up the Utility Server Container:

  1. Install Docker on the Host.
    1. Install Docker version 20.10 or later.
    2. Install Docker Compose version 1.24.1 or later.
    3. Optionally, create a Docker Unix group for easier access.
    4. If you don’t create a Docker Unix group, prefix Docker commands with sudo. For more information, refer to Docker’s https://docs.docker.com/engine/install/linux-postinstall/documentation.
  2. Pull the Utility Docker image.
    1. Pull the Utility Docker image from your organization’s private Docker registry. For example,
      docker pull Docker_registry/commerce/ts-utils:tag
    2. This image is designed for database setup and maintenance, and it is much faster to pull than the full Commerce+ images.
  3. Configure the Utility Container to Connect to Your Environment.

    Set the container’s environment variables for the database host, username, and password corresponding to your target environment (production, pre-production, or test).

    For example,
    docker run -e LICENSE=accept -e DB_HOST=production_db_host -e DB_USER=db_user -e DB_PASS=db_password --name utils Docker_registry/commerce/ts-utils:tag
  4. Start the Utility Container.
    Once the environment variables are configured, start the Utility container. For example,
    docker run -e LICENSE=accept --name utils Docker_registry/commerce/ts-utils:tag

Available Utilities

The Utility server Docker container includes several utilities that help with database management, configuration, and data population. See Utilities for all the list of utilities and their respective actions.

These utilities allow you to perform a variety of tasks essential for maintaining the database and ensuring the Commerce+ environment is correctly configured.

What the Utility Server Does

When the Utility server Docker container is running, the following actions can be performed using the utilities inside the container:

  • Encrypt passwords:Ensures secure handling of sensitive credentials.
  • Load the HCL Commerce database schema: Initializes the database structure for commerce to use.
  • Perform database maintenance: Use utilities like dbclean.sh and updatedb.sh to manage database health.
  • Load sample or business-specific data: Utilities like dataload.sh and acpload.sh enable loading of data into the database.
  • Execute custom SQL commands: The runSQL.sh utility allows for running specific SQL queries or scripts.
  • Generate SEO-friendly URLs and keywords: The seourlkeywordgen.sh utility helps generate SEO URLs based on the data in the system.

Next Steps After Initialization:

Once the database has been initialized and populated using the utilities in the Utility server Docker container, you can proceed with your Commerce+ deployment. The container will ensure the database is properly configured, and you can focus on deploying the application code to your production, pre-production, or test environments.

The Utility Server container is an essential tool for ensuring that your database is correctly configured and ready for use with Commerce+.