From 1469affae72b0d8552143cb20da8019f28ea8d5e Mon Sep 17 00:00:00 2001 From: Christopher Farrenden Date: Wed, 16 Jun 2021 22:44:04 +1000 Subject: [PATCH 1/2] Deploy to AWS production cluster --- .github/workflows/on-push.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 795bf509..2f5c2f93 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -84,5 +84,15 @@ jobs: ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' . ./.aws-credentials; aws eks update-kubeconfig --alias hidden --name platform-dev2 --region us-east-1; - kubectl -n qctrl-platform set image deployment/python-open-controls-docs python-open-controls-docs=qctrl/python-open-controls-docs:$COMMIT; + kubectl -n qctrl-platform set image deployment/python-open-controls-docs python-open-controls-docs=qctrl/python-open-controls-docs:$COMMIT && kubectl -n qctrl-platform rollout status deployment/python-open-controls-docs; + ' + + - name: Update Sphinx deployment in Kubernetes (Production) + run: | + ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} + ./ci vault awsKey -t $(cat .token) -r deploy-eks-prod -o ./.aws-credentials + ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' + . ./.aws-credentials; + aws eks update-kubeconfig --alias hidden --name platform-prod --region us-west-2; + kubectl -n qctrl-platform rollout restart deployment/python-open-controls-docs && kubectl -n qctrl-platform rollout status deployment/python-open-controls-docs; ' From 089afe0a76aa2e617a4c74c51ff6b8dbe5ac8b5e Mon Sep 17 00:00:00 2001 From: Christopher Farrenden Date: Wed, 16 Jun 2021 22:53:23 +1000 Subject: [PATCH 2/2] Deploy to AWS production cluster --- .github/workflows/on-push.yml | 10 ---------- .github/workflows/on-release.yml | 11 ++++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 2f5c2f93..3875e907 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -86,13 +86,3 @@ jobs: aws eks update-kubeconfig --alias hidden --name platform-dev2 --region us-east-1; kubectl -n qctrl-platform set image deployment/python-open-controls-docs python-open-controls-docs=qctrl/python-open-controls-docs:$COMMIT && kubectl -n qctrl-platform rollout status deployment/python-open-controls-docs; ' - - - name: Update Sphinx deployment in Kubernetes (Production) - run: | - ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci vault awsKey -t $(cat .token) -r deploy-eks-prod -o ./.aws-credentials - ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' - . ./.aws-credentials; - aws eks update-kubeconfig --alias hidden --name platform-prod --region us-west-2; - kubectl -n qctrl-platform rollout restart deployment/python-open-controls-docs && kubectl -n qctrl-platform rollout status deployment/python-open-controls-docs; - ' diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index c3a5f21f..efc526de 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -45,8 +45,9 @@ jobs: - name: Update Sphinx deployment in Kubernetes (Production) run: | ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci vault gcpKey -t $(cat .token) --proj q-ctrl-documentation -r docs -o ./gcloud-service-key.json - gcloud auth activate-service-account --key-file=./gcloud-service-key.json - gcloud config set project q-ctrl-documentation - gcloud container clusters get-credentials docs-production --zone us-central1-c - kubectl -n docs rollout restart deployment/python-open-controls-docs + ./ci vault awsKey -t $(cat .token) -r deploy-eks-prod -o ./.aws-credentials + ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' + . ./.aws-credentials; + aws eks update-kubeconfig --alias hidden --name platform-prod --region us-west-2; + kubectl -n qctrl-platform rollout restart deployment/python-open-controls-docs && kubectl -n qctrl-platform rollout status deployment/python-open-controls-docs; + '