Set up a Docker registry¶
Prepare a Docker registry on the Internet-connected machine that contains all of the images that are necessary to install MSR. Kubernetes will pull the required images from this registry to the offline nodes during the installation of the prerequisites and MSR.
On the Internet-connected machine, set up a Docker registry that the offline Kubernetes cluster can access using a private IP address. For more information, refer to Docker official documentation: Deploy a registry server.
Add the
msrofficial
,postgres-operator
, andjetstack
Helm repositories:helm repo add msrofficial https://registry.mirantis.com/charts/msr/msr helm repo add postgres-operator https://opensource.zalando.com/postgres-operator/charts/postgres-operator helm repo add jetstack https://charts.jetstack.io helm repo update
Obtain the names of all the images that are required for installing MSR from the desired version of the Helm charts, for MSR, postgres-operator, and cert-manager. You can do this by templating each chart and grepping for
image:
:helm template msr msrofficial/msr \ --version=<msr-chart-version> \ --api-versions=acid.zalan.do/v1 \ --api-versions=cert-manager.io/v1 | grep image: helm template postgres-operator postgres-operator/postgres-operator \ --version 1.7.1 \ --set configKubernetes.spilo_runasuser=101 \ --set configKubernetes.spilo_runasgroup=103 \ --set configKubernetes.spilo_fsgroup=103 | grep image: helm template cert-manager jetstack/cert-manager \ --version 1.7.2 \ --set installCRDs=true | grep image:
Pull the images listed in the previous step.
Tag each image, including its original namespace, in preparation for pushing the image to the Docker registry. For example:
docker tag registry.mirantis.com/msr/msr-api:<msr-version> <registry-ip>/msr/msr-api:<msr-version>
Push all the required images to the Docker registry. For example:
docker push <registry-ip>/msr/msr-api:<msr-version>
Create the following YAML files, which you will reference to override the image repository information that is contained in the Helm charts used for MSR installation:
my_msr_values.yaml
:imageRegistry: <registry-ip> enzi: image: registry: <registry-ip> rethinkdb: image: registry: <registry-ip>
my_postgres_values.yaml
:image: registry: <registry-ip> configGeneral: docker_image: <registry-ip>/acid/spilo-14:<version> configLogicalBackup: logical_backup_docker_image: <registry-ip>/acid/logical-backup:<version> configConnectionPooler: connection_pooler_image: <registry-ip>/acid/pgbouncer:<version>
my_certmanager_values.yaml
:image: registry: <registry-ip> repository: jetstack/cert-manager-controller webhook: image: registry: <registry-ip> repository: jetstack/cert-manager-webhook cainjector: image: registry: <registry-ip> repository: jetstack/cert-manager-cainjector startupapicheck: image: registry: <registry-ip> repository: jetstack/cert-manager-ctl