From 2a99acf7958c9a87acad4576a8865b5e467b3e9d Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 19 Sep 2024 14:12:44 +0200 Subject: [PATCH] Use the local registry in the nutshell deployment (#2473) Signed-off-by: Christian Berendt --- scripts/deploy-in-a-nutshell.sh | 3 --- scripts/set-docker-registry.sh | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/deploy-in-a-nutshell.sh b/scripts/deploy-in-a-nutshell.sh index fc5062203..cc33fd082 100755 --- a/scripts/deploy-in-a-nutshell.sh +++ b/scripts/deploy-in-a-nutshell.sh @@ -1,9 +1,6 @@ #!/usr/bin/env bash set -e -# do not use the local registry -sh -c '/opt/configuration/scripts/set-docker-registry.sh' - # pull images sh -c '/opt/configuration/scripts/pull-images.sh' diff --git a/scripts/set-docker-registry.sh b/scripts/set-docker-registry.sh index 3b854a4b8..34b7ca28c 100755 --- a/scripts/set-docker-registry.sh +++ b/scripts/set-docker-registry.sh @@ -2,6 +2,8 @@ set -x set -e +source /opt/manager-vars.sh + DOCKER_REGISTRY=${1:-osism.harbor.regio.digital} sed -i "s#ceph_docker_registry: .*#ceph_docker_registry: ${DOCKER_REGISTRY}#g" /opt/configuration/environments/configuration.yml @@ -10,5 +12,9 @@ sed -i "s#docker_registry_kolla: .*#docker_registry_kolla: ${DOCKER_REGISTRY}#g" sed -i "s#docker_registry_netbox: .*#docker_registry_netbox: ${DOCKER_REGISTRY}#g" /opt/configuration/environments/configuration.yml if [[ "$DOCKER_REGISTRY" == "osism.harbor.regio.digital" ]]; then - sed -i "s/docker_namespace: osism/docker_namespace: kolla/" /opt/configuration/environments/kolla/configuration.yml + if [[ "$MANAGER_VERSION" == "latest" ]]; then + sed -i "s#docker_namespace: osism#docker_namespace: kolla#" /opt/configuration/environments/kolla/configuration.yml + else + sed -i "s#docker_namespace: osism#docker_namespace: kolla/release#" /opt/configuration/environments/kolla/configuration.yml + fi fi