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 <bradfitz@golang.org>
This commit is contained in:
Andrew Bonventre 2017-07-26 15:13:34 -04:00
Родитель 4bd7ff5d97
Коммит cd26c09f54
4 изменённых файлов: 45 добавлений и 6 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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
```

Просмотреть файл

Просмотреть файл