cmd/golangorg: update deploy instructions
Increase the separation between each step by giving them explicit numbers. Expand on some of the deploy steps with more detail. Update the default value of GO_REF to the current Go release branch version. This way, it doesn't need to be overridden for each deploy. Update references to the README.md file (it was recently renamed from README.golangorg-app in CL 207438). Change-Id: Ie34fed44a990a5c7ffe2acad68fd5c0f094f9143 Reviewed-on: https://go-review.googlesource.com/c/website/+/212239 Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Родитель
058dd16452
Коммит
eea9a1a6a7
|
@ -4,7 +4,7 @@
|
|||
|
||||
.PHONY: usage
|
||||
|
||||
GO_REF ?= release-branch.go1.11
|
||||
GO_REF ?= release-branch.go1.13
|
||||
WEBSITE_HEAD := $(shell git rev-parse HEAD)
|
||||
WEBSITE_CLEAN := $(shell (git status --porcelain | grep -q .) && echo dirty || echo clean)
|
||||
ifeq ($(WEBSITE_CLEAN),clean)
|
||||
|
@ -17,7 +17,7 @@ GCP_SERVICE := default
|
|||
DOCKER_TAG := gcr.io/$(GCP_PROJECT)/golangorg:$(DOCKER_VERSION)
|
||||
|
||||
usage:
|
||||
@echo "See Makefile and README.golangorg-app"
|
||||
@echo "See Makefile and README.md"
|
||||
@exit 1
|
||||
|
||||
cloud-build: Dockerfile.prod
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Running golangorg
|
||||
# golangorg
|
||||
|
||||
## Local Development
|
||||
|
||||
|
@ -57,27 +57,29 @@ It serves on localhost:8080.
|
|||
|
||||
## Deploying to golang.org
|
||||
|
||||
Make sure you're signed in to gcloud:
|
||||
1. Run `make cloud-build deploy` to build the image, push it to gcr.io,
|
||||
and deploy to Flex (but not yet update golang.org to point to it).
|
||||
|
||||
gcloud auth login
|
||||
2. Check that the new version, mentioned on "target url:" line, looks OK.
|
||||
|
||||
Build the image, push it to gcr.io, and deploy to Flex:
|
||||
3. If all is well, run `make publish` to publish the new version to golang.org.
|
||||
It will run regression tests and then point the load balancer to the newly
|
||||
deployed version.
|
||||
|
||||
make cloud-build deploy
|
||||
4. Stop and/or delete any very old versions. (Stopped versions can be re-started.)
|
||||
Keep at least one older verson to roll back to, just in case.
|
||||
|
||||
Point the load balancer to the newly deployed version:
|
||||
(This also runs regression tests)
|
||||
You can view, stop/delete, or migrate traffic between versions via the
|
||||
[GCP Console UI](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default&versionsquery=%255B%257B_22k_22_3A_22env_22_2C_22t_22_3A10_2C_22v_22_3A_22_5C_22FLEXIBLE_5C_22_22_2C_22s_22_3Atrue%257D%255D).
|
||||
|
||||
make publish
|
||||
|
||||
Stop and/or delete down any very old versions. (Stopped versions can be re-started.)
|
||||
Keep at least one older verson to roll back to, just in case.
|
||||
You can also migrate traffic to the new version via this UI.
|
||||
|
||||
https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default&versionssize=50
|
||||
5. You're done.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Ensure the Cloud SDK is on your PATH and you have the app-engine-go component
|
||||
installed (`gcloud components install app-engine-go`) and your components are
|
||||
up-to-date (`gcloud components update`)
|
||||
up-to-date (`gcloud components update`).
|
||||
|
||||
For deployment, make sure you're signed in to gcloud:
|
||||
|
||||
gcloud auth login
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
package main
|
||||
|
||||
// This file replaces main.go when running godoc under app-engine.
|
||||
// See README.golangorg-app for details.
|
||||
// This file replaces main.go when running golangorg under App Engine.
|
||||
// See README.md for details.
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
|
|
Загрузка…
Ссылка в новой задаче