Go training slides
This projects contains presentations rendered by
This projects is continuously deployed to Appengine at
https://gotraining.appspot.com/ when merged into
Run locally with
Run the present tool locally with
go run . -base . -content content
For an Appengine like environment run
GAE_ENV=standard go run .
The "production" slides are deployed to the
gotraining project. There is
limited access to this project - slides are automatically deployed when
the master branch of this repository is updated (usually merging a PR).
gotraining-testing project is available with laxer permissions to
allow you to deploy pre-release versions of the slides for testing, and
should be used to deploy your PR version for review.
You should set up one or both of these projects with the
command so that you can deploy PR versions and/or manually deploy the
production version as necessary:
gcloud config configurations create gotraining-testing gcloud config set account firstname.lastname@example.org gcloud config set project gotraining-testing
If you are having SSL validation issues (due to a corporate network or otherwise), you can disable SSL validation as a last resort:
gcloud config set auth/disable_ssl_validation
You will need to authenticate the new configuration:
gcloud auth login
Deployment for PR review
When you have a PR open for review, you can deploy the changes under review as an appengine "service" so it can be deployed alongside the master/default version of the slides as well as other open PRs. It can easily be cleaned up when your PR is closed.
service: prNNto the end of the file (top-level yaml key) where
NNis your pull request number. You could put it at the top of the file if that is easier.
Deploy to app engine:
gcloud --configuration=gotraining-testing app deploy
In your browser, go to https://prNN-dot-gotraining-testing.appspot.com/
Review the changes as your reviewer will see them
When done, delete the app engine service:
gcloud --configuration=gotraining-testing app services delete prNN
Undo changes to
git checkout -- app.yaml
Please make sure you do not commit a version of
app.yaml with your
service: line in it. This should only ever be local to your workspace.
You should also make sure your workspace is clean of changes so what you
deploy is what is on the PR branch in github. run
git describe --all --dirty and if that outputs a string with
-dirty on the end, you have
uncommitted changes. Stash them before you deploy (
git stash -u) and
unstash after (
git stash pop). Note that you should check this before
app.yaml file as that will make your workspace dirty.
You can run
git status and
git diff if you need to and ensure the
only dirtyness is the
service: prNN line in
Manual production Appengine deployment
Request access to GCP
gotraining project from a contributor.
Add a new gcloud configuration as described in the Appengine deployment section, using
gotraining instead of
gotraining configuration active, Execute
gcloud app deploy
or test the coudbuild with
gcloud builds submit --config cloudbuild.yaml
Extra special thanks to @camh-anz for countless reviews, improvement suggestions and code contributions.
Many thanks also to @anzdaddy for suggesting the pingserver comparison, to @pentaphobe for the syntax colouring contribution and to @anzboi for creating go-samplerest - they and @anz-rfc also contributed in many reviews.
This work is copyright Australia and New Zealand Banking Group Limited and licensed under a Creative Commons Attribution 3.0 Unported License.