Azure Container Registry with Launchpad
This chapter discusses preparing Azure Container Registry (ACR) for use with Kubernetes.
Page Contents
Overview
You can use Azure Container Registry (ACR) to store the images necessary for running when using Stardog Launchpad with Kubernetes.
Our goal in this tutorial is to do the following:
-
Show the commands needed to prepare Azure Container Registry for use with Stardog Launchpad.
-
Show the commands help to show when automating in a CI/CD pipeline.
This page only covers how to set up Azure Container Registry via the CLI.
Prerequisites
Commands:
Setup
Setting up the environment
Log in to Azure using the instructions found here.
Set the following environment variables:
Creating an ACR
To create an ACR, run the following command:
Your ACR name must be globally unique. You can check if your ACR already exists with the following command:
This command does the following:
az acr list
: Gets a list of all the container registries for the logged-in account.jq -r
: Processes the output as raw strings.--arg name $ACR_NAME
sets a variable insidejq
’s environment.'.[]
iterates over the entire list of registries returned byaz acr list
.select (...)
: Uses a filter to match the registry whose name we stored in.name
(which is set to the value of$ACR_NAME
).
Pushing images to the ACR
Pushing the Stardog image to the ACR
The following command will push the current version of Stardog to your ACR:
If you need to edit your Dockerfile, contact your CSM to get the base Stardog Dockerfile and adjust as needed. From there, you can build the image and push it to your ACR like so:
You can check if an image already exists with the following command:
This command does the following:
az acr repository list --name $ACR_NAME --output json
: Lists, as JSON, all the repositories in our registry.jq -r --arg image stardog/dev-server 'any(.[]; . == $image)'
: Checks to see if any of the repositories are named “stardog/dev-server”, which is what we named our Stardog image in the previous step.
Pushing the Launchpad image to the ACR
The following command will push the current version of Launchpad to your ACR:
Cleaning up
You can now delete your Azure resource group via the following command: