-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
templatize only Makefile include not makefile itself
Signed-off-by: Gerd Oberlechner <[email protected]>
- Loading branch information
Showing
14 changed files
with
98 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Makefile | ||
config.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARO_HCP_IMAGE_ACR ?= {{ .acrName }} | ||
LOCATION ?= {{ .region }} | ||
RESOURCEGROUP ?= {{ .serviceClusterRG }} | ||
AKS_NAME ?= {{ .aksName }} | ||
DB_NAME ?= {{ .frontendCosmosDBName }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
deploy/tmp-provisioning-shard.yml | ||
Makefile | ||
config.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
SHELL = /bin/bash | ||
DEPLOY_ENV ?= personal-dev | ||
|
||
$(shell ../templatize.sh $(DEPLOY_ENV) config.tmpl.mk config.mk) | ||
|
||
include config.mk | ||
|
||
ZONE_RESOURCE_ID ?= $(shell az network dns zone show -n ${DNS_ZONE_NAME} -g ${REGIONAL_RESOURCEGROUP} --query id -o tsv) | ||
|
||
deploy: | ||
sed -e "s#ZONE_RESOURCE_ID#${ZONE_RESOURCE_ID}#g" -e "s/REGION/${REGION}/g" -e "s/CONSUMER_NAME/${CONSUMER_NAME}/g" deploy/mvp-provisioning-shards.yml > deploy/tmp-provisioning-shard.yml | ||
|
||
ISTO_VERSION=$(shell az aks show -n ${AKS_NAME} -g ${RESOURCEGROUP} --query serviceMeshProfile.istio.revisions[-1] -o tsv) && \ | ||
oc process --local -f deploy/openshift-templates/arohcp-namespace-template.yml \ | ||
-p ISTIO_VERSION=$${ISTO_VERSION} | oc apply -f - | ||
kubectl apply -f deploy/istio.yml | ||
|
||
oc process --local -f deploy/openshift-templates/arohcp-db-template.yml | oc apply -f - | ||
oc process --local -f deploy/openshift-templates/arohcp-secrets-template.yml \ | ||
-p PROVISION_SHARDS_CONFIG="$$( base64 -i deploy/tmp-provisioning-shard.yml)" | oc apply -f - | ||
|
||
AZURE_CS_MI_CLIENT_ID=$(shell az identity show -g ${RESOURCEGROUP} -n clusters-service --query clientId -o tsv) && \ | ||
CS_SERVICE_PRINCIPAL_CREDS_BASE64='$(shell az keyvault secret show --vault-name "${SERVICE_KV}" --name "aro-hcp-dev-sp-cs" | jq .value -r | base64 | tr -d '\n')' && \ | ||
TENANT_ID=$(shell az account show --query tenantId --output tsv) && \ | ||
OIDC_BLOB_SERVICE_ENDPOINT=$(shell az storage account show -n ${OIDC_STORAGE_ACCOUNT} -g ${RESOURCEGROUP} --query primaryEndpoints.blob -o tsv) && \ | ||
OIDC_WEB_SERVICE_ENDPOINT=$(shell az storage account show -n ${OIDC_STORAGE_ACCOUNT} -g ${RESOURCEGROUP} --query primaryEndpoints.web -o tsv) && \ | ||
oc process --local -f deploy/openshift-templates/arohcp-service-template.yml \ | ||
-p AZURE_CS_MI_CLIENT_ID=$${AZURE_CS_MI_CLIENT_ID} \ | ||
-p TENANT_ID=$${TENANT_ID} \ | ||
-p REGION=${REGION} \ | ||
-p SERVICE_KEYVAULT_NAME=${SERVICE_KV} \ | ||
-p CS_SERVICE_PRINCIPAL_CREDS_BASE64=$${CS_SERVICE_PRINCIPAL_CREDS_BASE64} \ | ||
-p IMAGE_REGISTRY=${ACR_NAME}.azurecr.io \ | ||
-p IMAGE_REPOSITORY=${IMAGE_REPO} \ | ||
-p AZURE_FIRST_PARTY_APPLICATION_CLIENT_ID=${FPA_CLIENT_ID} \ | ||
-p FPA_CERT_NAME=${FPA_CERT_NAME} \ | ||
-p IMAGE_TAG=${IMAGE_TAG} | oc apply -f - | ||
|
||
deploy-pr-env-deps: | ||
AZURE_CS_MI_CLIENT_ID=$(shell az identity show -g ${RESOURCEGROUP} -n clusters-service --query clientId -o tsv) && \ | ||
oc process --local -f deploy/integration/cluster-service-namespace.yaml \ | ||
-p CLIENT_ID=${AZURE_CS_MI_CLIENT_ID} | oc apply -f - | ||
|
||
# for local development | ||
provision-shard: | ||
sed -e "s#ZONE_RESOURCE_ID#${ZONE_RESOURCE_ID}#g" -e "s/REGION/${REGION}/g" -e "s/CONSUMER_NAME/${CONSUMER_NAME}/g" deploy/dev-provisioning-shards.yml | ||
|
||
.PHONY: deploy deploy-integ provision-shard |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
REGION ?= {{ .region }} | ||
CONSUMER_NAME ?= {{ .maestroConsumerName }} | ||
RESOURCEGROUP ?= {{ .serviceClusterRG }} | ||
REGIONAL_RESOURCEGROUP ?= {{ .regionRG }} | ||
AKS_NAME ?= {{ .aksName }} | ||
SERVICE_KV ?= {{ .serviceKeyVaultName }} | ||
OIDC_STORAGE_ACCOUNT ?= {{ .oidcStorageAccountName }} | ||
IMAGE_REPO ?= {{ .clusterServiceImageRepo }} | ||
IMAGE_TAG ?= {{ .clusterServiceImageTag }} | ||
ACR_NAME ?= {{ .acrName }} | ||
FPA_CLIENT_ID ?= {{ .firstPartyAppClientId }} | ||
DNS_ZONE_NAME ?= {{ .regionalDNSSubdomain }}.{{ .baseDnsZoneName }} | ||
FPA_CERT_NAME ?= firstPartyCert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Makefile | ||
config.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARO_HCP_IMAGE_ACR ?= {{ .acrName }} | ||
LOCATION ?= {{ .region }} | ||
RESOURCEGROUP ?= {{ .serviceClusterRG }} | ||
AKS_NAME ?= {{ .aksName }} | ||
DB_NAME ?= {{ .frontendCosmosDBName }} |
This file was deleted.
Oops, something went wrong.