Importing Container Images
Pulling Images from Hazy Container Registry¶
Hazy will have provided you with login information which will allow you to pull from Hazy's customer facing container registry
# in production environments you should be careful not to leave the credentials in # the shell history $ export HAZY_CR_USERNAME=northwindtraders $ export HAZY_CR_PASSWORD=verysecret $ echo "$HAZY_CR_PASSWORD" | docker login -u $HAZY_CR_USERNAME --password-stdin hazyrelease.azurecr.io
Kubernetes has various mechanisms to import private registry credentials:
# in production environments you should be careful not to leave the credentials in # the shell history $ export HAZY_CR_USERNAME=northwindtraders $ export HAZY_CR_PASSWORD=verysecret $ kubectl create secret docker-registry hazy-registry-secret \ --docker-server=hazyrelease.azurecr.io \ --docker-username="$HAZY_CR_USERNAME" \ --docker-password="$HAZY_CR_PASSWORD"
Extracting from an Archive¶
Your Hub and Synthesiser Docker images will be provided in a single archive file, alongside instructions and some simple utility scripts for unpacking and importing the images into your container runtime.
As part of installation, you will have received a SHA256 signature for the archive. You should check the file you received against this SHA in order to protect yourself from data corruption:
# e.g. $ echo "ffa975e0794eed8baca37b894e2cf2e689c354cd8ea5980dc2c80b18f96ac37b hazy-20210512154012.tar.gz" | sha256sum -c - hazy-20210512154012.tar.gz: OK
Now that you have verified the installation archive, you should extract the files using TAR:
$ tar xzvf hazy-20210512154012.tar.gz
You should now have a
hazy directory which contains a
install.sh file. This is a convenience script that (re-) verifies the integrity of the recieved file and then imports the Hub container image into Docker or Podman.
Some installations will require root access in order to run
docker commands. In this case prepend all commands with
sudo (or run as root).
# Import the Hub container image into Docker $ ./hazy/install.sh docker # Import the Hub container image into Podman $ ./hazy/install.sh podman
Push to a Container Registry¶
To make the Hazy container images more widely available within your organisation, or to move the Synthesiser image into the secure environment, you should push the newly imported Hazy images to your container registry:
# replace `docker` with `podman` for the Podman version $ docker tag hazy/hub:20210512154012 registry.northwindtraders.com/hazy/hub:20210512154012 $ docker tag hazy/hub:20210512154012 registry.northwindtraders.com/hazy/hub:latest $ docker tag hazy/tabular-synthesiser:20210512154012 registry.northwindtraders.com/hazy/tabular-synthesiser:20210512154012 $ docker tag hazy/tabular-synthesiser:20210512154012 registry.northwindtraders.com/hazy/tabular-synthesiser:latest $ docker login registry.northwindtraders.com -u user --password-stdin $ docker push registry.northwindtraders.com/hazy/hub:20210512154012 $ docker push registry.northwindtraders.com/hazy/hub:latest $ docker push registry.northwindtraders.com/hazy/tabular-synthesiser:20210512154012 $ docker push registry.northwindtraders.com/hazy/tabular-synthesiser:latest