Git Product home page Git Product logo

go-slides's Introduction

Go training slides

This projects contains presentations rendered by present.

content/ contains the presentations following the present syntax

This projects is continuously deployed to Appengine at https://gotraining.appspot.com/ when merged into master.

Run locally with

Run the present tool locally with

go build .
./go-slides -base . -content content

Appengine deployment

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

The 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 gcloud command so that you can deploy PR versions and/or manually deploy the production version as necessary:

gcloud config configurations create gotraining
gcloud config set account [email protected]
gcloud config set project gotraining

Use gotraining-testing instead of gotraining for the testing project.

If you are on the ANZ corp network and are having SSL validation issues due to the proxy certs, you can disable SSL validation as a last resort:

gcloud config set auth/disable_ssl_validation

You with 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.

  1. Edit app.yaml and add service: prNN to the end of the file (top-level yaml key) where NN is your pull request number. You could put it at the top of the file if that is easier.

  2. Deploy to app engine: gcloud --configuration=gotraining-testing app deploy

  3. In your browser, go to https://prNN-dot-gotraining-testing.appspot.com/

  4. Review the changes as your reviewer will see them

  5. When done, delete the app engine service: gcloud --configuration=gotraining-testing app services delete prNN

  6. Undo changes to app.yaml: 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 modifying the 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 app.yaml.

Manual production Appengine deployment

Request access to GCP gotraining project from a contributor or update app.yaml on your own fork with your GCP project.

Execute

gcloud app deploy

or test the coudbuild with

gcloud builds submit --config cloudbuild.yaml

Attribution

The Go course materials in this project were collated by @juliaogris with many cues taken from A Tour of Go and Go by Example.

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.

@anzboi, @camh-anz, @linuxmonk, @Joshcarp, @juliaogris and @rokane collaborated on an updated version of the materials for a follow up course.

License

This work is copyright Australia and New Zealand Banking Group Limited and licensed under a Creative Commons Attribution 3.0 Unported License.

go-slides's People

Contributors

anzboi avatar camscale avatar juliaogris avatar pentaphobe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.