Configuring Azure Blob Storage for Integrated Container Image Registry
Overview
This topic reviews how to configure Microsoft Azure Blob Storage for OpenShift integrated container image registry.
Before You Begin
Create a storage container using Microsoft Azure Portal, Microsoft Azure CLI, or Microsoft Azure Storage Explorer. Keep a note of the storage account name, storage account key and container name.
Deploy the integrated container image registry if it is not deployed.
Overriding Registry Configuration
To create a new registry pod and replace the old pod automatically:
Create a new registry configuration file called registryconfig.yaml and add the following information:
version: 0.1
log:
level: debug
http:
addr: :5000
storage:
cache:
blobdescriptor: inmemory
delete:
enabled: true
azure: (1)
accountname: azureblobacc
accountkey: azureblobacckey
container: azureblobname
realm: core.windows.net (2)
auth:
openshift:
realm: openshift
middleware:
registry:
- name: openshift
repository:
- name: openshift
options:
acceptschema2: false
pullthrough: true
enforcequota: false
projectcachettl: 1m
blobrepositorycachettl: 10m
storage:
- name: openshift
1 Replace the values for accountname
,acountkey
, andcontainer
with storage account name, storage account key, and storage container name respectively.2 If using Azure regional cloud, set to the desired realm. For example, core.cloudapi.de
for the Germany regional cloud.Create a new registry configuration:
$ oc create secret generic registry-config --from-file=config.yaml=registryconfig.yaml
Add the secret:
$ oc set volume dc/docker-registry --add --type=secret \
--secret-name=registry-config -m /etc/docker/registry/
Set the
REGISTRY_CONFIGURATION_PATH
environment variable:$ oc set env dc/docker-registry \
REGISTRY_CONFIGURATION_PATH=/etc/docker/registry/config.yaml
If you already created a registry configuration:
Delete the secret:
$ oc delete secret registry-config
Create a new registry configuration:
$ oc create secret generic registry-config --from-file=config.yaml=registryconfig.yaml
Update the configuration by starting a new rollout:
$ oc rollout latest docker-registry