Skip to content

Commit

Permalink
cleanup deploy scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle committed Oct 25, 2024
1 parent 5eb1345 commit 88dff3b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 77 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ infra.clean:
#

cs.deploy:
cluster-service/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) cluster-service svc

#
# Maestro
#

maestro.server.deploy:
maestro/server/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) maestro/server svc

maestro.agent.deploy:
maestro/agent/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) maestro/agent mgmt

maestro.registration.deploy:
maestro/registration/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) maestro/registration mgmt

maestro: maestro.server.deploy maestro.agent.deploy maestro.registration.deploy

Expand All @@ -83,24 +83,24 @@ maestro: maestro.server.deploy maestro.agent.deploy maestro.registration.deploy
#

rp.frontend.deploy:
frontend/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) frontend svc

rp.backend.deploy:
backend/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) backend svc

#
# ACM
#

acm.deploy:
acm/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) acm svc

#
# Hypershift
#

hypershift.deploy:
hypershift/rollout $(DEPLOY_ENV)
./svc-deploy $(DEPLOY_ENV) hypershift svc

#
# Deploy ALL components
Expand Down
9 changes: 0 additions & 9 deletions backend/rollout

This file was deleted.

11 changes: 0 additions & 11 deletions cluster-service/rollout

This file was deleted.

23 changes: 16 additions & 7 deletions dev-infrastructure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ ifndef SKIP_CONFIRM
PROMPT_TO_CONFIRM = "--confirm-with-what-if"
endif

MGMT_KUBECONFIG_FILE ?= ${HOME}/.kube/${MGMT_RESOURCEGROUP}.kubeconfig
SVC_KUBECONFIG_FILE ?= ${HOME}/.kube/${SVC_RESOURCEGROUP}.kubeconfig

list:
@grep '^[^#[:space:]].*:' Makefile
.PHONY: list
Expand Down Expand Up @@ -175,11 +178,14 @@ svc.aks.admin-access:
.PHONY: svc.aks.admin-access

svc.aks.kubeconfig:
@az aks get-credentials --overwrite-existing --only-show-errors -n ${AKS_NAME} -g $(SVC_RESOURCEGROUP) -f "${HOME}/.kube/${SVC_RESOURCEGROUP}.kubeconfig"
@kubelogin convert-kubeconfig -l azurecli --kubeconfig "${HOME}/.kube/${SVC_RESOURCEGROUP}.kubeconfig"
@echo ${HOME}/.kube/${SVC_RESOURCEGROUP}.kubeconfig
@az aks get-credentials --overwrite-existing --only-show-errors -n ${AKS_NAME} -g $(SVC_RESOURCEGROUP) -f "${SVC_KUBECONFIG_FILE}"
@kubelogin convert-kubeconfig -l azurecli --kubeconfig "${SVC_KUBECONFIG_FILE}"
.PHONY: svc.aks.kubeconfig

svc.aks.kubeconfigfile:
@echo ${SVC_KUBECONFIG_FILE}
.PHONY: svc.aks.kubeconfigfile

svc.init: svc svc.aks.admin-access svc.aks.kubeconfig svc.enable-aks-metrics
.PHONY: svc.init

Expand Down Expand Up @@ -237,12 +243,15 @@ mgmt.aks.admin-access:
@scripts/aks-admin-access.sh $(MGMT_RESOURCEGROUP)
.PHONY: mgmt.aks.admin-access

mgmt.aks.kubeconfig:
@az aks get-credentials --overwrite-existing --only-show-errors -n ${AKS_NAME} -g $(MGMT_RESOURCEGROUP) -f "${HOME}/.kube/${MGMT_RESOURCEGROUP}.kubeconfig"
@kubelogin convert-kubeconfig -l azurecli --kubeconfig "${HOME}/.kube/${MGMT_RESOURCEGROUP}.kubeconfig"
@echo ${HOME}/.kube/${MGMT_RESOURCEGROUP}.kubeconfig
mgmt.aks.kubeconfig: mgmt.aks.kubeconfigfile
@az aks get-credentials --overwrite-existing --only-show-errors -n ${AKS_NAME} -g $(MGMT_RESOURCEGROUP) -f "${MGMT_KUBECONFIG_FILE}"
@kubelogin convert-kubeconfig -l azurecli --kubeconfig "${MGMT_KUBECONFIG_FILE}"
.PHONY: mgmt.aks.kubeconfig

mgmt.aks.kubeconfigfile:
@echo ${MGMT_KUBECONFIG_FILE}
.PHONY: mgmt.aks.kubeconfigfile

mgmt.init: mgmt mgmt.aks.admin-access mgmt.aks.kubeconfig mgmt.enable-aks-metrics
.PHONY: mgmt.init

Expand Down
9 changes: 0 additions & 9 deletions frontend/rollout

This file was deleted.

11 changes: 0 additions & 11 deletions maestro/agent/rollout

This file was deleted.

11 changes: 0 additions & 11 deletions maestro/registration/rollout

This file was deleted.

11 changes: 0 additions & 11 deletions maestro/server/rollout

This file was deleted.

13 changes: 13 additions & 0 deletions svc-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

cd $(dirname "$(realpath "${BASH_SOURCE[0]}")")

export DEPLOY_ENV=$1
export DIR=$2
export CLUSTER=$3
export KUBECONFIG=$(./dev-infrastructure/make $DEPLOY_ENV $CLUSTER.aks.kubeconfigfile)

./templatize $DEPLOY_ENV $DIR/Makefile.tmpl.mk $DIR/Makefile

cd $DIR
make deploy

0 comments on commit 88dff3b

Please sign in to comment.