Skip to content

Commit

Permalink
cmd/golangorg: update deploy instructions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
passionSeven committed Jan 3, 2020
1 parent 56e992c commit 8e63d47
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cmd/golangorg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
32 changes: 17 additions & 15 deletions cmd/golangorg/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Running golangorg
# golangorg

## Local Development

Expand Down Expand Up @@ -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

Build the image, push it to gcr.io, and deploy to Flex:

make cloud-build deploy
2. Check that the new version, mentioned on "target url:" line, looks OK.

Point the load balancer to the newly deployed version:
(This also runs regression tests)
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 publish
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.

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.
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).

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
4 changes: 2 additions & 2 deletions cmd/golangorg/appinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8e63d47

Please sign in to comment.