Generating custom images
After you customize the base image successfully, generate custom
om-base, om-agent and om-app images.
About this task
Use the following steps to regenerate the customized images after completing customizations in
the runtime container. The steps to generate images is same regardless of the method you use,
om-base or DTK, for customization.
Note: The following two URLs are whitelisted in the build box and you must allow your build machines
to reach the repository for UBI8 and Liberty.
- registry.access.redhat.com/ubi8/ubi
- icr.io/appcafe/websphere-liberty:23.0.0.12-kernel-java8-ibmjava-ubi
Procedure
- Navigate to /opt/ssfs/runtime/container-scripts/imagebuild folder to
generate custom
om-base,om-agentandom-appimages../generateImages.sh --OM_TAG=<tagname> --EXPORT=falseThe following docker images are generated in your local registry. Also, an optional tar.gz file copy of the image in the parent directory of your runtime, unless overridden, is present under /opt/ssfs folder.
om-base:10.0- This is a base runtime image of the Sterling™ Order Management System Software runtime with all the
required components for Sterling Order Management System Software development and testing. When
generating the base image, the following error may occur, if the packages are outdated and are not
compatible for installation. To download the updated packages for installation, set the
REFRESH_RPM_CACHEtotrue, when running thegenerateImages.shscript.Error: Problem 1: conflicting requests - nothing provides ... Problem 2: conflicting requestss - nothing provides .... - The
om-baseimage is not a deployable container and is available to create customizations for your applications and agent features that are outside of the deployment cluster.
om-agent:10.0- This is a light-weight runtime image of the Sterling Order Management System Software runtime with only those components that are required for running the agents or integration servers, and installing the database components, including running the CDT.
om-app:10.0- This is essentially a WebSphere Liberty application server image with the Sterling Order Management System Software EAR added. Starting this image automatically deploys and starts all the installed Sterling Order Management System Software suite of applications.
- The
om-appimage is not generated, when duplicate WAR files are used to generate images. For more information, see Points to remember when duplicate WAR files are used to generate images. - The command in step 1 generates
om-appimage withsmcfs,sbc,sma,isccs, andwsc. For IBM® Sterling Store Engagement (Next-generation), pass an additional argument--WAR_FILESwithisfand otherWARnames as required. For more information about WAR_FILES, see Generate deployment patterns.Note: For deploying by using the Operator, onlyom-agentandom-appimages are required to push to the registry.
Remember:- For the images with tag
10.0.2306.0-amd64and later, the application servers useLibertyprofile by default in the directory structure. As a result, all the backend JAR files that were previously located in the /config/dropins/smcfs.ear directory are located in the /config/dropins/smcfs.ear/lib directory. Ensure to update the configuration and references to reflect in the new directory structure, if needed. TheLibertyprofile can be turned off by setting the--LIBERTY-PROFILE=falsewhen you run the./generateImages.shscript.
- To learn about the available parameters, run the following command:
./generateImages.sh --help - To copy the generated image from the container that is present under
/opt/ssfsfolder to your local machine, use the dockercpcommand.docker cp container_id:/opt/ssfs/<image_file> - To push the tar file to your cluster, complete the following steps:
- To make the
*.taravailable outside the container, copy the generated*.tarimage files from /opt/ssfs to /opt/ssfs/shared folder. - Move the om-app and om-agent image tar files to the master node where OpenShift® Container Platform is installed.
- To push your images directly from customization runtime, see Loading the custom images to the platform.
- For more information about the deployment patterns, generating differential images, advanced image build options, and combining the image build modes, see Advanced image build options.
- To make the
- If
generateImages.shscript fails with errors, which relates to image pull connectivity issues,Hardcode DNS server in docker daemon.json in RHEL server, by completing following steps.- Edit
/etc/docker/daemon.json
{ "dns": ["10.1.2.3", "8.8.8.8"] } - Restart the docker daemon for those changes to take
effect.
sudo systemctl restart dockerWhen the container is run or started, the docker populates /etc/resolv.conf with the values from daemon.json.
- Edit
/etc/docker/daemon.json