Mirror Images to Internal Registry¶
To be able to deploy Arrikto EKF in an air gapped environment, you have to mirror all the necessary images to an internal registry. This guide will walk you through mirroring the required images to either a private Amazon Elastic Container Registry (ECR), or an internal, self-hosted container registry.
Overview
What You’ll Need¶
- A configured management environment.
- Access to Arrikto’s Private Registry.
- Your clone of the Arrikto GitOps repository.
- Access to local Docker or running in a Docker-in-Docker environment on Kubernetes.
- Access to https://gcr.io/.
- Sufficient space (about 100 GB) for storing all images.
Procedure¶
Switch to your management environment.
Configure Docker to access Arrikto’s private registry:
root@rok-tools:~# mkdir -p ~/.docker root@rok-tools:~# cp ~/ops/deployments/deploy/dockerconfig.json ~/.docker/config.jsonConfigure Docker to access your internal registry. Choose one of the following options based on who hosts your internal registry.
root@rok-tools:~# export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text) root@rok-tools:~# export AWS_DEFAULT_REGION=$(aws configure get region) root@rok-tools:~# aws ecr get-login-password | \ > docker login -u AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.comNote
This will use an ephemeral token that will last for 12 hours.
root@rok-tools:~# docker login registry.example.comSwitch to the deployments repository:
root@rok-tools:~# cd ~/ops/deploymentsGet the list of all the necessary images:
root@rok-tools:~/ops/deployments# rok-image-list -o imagesPull the images locally:
root@rok-tools:~/ops/deployments# rok-image-pull --image-list imagesSpecify where you want images to be mirrored, that is the internal registry along with an optional repository prefix. Choose one of the following options based on who hosts your internal registry.
root@rok-tools:~/ops/deployments# export INTERNAL_REGISTRY=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/arriktoroot@rok-tools:~/ops/deployments# export INTERNAL_REGISTRY=registry.example.com/arriktoMirror the images to your internal registry. Choose one of the following options based on who hosts your internal registry.
root@rok-tools:~/ops/deployments# rok-image-mirror --to ${INTERNAL_REGISTRY?} \ > --image-list images \ > --push \ > --create-ecr-repositoriesroot@rok-tools:~/ops/deployments# rok-image-mirror --to ${INTERNAL_REGISTRY?} \ > --image-list images \ > --push(Optional) Save images as tarballs locally:
root@rok-tools:~/ops/deployments# rok-image-mirror --to ${INTERNAL_REGISTRY?} \ > --image-list images \ > --save \ > --save-dir /root/imagesStage the list of images:
root@rok-tools:~/ops/deployments# git add imagesCommit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Track list of images to mirror"