(Linux)

Deploy a WebSphere Commerce authoring environment with Docker Compose

Deploy a simple WebSphere Commerce authoring environment to create an environment where site administrators and business users can update the store catalog or store configurations by using WebSphere Commerce tools. With this simple authoring environment deployment, you prepare a search container as the search_master node. The live environment that we use with this authoring environment should include a search_repeater and search_slave that communicates with the search_master in the authoring environment.


Before beginning

  1. Load Docker images your company's private Docker registry.

  2. The machine has at least 2 core processor, 8 GB RAM, and 50 GB free disk space.

  3. The machine is not running an existing WebSphere Commerce environment.

  4. Prepare a Db2 database or a Oracle database.

  5. Load the WebSphere Commerce authoring database schema by setting type=staging.


Procedure

  1. Install Docker.

    1. Install Docker Version 17.06 or later.

    2. Install Docker Compose Version 1.10 or later.

    3. Consider creating a Docker Unix group.

      Note: Prefix sudo to Docker commands if you do not create a Docker Unix group.

  2. Download the following sample Docker Compose file based on how the database is configured.

    Option Docker Compose sample
    Database running inside a Docker container Download the following file:

    Note: If the link does not prompt us to save, right-click and save the file. Open the file in a source code editor to view and edit in the proper YAML format.

    The YAML files are sample that assume that we are using a Db2 Docker image. Update all the parameters that are in angle brackets <>. The sample files are commented with descriptions of the parameters.

    Database running on a standard server (not in a Docker container) Download the following file:

    Note: If the link does not prompt us to save, right-click and save the file. Open the file in a source code editor to view and edit in the proper YAML format. Update all the parameters that are in angle brackets <>. The sample files are commented with descriptions of the parameters.

  3. (Oracle) Download the Oracle JDBC driver java/ojdbc8.jar file from the Oracle installation folder, and put it under the directory where you saved the Docker Compose file.

  4. In a command line interface, go to where you saved the Docker Compose file.

  5. Deploy the Docker containers based on the Docker Compose file that you have.

    • docker-compose -f docker-compose-auth.yml up -d

    • docker-compose -f docker-compose-auth-extdb.yml up -d

    Note:

    • If the images are not already on your machine, the command downloads Docker images from our registry. The images are approximately 10 GB in total so the duration of this command depends on your Internet connection.

    • Whenever our Docker virtual machine is restarted, you need to manually restart the Docker containers by rerunning this docker-compose -f <file> up -d command.

  6. If you loaded sample data in the database, then build the search index.

    1. Send the following REST request (POST) and add basic authentication with login as spiuser and the password for the spiuser. We can build the search index using one of the following methods:

      • Use the following cURL command with the spiuser plain text password.

          curl -k -u spiuser:spiuserPassword-X POST https://<transaction_server_hostname>:5443/wcs/resources/admin/index/dataImport/build?masterCatalogId=10001

      • By using a browser plug-in such as HttpRequester (for Mozilla Firefox) or Postman (for Google Chrome). Use the following URL and authenticate with user spiuser and the spiuser plain text password.

          https://<transaction_server_hostname>:5443/wcs/resources/admin/index/dataImport/build?masterCatalogId=10001

      Note the jobstatusId that we get in the response, for example, {"jobstatusId":"xxxxx"}.

    2. Use the jobstatusId and send the following REST request (GET) to check the request execution status. Again, use basic authentication with spiuser and the spiuser password.

        https://<search_server_hostname>:3738/search/admin/resources/index/build/status?jobStatusId={jobstatusId}

      When successful, you will get a Status: 200 OK and response similar to the following:

        response content: {
        "finishTime":"2017-08-01 06:49:31.395759",
        "lastUpdate":"2017-08-01 06:49:31.395759",
        "progress":"100%",
        "jobStatusId":"14003",
        "startTime":"2017-08-01 06:48:17.369909",
        "message":"Indexing job started for masterCatalogId:10,001. Indexing job finished successfully for masterCatalogId:10001.",
        "jobType":"SearchIndex",
        "properties":"[]",
        "status":"0"}

  7. Ensure that we can log in to Management Center.

    • https://<transaction_server_hostname>:8000/lobtools/cmc/ManagementCenter

  8. If you loaded sample data into the authoring database, ensure that we can visit the sample Aurora store.

    • https://<store_server_hostname>:8443/wcs/shop/en/auroraesite


What to do next


Related concepts
Extract and load data
Run Engine commands


Related tasks
Build the WebSphere Commerce Search index
Build custom Docker images based on customization packages
Use the Management Center
Run utilities from the Utility server Docker container