From c7de82c20c500a6135e4e89a8646b8f7be81eb13 Mon Sep 17 00:00:00 2001 From: minkimcello Date: Wed, 23 Mar 2022 14:35:20 -0400 Subject: [PATCH 1/3] Create note for deployment steps overview --- notes/DEPLOYMENT.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 notes/DEPLOYMENT.md diff --git a/notes/DEPLOYMENT.md b/notes/DEPLOYMENT.md new file mode 100644 index 0000000000000..61a1629facbfd --- /dev/null +++ b/notes/DEPLOYMENT.md @@ -0,0 +1,23 @@ +# Backstage Deployment Workflow Overview + +Runs on commits to the main branch (pull request merge commits): + +1. Authenticate workflow runner to GCP + +2. Install Cloud SDK + - This is so we can run `gcloud` commands to submit a build to `Cloud Build` + +3. Run yarn install, tsc, and build + +4. Build Backstage image using `Cloud Build` and push to `Artifacts Registry` + - Uses the git commit SHA as image tag + +5. Authenticate to GKE cluster to upgrade deployments + +6. Upgrade [postgres chart](https://github.com/thefrontside/backstage/tree/main/charts/postgres) + +7. Upgrade [backstage chart](https://github.com/thefrontside/backstage/tree/main/charts/backstage) + - The deployment chart will use the new Backstage image that was just pushed to the Artifacts Registry + +8. Confirm the new deployment of Backstage is successful + - If unsuccessful the deployment will rollback to the previous revision From 9dda0b0fe1a1d79639efc81c0670685866287c56 Mon Sep 17 00:00:00 2001 From: minkimcello Date: Thu, 24 Mar 2022 13:38:53 -0400 Subject: [PATCH 2/3] Add link to workflow file --- notes/DEPLOYMENT.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes/DEPLOYMENT.md b/notes/DEPLOYMENT.md index 61a1629facbfd..dd98e04b248d4 100644 --- a/notes/DEPLOYMENT.md +++ b/notes/DEPLOYMENT.md @@ -1,5 +1,7 @@ # Backstage Deployment Workflow Overview +The file for this workflow is located [here](https://github.com/thefrontside/backstage/blob/main/.github/workflows/release.yaml). + Runs on commits to the main branch (pull request merge commits): 1. Authenticate workflow runner to GCP From 6464f3cc5a462f744dd05e3598409122a94ffb20 Mon Sep 17 00:00:00 2001 From: minkimcello Date: Thu, 24 Mar 2022 15:12:35 -0400 Subject: [PATCH 3/3] Update local cluster instruction in README --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d30694b68e3aa..8104ba43443cb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ To start Backstage in your local cluster using minikube, run: ``` TAG=whatever -PG=whatever yarn install yarn tsc @@ -23,18 +22,20 @@ minikube start eval $(minikube docker-env) minikube image load backstage:$TAG -# TODO - need to modify the charts so that the following steps are automated for local development but for now please do the following manually: +# TODO - need to modify the charts so that the following steps are automated but for now please do the following: * 💥 comment out ./backstate/templates/certificate.yaml -* 💥 comment out ./backstage/templates/secrets.yaml +* 💥 move ./backstage/templates/secrets.yaml to another directory * 💥 comment out `volumeMounts` and `volumes` * 💥 modify container command to exclude `app-config.production.yaml` +PG=whatever + helm upgrade --install min-postgres-chart ./charts/postgres \ -f ./charts/postgres/Values.yaml \ --set postgresUsername=$PG \ --set postgresPassword=$PG -helm upgrade --install min-backstage-chart ./charts/backstage \ +POSTGRES_SERVICE_PORT=5432 POSTGRES_USER=$PG POSTGRES_PASSWORD=$PG helm upgrade --install min-backstage-chart ./charts/backstage \ -f ./charts/backstage/Values.yaml \ --set backstageImage=backstage:$TAG \ --set baseUrl=http://localhost:7007