From cd26c09f54feb521fcdfec60618a378402bf1601 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Wed, 26 Jul 2017 15:13:34 -0400 Subject: [PATCH] devapp: update README.md to clarify deployment steps Adds new target in the Makefile to update pod images on the devapp deployment. Renames usage of "dev" with "staging" Change-Id: I9efcf6b873cea5fff84dbffd9129ad3cc6fca7d2 Reviewed-on: https://go-review.googlesource.com/51350 Reviewed-by: Brad Fitzpatrick --- devapp/Makefile | 9 +++- devapp/README.md | 42 +++++++++++++++++-- ...yment-dev.yaml => deployment-staging.yaml} | 0 ...{service-dev.yaml => service-staging.yaml} | 0 4 files changed, 45 insertions(+), 6 deletions(-) rename devapp/{deployment-dev.yaml => deployment-staging.yaml} (100%) rename devapp/{service-dev.yaml => service-staging.yaml} (100%) diff --git a/devapp/Makefile b/devapp/Makefile index c4f4582b..9c463943 100644 --- a/devapp/Makefile +++ b/devapp/Makefile @@ -31,14 +31,19 @@ update-deps: docker-prod: Dockerfile devapp ca-certificates.crt docker build --force-rm --tag=gcr.io/symbolic-datum-552/devapp:$(VERSION) . -docker-dev: Dockerfile devapp ca-certificates.crt +docker-staging: Dockerfile devapp ca-certificates.crt docker build --force-rm --tag=gcr.io/go-dashboard-dev/devapp:$(VERSION) . push-prod: docker-prod gcloud docker -- push gcr.io/symbolic-datum-552/devapp:$(VERSION) -push-dev: docker-dev +push-staging: docker-staging gcloud docker -- push gcr.io/go-dashboard-dev/devapp:$(VERSION) +deploy-prod: push-prod + kubectl set image deployment/devapp-deployment devapp=gcr.io/symbolic-datum-552/devapp:$(VERSION) +deploy-staging: push-staging + kubectl set image deployment/devapp-deployment devapp=gcr.io/go-dashboard-dev/devapp:$(VERSION) + .PHONY: clean clean: $(RM) devapp diff --git a/devapp/README.md b/devapp/README.md index 33d07277..b2d67998 100644 --- a/devapp/README.md +++ b/devapp/README.md @@ -11,10 +11,44 @@ Then visit http://localhost:6343 ## Deployment +### Staging + ```sh -$ gcloud config set project {go-dashboard-dev|symbolic-datum-552} +$ gcloud config set project go-dashboard-dev $ gcloud container clusters get-credentials --zone=us-central1-f go -$ make push-{dev|prod} -$ kubectl create -f deployment-{dev|prod}.yaml -$ kubectl create -f service-{dev|prod}.yaml +$ make push-staging +``` + +If creating the deployment and service the first time: + +```sh +$ kubectl create -f deployment-staging.yaml +$ kubectl create -f service-staging.yaml +``` + +If updating the pod image: + +```sh +$ make deploy-staging +``` + +### Prod + +```sh +$ gcloud config set project symbolic-datum-552 +$ gcloud container clusters get-credentials --zone=us-central1-f go +$ make push-prod +``` + +If creating the deployment and service the first time: + +```sh +$ kubectl create -f deployment-prod.yaml +$ kubectl create -f service-prod.yaml +``` + +If updating the pod image: + +```sh +$ make deploy-prod ``` \ No newline at end of file diff --git a/devapp/deployment-dev.yaml b/devapp/deployment-staging.yaml similarity index 100% rename from devapp/deployment-dev.yaml rename to devapp/deployment-staging.yaml diff --git a/devapp/service-dev.yaml b/devapp/service-staging.yaml similarity index 100% rename from devapp/service-dev.yaml rename to devapp/service-staging.yaml