From 341a3cc3f77d4b519ec4ea8c75348b9210da2932 Mon Sep 17 00:00:00 2001 From: Aroosha Pervaiz Date: Mon, 29 Jan 2024 17:20:09 +0100 Subject: [PATCH] Script to automate deployment for dbs services in production. --- kubernetes/cmsweb/scripts/deploy-srv-dbs.sh | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 kubernetes/cmsweb/scripts/deploy-srv-dbs.sh diff --git a/kubernetes/cmsweb/scripts/deploy-srv-dbs.sh b/kubernetes/cmsweb/scripts/deploy-srv-dbs.sh new file mode 100755 index 000000000..8ee1799b0 --- /dev/null +++ b/kubernetes/cmsweb/scripts/deploy-srv-dbs.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Define the target namespace in the new cluster +target_namespace="dbs" + +# Mapping of service names to their full image tags +declare -A service_image_tags=( + ["check-metric"]="registry.cern.ch/cmsweb/check-metric:20220404-stable" + ["dbs2go-global-m"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-global-migration"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-global-r"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-global-w"]="registry.cern.ch/cmsweb/dbs2go:v00.06.43-stable" + ["dbs2go-phys03-m"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-phys03-migration"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-phys03-r"]="registry.cern.ch/cmsweb/dbs2go:v00.06.42-stable" + ["dbs2go-phys03-w"]="registry.cern.ch/cmsweb/dbs2go:v00.06.43-stable" +) + +# Loop through the service names and their full image tags +for service in "${!service_image_tags[@]}"; do + full_image_tag="${service_image_tags[$service]}" + tag_part="${full_image_tag##*:}" + echo "Deploying $service with image tag $tag_part to $target_namespace namespace" + ./deploy-srv.sh "$service" "$tag_part" +done +