Skip to content

Commit

Permalink
update pipeline yaml and introduce dry-run
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle committed Dec 12, 2024
1 parent 19b4c34 commit 1b3ac57
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
4 changes: 0 additions & 4 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ clouds:
regionalDNSSubdomain: '{{ .ctx.regionShort }}'
# Maestro
maestro:
imageBase: quay.io/clyang82/maestro
imageTag: entra
serverMqttClientName: 'maestro-server-{{ .ctx.regionShort }}'
postgres:
deploy: true
# Frontend
frontend:
cosmosDB:
Expand Down
15 changes: 6 additions & 9 deletions maestro/server/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
SHELL = /bin/bash
DEPLOY_ENV ?= personal-dev
$(shell ../../templatize.sh $(DEPLOY_ENV) config.tmpl.mk config.mk)
include config.mk
-include ../../setup-env.mk

deploy:
kubectl create namespace maestro --dry-run=client -o json | kubectl apply -f -
ISTO_VERSION=$(shell az aks show -n ${AKS_NAME} -g ${SVC_RG} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
kubectl label namespace maestro "istio.io/rev=$${ISTO_VERSION}" --overwrite=true
EVENTGRID_HOSTNAME=$(shell az resource show -n ${EVENTGRID_NAME} -g ${REGION_RG} --resource-type "Microsoft.EventGrid/namespaces" --query properties.topicSpacesConfiguration.hostname -o tsv) && \
@kubectl create namespace maestro --dry-run=client -o json | kubectl apply -f -
@ISTO_VERSION=$(shell az aks show -n ${AKS_NAME} -g ${SVC_RG} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \
kubectl label ${KUBECTL_DRY_RUN} namespace maestro "istio.io/rev=$${ISTO_VERSION}" --overwrite=true
@EVENTGRID_HOSTNAME=$(shell az resource show -n ${EVENTGRID_NAME} -g ${REGION_RG} --resource-type "Microsoft.EventGrid/namespaces" --query properties.topicSpacesConfiguration.hostname -o tsv) && \
TENANT_ID=$(shell az account show --query tenantId --output tsv) && \
MAESTRO_MI_CLIENT_ID=$(shell az identity show -g "${SVC_RG}" -n maestro-server --query clientId -o tsv) && \
DATABASE_HOST=$$(if [ "${USE_AZURE_DB}" = "true" ]; then az postgres flexible-server show -g ${SVC_RG} -n ${DATABASE_NAME} --query fullyQualifiedDomainName -o tsv; else echo "maestro-db"; fi) && \
OVERRIDES=$$(if [ "${USE_AZURE_DB}" = "true" ]; then echo "azuredb.values.yaml"; else echo "containerdb.values.yaml"; fi) && \
helm upgrade --install maestro-server ./helm \
helm upgrade --install --wait ${HELM_DRY_RUN} maestro-server ./helm \
--namespace maestro \
-f helm/$${OVERRIDES} \
--set broker.host=$${EVENTGRID_HOSTNAME} \
Expand Down
11 changes: 0 additions & 11 deletions maestro/server/config.tmpl.mk

This file was deleted.

13 changes: 11 additions & 2 deletions maestro/server/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
serviceGroup: Microsoft.Azure.ARO.Test
$schema: "pipeline.schema.v1"
serviceGroup: Microsoft.Azure.ARO.HCP.Maestro.Server
rolloutName: Maestro Server Rollout
resourceGroups:
- name: {{ .svc.rg }}
Expand All @@ -8,6 +9,12 @@ resourceGroups:
- name: deploy
action: Shell
command: make deploy
dryRun:
variables:
- name: HELM_DRY_RUN
value: "--dry-run=server --debug"
- name: KUBECTL_DRY_RUN
value: "--dry-run=server"
variables:
- name: EVENTGRID_NAME
configRef: maestro.eventGrid.name
Expand All @@ -22,7 +29,9 @@ resourceGroups:
- name: IMAGE_TAG
configRef: maestro.imageTag
- name: USE_AZURE_DB
configRef: maestroPostgresDeploy
configRef: maestro.postgres.deploy
- name: DATABASE_NAME
configRef: maestro.postgres.name
- name: ISTIO_RESTRICT_INGRESS
configRef: maestro.restrictIstioIngress
- name: KEYVAULT_NAME
Expand Down

0 comments on commit 1b3ac57

Please sign in to comment.