Uploading Metric Insights Docker Images to a Private Registry

This article describes how to obtain the Metric Insights Docker images and upload them to a private Docker registry. The process covers two methods for acquiring the images, loading them into the local Docker subsystem, retagging them, and pushing them to the private registry. The installer also provides an images command that automates the retag and push steps for a custom registry.

To use a private Docker registry, two methods are available to obtain the Metric Insights Docker images and upload them to your private registry:

  1. Pull the images from Metric Insights official Docker Registry
  2. Extract the images from Metric Insights' Full Installation Package (tarball)

Both methods are reviewed below, along with steps to:

NOTE: Depending on the type of private registry you use, the upload method might differ. For example, some registries provide a GUI for uploading images. The steps provided here are a general approach.

1. Pull the Images from Metric Insights Official Docker Registry

Metric Insights' official Docker registry is docker.metricinsights.com:5002. You must have credentials to pull from the registry; to request access, contact [email protected].

Once you have credentials to pull Docker images from the registry, you must identify the exact version of the target image before pulling. To identify the version, use the build.properties file inside the Metric Insights Installation Package. You can also request this file from Metric Insights support if you do not need the install package.

Below is an example of the build.properties file for Metric Insights version 7.2.1. The target images include web (metric-insights), dataprocessor, data-analyzer, console, redis, and image-generator.

root@server:~# ls -lh
total 1.9G
-rw-r--r-- 1 root root 1.9G Nov 12 23:35 MetricInsights-Installer-v7.2.1-Full.tar.gz
root@server:~# tar -zxf MetricInsights-Installer-v7.2.1-Full.tar.gz
root@server:~# ls -l
drwxrwxrwx 6 root root       4096 Nov 11 19:33 MetricInsights-Installer-v7.2.1-Full
-rw-r--r-- 1 root root 1937317291 Nov 12 23:35 MetricInsights-Installer-v7.2.1-Full.tar.gz
root@server:~# cd MetricInsights-Installer-v7.2.1-Full/
root@server:~/MetricInsights-Installer-v7.2.1-Full# cat build.properties 
...
web=docker.metricinsights.com:5002/metric-insights/release_7_2/621
dataprocessor=docker.metricinsights.com:5002/dataprocessor/release_7_2/118
data-analyzer=docker.metricinsights.com:5002/data-analyzer/release_7_2/10
console=docker.metricinsights.com:5002/console/release_7_2/47
redis=docker.metricinsights.com:5002/redis/release_7_2/12
image-generator=docker.metricinsights.com:5002/image-generator/release_7_2/33
...
Click to copy

Warning: By not acquiring the installation package, you might miss changes to the deployment manifest for that particular release.

Once the target images have been pulled from Metric Insights' Docker registry, they must be retagged and pushed into your private registry. Go to step #3 for instructions.

2. Extract the Images from Metric Insights Full Installation Package (Tarball)

The other option is to extract the Docker images directly from Metric Insights' Full Installation Package. This package can be downloaded from Metric Insights' download site, but a request must be made to [email protected] to acquire the credentials and download link for each new version.

The Full Installation Package is a tarball that consists of all required Docker images and artifacts to deploy Metric Insights, whether that is a single server install or orchestrated. Follow the steps below to extract the images from the installation package:

  1. Download the Full Installation Package to a Linux machine with Docker installed.
  2. Unpack the installer using tar; e.g., tar xf MetricInsights-Installer-v7.2.1-Full.tar.gz.
  3. Go to the data subfolder; e.g., cd MetricInsights-Installer-v7.2.1-Full/data.
  4. List all the Docker images in the data subfolder: ls -l.

Once the Docker images have been identified, the next steps are to upload the Docker images into the local Docker subsystem, retag them, then push them into your private registry.

3. Upload Docker Images to Local Docker Subsystem

Before retagging the Docker images, first load the images into the local Docker subsystem. Use gunzip and the docker load command:

gunzip -c <docker-image>.docker.image.gz | docker load

Below is a docker load example for v7.2.1 Docker images:

root@server:~/# cd MetricInsights-Installer-v7.2.1-Full/data/
root@server:~/MetricInsights-Installer-v7.2.1-Full/data#  ls -1 *.gz
data_analyzer.docker.image.gz
dataprocessor.docker.image.gz
metric-insights.docker.image.gz
console.docker.image.gz
redis.docker.image.gz
image-generator.docker.image.gz
...
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c data_analyzer.docker.image.gz | docker load
503e53e365f3: Loading layer [==================================================>]  5.793MB/5.793MB
...
Loaded image: docker.metricinsights.com:5002/data-analyzer/release_7_2/10:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c dataprocessor.docker.image.gz | docker load
6270adb5794c: Loading layer [==================================================>]  58.45MB/58.45MB
...
Loaded image: docker.metricinsights.com:5002/dataprocessor/release_7_2/118:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c metric-insights.docker.image.gz | docker load
97041f29baff: Loading layer [==================================================>]  105.6MB/105.6MB
...
Loaded image: docker.metricinsights.com:5002/metric-insights/release_7_2/621:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c console.docker.image.gz | docker load
7b12c5683cbb: Loading layer [==================================================>]  12.4MB/12.4MB
...
Loaded image: docker.metricinsights.com:5002/console/release_7_2/47:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c redis.docker.image.gz | docker load
a703af90ec34: Loading layer [==================================================>]  9.8MB/9.8MB
...
Loaded image: docker.metricinsights.com:5002/redis/release_7_2/12:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# gunzip -c image-generator.docker.image.gz | docker load
37a4baf57099: Loading layer [==================================================>]  41.2MB/41.2MB
...
Loaded image: docker.metricinsights.com:5002/image-generator/release_7_2/33:latest
Click to copy

4. Retag the Docker Images

Once all required Docker images have been uploaded into the local Docker subsystem, retag them using the docker tag command. Retagging is required before pushing into the private registry because the name must reflect the registry URL from which the images are pulled for orchestrated deployment.

In this example, the private registry URL is identified by IP over port 5001: 127.0.0.1:5001.

To retag, run the following: docker tag docker.metricinsights.com:5002/<docker-image-name-and-version> localPrivateRegistry/<docker-image-name-and-version>

Below is an example for v7.2.1 where the Docker images are retagged, then listed to confirm the name change:

root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/data-analyzer/release_7_2/10:latest 127.0.0.1:5001/data-analyzer/release_7_2/10:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/dataprocessor/release_7_2/118:latest 127.0.0.1:5001/dataprocessor/release_7_2/118:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/metric-insights/release_7_2/621:latest 127.0.0.1:5001/metric-insights/release_7_2/621:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/console/release_7_2/47:latest 127.0.0.1:5001/console/release_7_2/47:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/redis/release_7_2/12:latest 127.0.0.1:5001/redis/release_7_2/12:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker tag docker.metricinsights.com:5002/image-generator/release_7_2/33:latest 127.0.0.1:5001/image-generator/release_7_2/33:latest
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker images | grep 127.0.0.1
127.0.0.1:5001/metric-insights/release_7_2/621                           latest              3480bca27d2f        3 days ago          1.89GB
127.0.0.1:5001/dataprocessor/release_7_2/118                             latest              4685738423a7        3 days ago          1.36GB
127.0.0.1:5001/data-analyzer/release_7_2/10                              latest              f715f2f16390        7 weeks ago         103MB
127.0.0.1:5001/console/release_7_2/47                                    latest              8f75686db703        3 days ago          210MB
127.0.0.1:5001/redis/release_7_2/12                                      latest              01dce2947d0b        3 days ago          45MB
127.0.0.1:5001/image-generator/release_7_2/33                            latest              fc922c5fe92b        3 days ago          180MB
Click to copy

5. Push Docker Images into Your Local Private Registry

With the Docker images retagged, you can now push the images to your private registry. Use the docker push command:

docker push <docker-image>

Below is an example for v7.2.1 where the retagged Docker image is pushed into the private registry:

root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/metric-insights/release_7_2/621:latest
The push refers to repository [127.0.0.1:5001/metric-insights/release_7_2/621]
fb29389b3361: Pushed 
...
latest: digest: sha256:56498718161b551e5d46075a8f07424ca454926bbb80915cab11113ef0b6bc size: 5142
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/dataprocessor/release_7_2/118
The push refers to repository [127.0.0.1:5001/dataprocessor/release_7_2/118]
0bed9de3c7d6: Pushed 
...
latest: digest: sha256:637229e6219281785ce0ee42475cdbb6c0faa35f936fad6cd594294762a214a size: 2836
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/data-analyzer/release_7_2/10
The push refers to repository [127.0.0.1:5001/data-analyzer/release_7_2/10]
335a7063cb00: Pushed 
...
latest: digest: sha256:deb96a192b6dc2667207cab787f0f303aff884a81e19d71e30c3a588d79f338 size: 1994
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/console/release_7_2/47
The push refers to repository [127.0.0.1:5001/console/release_7_2/47]
7b12c5683cbb: Pushed 
...
latest: digest: sha256:541ed29d50ce72e154545286cecbbb94bbddaf4231d99e2d0e64cda32fd4df4 size: 2318
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/redis/release_7_2/12
The push refers to repository [127.0.0.1:5001/redis/release_7_2/12]
a703af90ec34: Pushed 
...
latest: digest: sha256:4a9e408f5c9332fe91efa7803445d4a033884318cd54908bc0fd49f7861ab21 size: 1246
root@server:~/MetricInsights-Installer-v7.2.1-Full/data# docker push 127.0.0.1:5001/image-generator/release_7_2/33
The push refers to repository [127.0.0.1:5001/image-generator/release_7_2/33]
37a4baf57099: Pushed 
...
latest: digest: sha256:51626b788d8d760b7ae153c36a699a8ca22310f101450396326db90216eddd1 size: 3012
Click to copy

6. Upload Images to a Private Registry Using the Installer

As an alternative to manually loading, retagging, and pushing each image, the Metric Insights installer package includes an images command that automates the retag-and-push steps for a custom registry. Run it from the directory containing installer.py (the root of the extracted installer package).

NOTE: Docker CLI must already be installed and available on the host, and you must already have push access configured for the target registry (for example, via docker login) before running this command.

./installer.py images --docker-registry <registry-host-or-url>
Click to copy

Images Command Options

To see all available options for the images command, run it with --help:

./installer.py images --help
Click to copy

For each component image in the package, the --docker-registry option retags the local image as <registry>/<prefix>/<original-image-path>, pushes the retagged image to the registry, then removes both the original and retagged local images to free up disk space.

FlagDescription
--docker-registry <registry>Required. Target Docker registry to push images to.
--prefix <prefix>Image name prefix under the registry. The default value is metricinsights.
-l, --listLists the package's current Docker images without pushing anything.
--install-dockerInstalls the docker-ce service and its dependencies on localhost first, if Docker isn't already installed.
--include-mysqlIncludes the MySQL Docker image. Needed only for a Simple Installation.
--include-loggerIncludes the logger Docker image.
--use-security-imagesUses the hardened, security-tagged image variants. Available only with the Metric Insights Lite Package and not supported on ARM64.
--dry-runEmulates the retag, push, and cleanup steps without making any changes.
-v, --verboseEnables verbose logging.

NOTES:

  • Run the command with --dry-run first to confirm which images would be retagged and pushed before making any changes.
  • For any questions, contact [email protected].