Uploading Metric Insights Docker Images to a Private Registry

If there is a requirement to use a private docker registry, we can use two possible methods to get 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)

Continue below to review both methods, along with steps to:

 

Note: Depending on the type of private registry you use, how you upload the images might differ. For example, some provide a GUI in which to upload 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 (contact [email protected] for access).

Once you have credentials to pull docker images from the registry, you have to identify the exact version of the target image in order to pull from the registry. 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 don't need the install package.

Below is an example of the build.properties file for Metric Insights version 6.1.0. The target images are web (mi-application), seed (dataprocessor-seed), data-analyzer, dataprocessor, etc.

root@server:~# ls -lh
total 1.9G
-rw-r--r-- 1 root root 1.9G Nov 12 23:35 MetricInsights-Installer-v6.1.0-Full.tar.gz
root@server:~# tar -zxf MetricInsights-Installer-v6.1.0-Full.tar.gz
root@server:~# ls -l
drwxrwxrwx 6 root root       4096 Nov 11 19:33 MetricInsights-Installer-v6.1.0-Full
-rw-r--r-- 1 root root 1937317291 Nov 12 23:35 MetricInsights-Installer-v6.1.0-Full.tar.gz
root@server:~# cd MetricInsights-Installer-v6.1.0-Full/
root@server:~/MetricInsights-Installer-v6.1.0-Full# cat build.properties 
...
web=docker.metricinsights.com:5002/mi-application/release_6_1/543
seed=docker.metricinsights.com:5002/dataprocessor-seed-node/release_6_1/118
data-analyzer=docker.metricinsights.com:5002/data-analyzer/release_6_1/10
dataprocessor=docker.metricinsights.com:5002/dataprocessor/release_6_1/118
...
Click to copy

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

Once the target images have been pulled from Metric Insights' docker registry, they have to be retagged and pushed into your private registry. Go to step #3 on how to do this.

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 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's 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, example: tar xf MetricInsights-Installer-v6.1.0-Full.tar.gz
  3. Go to the data subfolder, example: cd MetricInsights-Installer-v6.1.0-Full/data
  4. List all the docker images in the data subfolder: ls -l

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

3. Upload docker images to local docker subsystem

Before we retag the docker images, we must 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

Here's a docker load example for v6.1.0 docker images:

root@server:~/# cd MetricInsights-Installer-v6.1.0-Full/data/
root@server:~/MetricInsights-Installer-v6.1.0-Full/data#  ls -1 *.gz
data_analyzer.docker.image.gz
dataprocessor.docker.image.gz
metric-insights.docker.image.gz
seed.docker.image.gz
...
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# gunzip -c data_analyzer.docker.image.gz | docker load
503e53e365f3: Loading layer [==================================================>]  5.793MB/5.793MB
35e69abd31ba: Loading layer [==================================================>]  818.7kB/818.7kB
01234f01aa77: Loading layer [==================================================>]  77.43MB/77.43MB
31f774dbb6c4: Loading layer [==================================================>]  4.608kB/4.608kB
91ffefccd2f7: Loading layer [==================================================>]  6.463MB/6.463MB
8e5f2b524a45: Loading layer [==================================================>]  2.048kB/2.048kB
15f4d36a1d6a: Loading layer [==================================================>]  17.16MB/17.16MB
335a7063cb00: Loading layer [==================================================>]  40.45kB/40.45kB
Loaded image: docker.metricinsights.com:5002/data-analyzer/release_6_1/10:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# gunzip -c dataprocessor.docker.image.gz | docker load
6270adb5794c: Loading layer [==================================================>]  58.45MB/58.45MB
270b3f9af07e: Loading layer [==================================================>]  1.428MB/1.428MB
f5d98c1f9470: Loading layer [==================================================>]  3.584kB/3.584kB
b61c7ac22d6e: Loading layer [==================================================>]  3.584kB/3.584kB
1654ace8426e: Loading layer [==================================================>]  1.536kB/1.536kB
5ddd7da5e509: Loading layer [==================================================>]    218MB/218MB
a2ddb0d10e64: Loading layer [==================================================>]  502.3MB/502.3MB
98b34407e17b: Loading layer [==================================================>]  5.134MB/5.134MB
36a1ea445a39: Loading layer [==================================================>]  23.48MB/23.48MB
22fee13a749a: Loading layer [==================================================>]  17.92kB/17.92kB
94e77add7a67: Loading layer [==================================================>]   7.68kB/7.68kB
0bed9de3c7d6: Loading layer [==================================================>]  560.2MB/560.2MB
Loaded image: docker.metricinsights.com:5002/dataprocessor/release_6_1/118:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# gunzip -c metric-insights.docker.image.gz | docker load
97041f29baff: Loading layer [==================================================>]  105.6MB/105.6MB
b79b7ea2746c: Loading layer [==================================================>]  857.1MB/857.1MB
ae6f863f6e4a: Loading layer [==================================================>]  4.096kB/4.096kB
eab0a35f8804: Loading layer [==================================================>]  71.19MB/71.19MB
de74bccb9bb3: Loading layer [==================================================>]  260.3MB/260.3MB
6b6e00f55163: Loading layer [==================================================>]  5.164MB/5.164MB
308b5e9c959e: Loading layer [==================================================>]   2.56kB/2.56kB
74ed131952f5: Loading layer [==================================================>]  41.27MB/41.27MB
84d78256dfee: Loading layer [==================================================>]  280.1kB/280.1kB
ffb6cb1d1a4b: Loading layer [==================================================>]    405kB/405kB
898e44d8ae73: Loading layer [==================================================>]  29.82MB/29.82MB
b2a6b807e5f5: Loading layer [==================================================>]  158.8MB/158.8MB
6c87a16128cd: Loading layer [==================================================>]  10.52MB/10.52MB
b05ca211d442: Loading layer [==================================================>]  401.6MB/401.6MB
341d020d8cf1: Loading layer [==================================================>]   4.82MB/4.82MB
8e41e3d83b17: Loading layer [==================================================>]  3.584kB/3.584kB
2590310c73ee: Loading layer [==================================================>]  27.14kB/27.14kB
678db895ccc4: Loading layer [==================================================>]   12.8kB/12.8kB
b8d8c222b205: Loading layer [==================================================>]  3.072kB/3.072kB
ff9f903f7bfe: Loading layer [==================================================>]  30.21kB/30.21kB
beb28ea73632: Loading layer [==================================================>]  31.74kB/31.74kB
4f200ae35f9f: Loading layer [==================================================>]   7.68kB/7.68kB
fb29389b3361: Loading layer [==================================================>]  3.584kB/3.584kB
Loaded image: docker.metricinsights.com:5002/mi-application/release_6_1/543:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# gunzip -c seed.docker.image.gz | docker load
3b5ca8c687aa: Loading layer [==================================================>]  44.97MB/44.97MB
8e28b0cfa07b: Loading layer [==================================================>]  12.29kB/12.29kB
c1f7eb747b4d: Loading layer [==================================================>]  4.608kB/4.608kB
bed614f14048: Loading layer [==================================================>]  20.95MB/20.95MB
Loaded image: docker.metricinsights.com:5002/dataprocessor-seed-node/release_6_1/118:latest
Click to copy

4. Retag the docker images

Once all required docker images have been uploaded into the local docker subsystem, we have to retag them using the docker tag command. This is required before we can push into the local registry because the name has to reflect the registry URL from which we'll be pulling the images for orchestrated deployment.

In this example, the local 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>

Here's an example for v6.1.0 where we retag then list the docker images to confirm the name change:

root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker tag docker.metricinsights.com:5002/data-analyzer/release_6_1/10:latest 127.0.0.1:5001/data-analyzer/release_6_1/10:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker tag docker.metricinsights.com:5002/dataprocessor/release_6_1/118:latest 127.0.0.1:5001/dataprocessor/release_6_1/118:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker tag docker.metricinsights.com:5002/dataprocessor-seed-node/release_6_1/118:latest 127.0.0.1:5001/dataprocessor-seed-node/release_6_1/118:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker tag docker.metricinsights.com:5002/mi-application/release_6_1/543:latest 127.0.0.1:5001/mi-application/release_6_1/543:latest
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker images | grep 127.0.0.1
127.0.0.1:5001/mi-application/release_6_1/543                            latest              3480bca27d2f        3 days ago          1.89GB
127.0.0.1:5001/dataprocessor-seed-node/release_6_1/118                   latest              92ecc1e74a57        3 days ago          339MB
127.0.0.1:5001/dataprocessor/release_6_1/118                             latest              4685738423a7        3 days ago          1.36GB
127.0.0.1:5001/data-analyzer/release_6_1/10                              latest              f715f2f16390        7 weeks ago         103MB
Click to copy

5. Push docker images into your local Private Registry

With the docker images retagged, you can now push/upload the images to your local private registry. Simple use the docker push command: docker push <docker-image>

Here's an example for v6.1.0 where we push the retagged docker image into the local private registry:

root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker push 127.0.0.1:5001/mi-application/release_6_1/543:latest
The push refers to repository [127.0.0.1:5001/mi-application/release_6_1/543]
fb29389b3361: Pushed 
4f200ae35f9f: Pushed 
beb28ea73632: Pushed 
ff9f903f7bfe: Pushed 
b8d8c222b205: Pushed 
678db895ccc4: Pushed 
2590310c73ee: Pushed 
8e41e3d83b17: Pushed 
341d020d8cf1: Pushed 
b05ca211d442: Pushed 
6c87a16128cd: Pushed 
b2a6b807e5f5: Pushed 
898e44d8ae73: Pushed 
ffb6cb1d1a4b: Pushed 
84d78256dfee: Pushed 
74ed131952f5: Pushed 
308b5e9c959e: Pushed 
6b6e00f55163: Pushed 
de74bccb9bb3: Pushed 
eab0a35f8804: Pushed 
ae6f863f6e4a: Pushed 
b79b7ea2746c: Pushed 
97041f29baff: Pushed 
latest: digest: sha256:75ef3f88feefd66dc170c5fab79714b0865a686b5a28a7a1d05508c8e7b14418 size: 5142
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker push 127.0.0.1:5001/dataprocessor-seed-node/release_6_1/118:latest
The push refers to repository [127.0.0.1:5001/dataprocessor-seed-node/release_6_1/118]
bed614f14048: Pushed 
c1f7eb747b4d: Pushed 
8e28b0cfa07b: Pushed 
3b5ca8c687aa: Pushed 
5ddd7da5e509: Pushed 
1654ace8426e: Pushed 
b61c7ac22d6e: Pushed 
f5d98c1f9470: Pushed 
270b3f9af07e: Pushed 
6270adb5794c: Pushed 
latest: digest: sha256:587c8db20029c0e0d1319f6c965ab07ab90285e592a339b2d1a020916399de4c size: 2412
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker push 127.0.0.1:5001/dataprocessor/release_6_1/118
The push refers to repository [127.0.0.1:5001/dataprocessor/release_6_1/118]
0bed9de3c7d6: Pushed 
94e77add7a67: Pushed 
22fee13a749a: Pushed 
36a1ea445a39: Pushed 
98b34407e17b: Pushed 
a2ddb0d10e64: Pushed 
5ddd7da5e509: Mounted from dataprocessor-seed-node/release_6_1/118 
1654ace8426e: Mounted from dataprocessor-seed-node/release_6_1/118 
b61c7ac22d6e: Mounted from dataprocessor-seed-node/release_6_1/118 
f5d98c1f9470: Mounted from dataprocessor-seed-node/release_6_1/118 
270b3f9af07e: Mounted from dataprocessor-seed-node/release_6_1/118 
6270adb5794c: Mounted from dataprocessor-seed-node/release_6_1/118 
latest: digest: sha256:44a20b0037da694337280805ba4ac2f0ab70f6b4bb39c28b1283d4bf4ce6e1b5 size: 2836
root@server:~/MetricInsights-Installer-v6.1.0-Full/data# docker push 127.0.0.1:5001/data-analyzer/release_6_1/10
The push refers to repository [127.0.0.1:5001/data-analyzer/release_6_1/10]
335a7063cb00: Pushed 
15f4d36a1d6a: Pushed 
8e5f2b524a45: Pushed 
91ffefccd2f7: Pushed 
31f774dbb6c4: Pushed 
01234f01aa77: Pushed 
35e69abd31ba: Pushed 
503e53e365f3: Pushed 
latest: digest: sha256:6a9a3bb38847f6d31c3242f1eb1d20e49dc1f30ff8b3f20e17e0c069b6bc4b6f size: 1994
Click to copy

For any questions, please contact [email protected]