Image Mirroring¤
We recommend the use of two-phase mirroring in most cases, it is slower than direct mirroring and requires more storage capacity, but can allow you to more easily recover from network glitches and creates a clean seperation of the tasks of getting the content from the source registry and putting it into the target registry which can make debugging failures easier.
This guide assumes that you are looking to mirror content for the latest release (9.0.x) from the most recent catalog update (v9-250206-amd64), and that you are installing all MAS applications & dependencies. If you are not installing certain applications or dependencies take care to remove the appropriate --mirror-x
flags to avoid mirroring unnecessary images.
By default image repositories will be prefixed using the datestamp of the Maximo Operator Catalog that you are mirroring from, this allows for simpler registry management, you can prune all images under mas-241105/*
in your mirror registry once you know that you have updated all clusters to a newer version of the catalog.
Usage¤
For full usage information run mas mirror-images --help
Interactive Image Mirroring¤
You can start image mirroring by running the mas mirror-images
command with no parameters, you will be prompted to select the mirror mode and working directory, configure the target registry, and select which content you wish to mirror.
The easiest way to do this is using the MAS CLI container image as below:
LOCAL_DIR=/home/david/mirrorfiles
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images
Non-Interactive Image Mirroring¤
This guide will take you through we mirror images in our own development environment, breaking up the task into 4 distinct stages to further break down the work and make it easier to address any problems by providing clear milestones:
- Preparation
- IBM Maximo Application Suite Core
- IBM Maximo Applications
- IBM Cloud Pak for Data
- Other Dependencies
Preparation¤
Set the following environment variables that will be used in each stage:
export IBM_ENTITLEMENT_KEY=xxx
export LOCAL_DIR=xxx
export REGISTRY_HOST=xxx
export REGISTRY_PORT=xxx
export REGISTRY_USERNAME=xxx
export REGISTRY_PASSWORD=xxx
If you do not have a single system with both access to the public source registries and your internal private registry then you will require a system with internet connectivity and another with access to your private network, along with a means to transfer data from one to the other (for example, a portable drive).
In this scenario, we must also transfer the CLI image to your local registry:
oc image mirror --dir $LOCAL_DIR/cli quay.io/ibmmas/cli:13.3.0 file://ibmmas/cli:13.3.0
Transfer the content of $LOCAL_DIR/cli
to your system within the private network and transfer the image to your mirror registry.
docker login $REGISTRY_HOST:$REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD
oc image mirror --dir $LOCAL_DIR/cli file://ibmmas/cli:13.3.0 $REGISTRY_HOST:$REGISTRY_PORT/ibmmas/cli:13.3.0
Stage 1 - Core¤
Let's start simple and just get the MAS Core and IBM Maximo Operator Catalog mirrored to the registry, this shouldn't take long and provides an early measure of the download and upload performance to help estimate the time to complete the larger stages.
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m direct -d /mnt/registry/core \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-catalog --mirror-core \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m to-filesystem -d /mnt/registry/core \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-catalog --mirror-core \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/core \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-catalog --mirror-core
Transfer the contents of $LOCAL_DIR/core
to your system in the private network and run the second phase using the CLI image that was mirrored to your private registry during preparation.
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry $REGISTRY_HOST:$REGISTRY_PORT/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/core \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-catalog --mirror-core
Stage 2 - Apps¤
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m direct -d /mnt/registry/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m to-filesystem -d /mnt/registry/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection
Transfer the contents of $LOCAL_DIR/apps
to your system in the private network and run the second phase using the CLI image that was mirrored to your private registry during preparation.
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry $REGISTRY_HOST:$REGISTRY_PORT/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/apps \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-assist --mirror-iot --mirror-manage --mirror-icd --mirror-monitor --mirror-optimizer --mirror-predict --mirror-visualinspection
Stage 3 - CP4D¤
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m direct -d /mnt/registry/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m to-filesystem -d /mnt/registry/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos
Transfer the contents of $LOCAL_DIR/cp4d
to your system in the private network and run the second phase using the CLI image that was mirrored to your private registry during preparation.
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry $REGISTRY_HOST:$REGISTRY_PORT/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/cp4d \
-H $REGISTRY_HOST -P $REGISTRY_PORT- u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-cp4d --mirror-spark --mirror-wml --mirror-wsl --mirror-cognos
Stage 4 - Other Dependencies¤
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m direct -d /mnt/registry/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m to-filesystem -d /mnt/registry/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect \
--ibm-entitlement $IBM_ENTITLEMENT_KEY
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry quay.io/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect
Transfer the contents of $LOCAL_DIR/other
to your system in the private network and run the second phase using the CLI image that was mirrored to your private registry during preparation.
docker run -ti --rm -v $LOCAL_DIR:/mnt/registry $REGISTRY_HOST:$REGISTRY_PORT/ibmmas/cli:13.3.0 mas mirror-images \
-m from-filesystem -d /mnt/registry/other \
-H $REGISTRY_HOST -P $REGISTRY_PORT -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD \
-c v9-250206-amd64 -C 9.0.x \
--mirror-mongo --mirror-tsm --mirror-sls --mirror-cfs --mirror-db2 --mirror-appconnect
Storage Requirements¤
As of MAS 8.10 (June 2023) the total capacity requirement to mirror content from the IBM Maximo Operator Catalog is approximately 484G, the following table can be used to determine the approximate storage requirement for your mirrored content based on what content you need to mirror:
Maximo Application Suite | Command Flag | Size |
---|---|---|
Maximo Operator Catalog | --mirror-catalog |
50M |
Maximo Application Suite Core | --mirror-core |
4G |
Maximo Assist | --mirror-assist |
5G |
Maximo IoT | --mirror-iot |
9G |
Maximo Manage | --mirror-manage |
8G |
Maximo Monitor | --mirror-monitor |
17G |
Maximo Optimizer | --mirror-optimizer |
3G |
Maximo Predict | --mirror-predict |
6G |
Maximo Visual Inspection | --mirror-visualinspection |
40G |
Total | 92G |
IBM Cloud Pak for Data | Command Flag | Size |
---|---|---|
IBM CP4D Platform | --mirror-cp4d |
2G |
IBM Analytics Engine (Spark) | --mirror-spark |
54G |
IBM Watson Machine Learning | --mirror-wml |
91G |
IBM Watson Studio Local | --mirror-wsl |
85G |
Total | 273G |
Other Dependencies | Command Flag | Size |
---|---|---|
Mongo Community Edition | --mirror-mongo |
500M |
IBM Truststore Manager | --mirror-tsm |
1G |
IBM Suite License Service | --mirror-sls |
1G |
IBM Cloud Pak Foundation Services | --mirror-cfs |
21G |
IBM AppConnect | --mirror-appconnect |
13G |
IBM Db2 | --mirror-db2 |
73G |
Total | 117G |
Note
The total capacity used on the filesystem in the target mirror registry itself may be lower than this due to the use of shared image layers, particularly across applications in IBM Maximo Application Suite itself.