Testing customizations in next-generation Order Hub

After you create and build your customizations, you test your customizations to reduce the risks that you face during deployment.

About this task

When you run next-generation Order Hub in the developer toolkit (DTK), it runs in two containers: a base container and an extension container.
  • The base container has the IBM modules that are part of next-generation Order Hub.
  • The extension container is an empty image for your customizations that the user interface connects to.
To test a customized image in the DTK, an extra set of containers are deployed. A second base container is deployed with a different configuration that helps it to connect to the customized image. Your extension container is deployed and called by the user interface. The set of containers used for customization testing use different ports than the regular next-generation Order Hub containers. Both sets of containers can be run at the same time.

Procedure

  1. Build the customization docker image from the extensions JAR file by using the following command.

./build-customization.sh build-image-from-jar <path to extension-jar> <custom-image-name> <custom-image-tag>
For example,
./build-customization.sh build-image-from-jar packagejar/orderhub-ext_2023_04_21_09_42_26.jar orderhub-ext 20230421

  1. Edit the devtoolkit_docker/compose/om-compose.properties file and set the variables ORDERHUB_EXT_CUSTOM_IMAGE and ORDERHUB_EXT_CUSTOM_TAG to the values used in build-customization.sh for custom-image-name and custom-image-tag. For example,
    ORDERHUB_EXT_CUSTOM_IMAGE=orderhub-ext 
    ORDERHUB_EXT_CUSTOM_TAG=20230421
  2. Use the om-compose.sh script from the devtoolkit_docker/compose path to deploy the custom image in the developer toolkit by using the following command.
    ./om-compose.sh setup-orderhub-custom
    The following containers are created.
    • om-orderhub-base-custom
    • om-orderhub-ext-custom
  3. Start next-generation Order Hub by opening a tab in a browser to https://localhost:7444/order-management.
    Note:

    The default port is 7444. If you set the OH_BASE_CUSTOM_HTTPS_PORT property in the devtoolkit_docker/compose/om-compose.properties file, use the port number that you set. The om-orderhub-base-custom container that is running Order Hub (running on port 7444) loads the customizations that are deployed in the om-orderhub-ext-custom container.

    You can run these containers at the same time as the container that runs Order Hub (running on port 7443) and that loads the locally developed customizations (yarn start-app).

What to do next

Deploy your customizations. For more information, see Deploying customizations in next-generation Order Hub.