diff --git a/bq-metrics-extractor/cronjob/deploy-dev-direct.sh b/bq-metrics-extractor/cronjob/deploy-dev-direct.sh index 3ffab4009..8976d4640 100755 --- a/bq-metrics-extractor/cronjob/deploy-dev-direct.sh +++ b/bq-metrics-extractor/cronjob/deploy-dev-direct.sh @@ -26,4 +26,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/bq-metrics-extractor:${TAG} echo "Deploying bq-metrics-extractor to GKE" -sed -e 's/EXTRACTOR_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' bq-metrics-extractor/cronjob/extractor-dev.yaml | kubectl apply -f - +sed -e 's/EXTRACTOR_VERSION/'"${TAG}"'/g; s/GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' bq-metrics-extractor/cronjob/extractor-dev.yaml | kubectl apply -f - diff --git a/bq-metrics-extractor/cronjob/deploy-direct.sh b/bq-metrics-extractor/cronjob/deploy-direct.sh index 414f90f68..1f841b9bf 100755 --- a/bq-metrics-extractor/cronjob/deploy-direct.sh +++ b/bq-metrics-extractor/cronjob/deploy-direct.sh @@ -26,4 +26,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/bq-metrics-extractor:${TAG} echo "Deploying bq-metrics-extractor to GKE" -sed -e 's/EXTRACTOR_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' bq-metrics-extractor/cronjob/extractor.yaml | kubectl apply -f - +sed -e 's/EXTRACTOR_VERSION/'"${TAG}"'/g; s/GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' bq-metrics-extractor/cronjob/extractor.yaml | kubectl apply -f - diff --git a/exporter/deploy/deploy-dev.sh b/exporter/deploy/deploy-dev.sh index d7c1882cd..9a8997e8c 100755 --- a/exporter/deploy/deploy-dev.sh +++ b/exporter/deploy/deploy-dev.sh @@ -22,4 +22,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/exporter:${TAG} echo "Deploying exporter to GKE" -sed -e 's/EXPORTER_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' exporter/deploy/exporter-dev.yaml | kubectl apply -f - \ No newline at end of file +sed -e 's/EXPORTER_VERSION/'"${TAG}"'/g; s/_GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' exporter/deploy/exporter-dev.yaml | kubectl apply -f - \ No newline at end of file diff --git a/exporter/deploy/deploy.sh b/exporter/deploy/deploy.sh index 767a536f3..f3d9cc6ad 100755 --- a/exporter/deploy/deploy.sh +++ b/exporter/deploy/deploy.sh @@ -22,7 +22,7 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/exporter:${TAG} echo "Deploying exporter to GKE" -sed -e 's/EXPORTER_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' exporter/deploy/exporter.yaml | kubectl apply -f - +sed -e 's/EXPORTER_VERSION/'"${TAG}"'/g; s/_GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' exporter/deploy/exporter.yaml | kubectl apply -f - GCP_PROJECT_ID \ No newline at end of file diff --git a/exporter/deploy/exporter-dev.yaml b/exporter/deploy/exporter-dev.yaml index 713cf0da4..175b1e339 100644 --- a/exporter/deploy/exporter-dev.yaml +++ b/exporter/deploy/exporter-dev.yaml @@ -15,11 +15,11 @@ spec: spec: containers: - name: exporter - image: eu.gcr.io/GCP_PROJECT_ID/exporter:EXPORTER_VERSION + image: eu.gcr.io/_GCP_PROJECT_ID/exporter:EXPORTER_VERSION imagePullPolicy: Always env: - name: GCP_PROJECT_ID - value: GCP_PROJECT_ID + value: _GCP_PROJECT_ID - name: DATASET_MODIFIER value: _dev ports: diff --git a/exporter/deploy/exporter.yaml b/exporter/deploy/exporter.yaml index 2fea230ef..8c9ca46c2 100644 --- a/exporter/deploy/exporter.yaml +++ b/exporter/deploy/exporter.yaml @@ -15,10 +15,10 @@ spec: spec: containers: - name: exporter - image: eu.gcr.io/GCP_PROJECT_ID/exporter:EXPORTER_VERSION + image: eu.gcr.io/_GCP_PROJECT_ID/exporter:EXPORTER_VERSION imagePullPolicy: Always env: - name: GCP_PROJECT_ID - value: GCP_PROJECT_ID + value: _GCP_PROJECT_ID ports: - containerPort: 8080 diff --git a/prime/infra/README.md b/prime/infra/README.md index d343b5f6d..6d10582f1 100644 --- a/prime/infra/README.md +++ b/prime/infra/README.md @@ -131,7 +131,7 @@ Update the tag (version) of prime's docker image in `infra/prod/prime.yaml`. Apply the deployment & service ```bash -sed -e 's/PRIME_VERSION/${PRIME_VERSION}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' prime/infra/prod/prime.yaml | kubectl apply -f - +sed -e 's/PRIME_VERSION/${PRIME_VERSION}/g; s/_GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' prime/infra/prod/prime.yaml | kubectl apply -f - ``` Details of the deployment diff --git a/prime/infra/dev/prime.yaml b/prime/infra/dev/prime.yaml index 8bc1c41c8..bcd7d4c5d 100644 --- a/prime/infra/dev/prime.yaml +++ b/prime/infra/dev/prime.yaml @@ -225,7 +225,7 @@ spec: name: api-ostelco-ssl readOnly: true - name: prime - image: eu.gcr.io/GCP_PROJECT_ID/prime:PRIME_VERSION + image: eu.gcr.io/_GCP_PROJECT_ID/prime:PRIME_VERSION imagePullPolicy: Always env: - name: SLACK_CHANNEL @@ -279,6 +279,8 @@ spec: key: apiSecret - name: GOOGLE_APPLICATION_CREDENTIALS value: /secret/pantel-prod.json + - name: GCP_PROJECT_ID + value: _GCP_PROJECT_ID volumeMounts: - name: secret-config mountPath: "/secret" diff --git a/prime/infra/prod/prime.yaml b/prime/infra/prod/prime.yaml index 1a54e1fdd..4216da014 100644 --- a/prime/infra/prod/prime.yaml +++ b/prime/infra/prod/prime.yaml @@ -153,7 +153,7 @@ spec: name: metrics-ostelco-ssl readOnly: true - name: prime - image: eu.gcr.io/GCP_PROJECT_ID/prime:PRIME_VERSION + image: eu.gcr.io/_GCP_PROJECT_ID/prime:PRIME_VERSION imagePullPolicy: Always env: - name: SLACK_CHANNEL @@ -178,6 +178,8 @@ spec: secretKeyRef: name: stripe-secrets key: stripeApiKey + - name: GCP_PROJECT_ID + value: _GCP_PROJECT_ID volumeMounts: - name: secret-config mountPath: "/secret" diff --git a/prime/script/deploy-dev-direct.sh b/prime/script/deploy-dev-direct.sh index 70491c74e..e15271696 100755 --- a/prime/script/deploy-dev-direct.sh +++ b/prime/script/deploy-dev-direct.sh @@ -26,4 +26,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/prime:${TAG} echo "Deploying prime to GKE" -sed -e 's/PRIME_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' prime/infra/dev/prime.yaml | kubectl apply -f - \ No newline at end of file +sed -e 's/PRIME_VERSION/'"${TAG}"'/g; s/_GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' prime/infra/dev/prime.yaml | kubectl apply -f - \ No newline at end of file diff --git a/prime/script/deploy-direct.sh b/prime/script/deploy-direct.sh index 8a16555b3..917b968ef 100755 --- a/prime/script/deploy-direct.sh +++ b/prime/script/deploy-direct.sh @@ -37,4 +37,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/prime:${TAG} echo "Deploying prime to GKE" -sed -e 's/PRIME_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' prime/infra/prod/prime.yaml | kubectl apply -f - \ No newline at end of file +sed -e 's/PRIME_VERSION/'"${TAG}"'/g; s/_GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' prime/infra/prod/prime.yaml | kubectl apply -f - \ No newline at end of file diff --git a/scaninfo-shredder/cronjob/deploy-dev-direct.sh b/scaninfo-shredder/cronjob/deploy-dev-direct.sh index b00d86df6..182a6c08f 100755 --- a/scaninfo-shredder/cronjob/deploy-dev-direct.sh +++ b/scaninfo-shredder/cronjob/deploy-dev-direct.sh @@ -26,4 +26,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/scaninfo-shredder:${TAG} echo "Deploying scaninfo-shredder to GKE" -sed -e 's/SHREDDER_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' scaninfo-shredder/cronjob/shredder-dev.yaml | kubectl apply -f - +sed -e 's/SHREDDER_VERSION/'"${TAG}"'/g; s/GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' scaninfo-shredder/cronjob/shredder-dev.yaml | kubectl apply -f - diff --git a/scaninfo-shredder/cronjob/deploy-direct.sh b/scaninfo-shredder/cronjob/deploy-direct.sh index 9d822d08b..9b1c43b8e 100755 --- a/scaninfo-shredder/cronjob/deploy-direct.sh +++ b/scaninfo-shredder/cronjob/deploy-direct.sh @@ -26,4 +26,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/scaninfo-shredder:${TAG} echo "Deploying scaninfo-shredder to GKE" -sed -e 's/SHREDDER_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' scaninfo-shredder/cronjob/shredder.yaml | kubectl apply -f - +sed -e 's/SHREDDER_VERSION/'"${TAG}"'/g; s/GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' scaninfo-shredder/cronjob/shredder.yaml | kubectl apply -f - diff --git a/sim-administration/simmanager/deploy-to-dev.sh b/sim-administration/simmanager/deploy-to-dev.sh index 86ff6583e..1a47313de 100755 --- a/sim-administration/simmanager/deploy-to-dev.sh +++ b/sim-administration/simmanager/deploy-to-dev.sh @@ -14,4 +14,4 @@ docker push eu.gcr.io/${GCP_PROJECT_ID}/simmanager:${TAG} echo "Deploying eu.gcr.io/${GCP_PROJECT_ID}/simmanager:${TAG} to GKE" -sed -e 's/SIMMANAGER_VERSION/${TAG}/g; s/GCP_PROJECT_ID/${GCP_PROJECT_ID}/g' simmanager-deploy.yaml | kubectl apply -f - +sed -e 's/SIMMANAGER_VERSION/'"${TAG}"'/g; s/GCP_PROJECT_ID/'"${GCP_PROJECT_ID}"'/g' simmanager-deploy.yaml | kubectl apply -f -