From a09521ceb1ad73777ad6f79203517ccd7ab18a09 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 5 Mar 2018 13:44:02 -0600 Subject: [PATCH 1/7] Changing Azure instance type --- prepare-vms/README.md | 2 +- prepare-vms/azuredeploy.json | 2 +- prepare-vms/azuredeploy.parameters.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prepare-vms/README.md b/prepare-vms/README.md index 818ebd4c..33d367ef 100644 --- a/prepare-vms/README.md +++ b/prepare-vms/README.md @@ -116,7 +116,7 @@ wrap Run this program in a container - Optional: - Choose a name for the workshop (default is "workshop") - Choose the number of instances (default is 3) - - Customize the desired instance size (default is Standard_D2_v3) + - Customize the desired instance size (default is Standard_D1_v2) - Launch instances with your chosen resource group name and your preferred region; the examples are "workshop" and "eastus": ``` az group create --name workshop --location eastus diff --git a/prepare-vms/azuredeploy.json b/prepare-vms/azuredeploy.json index 560212c1..74dc620c 100644 --- a/prepare-vms/azuredeploy.json +++ b/prepare-vms/azuredeploy.json @@ -60,7 +60,7 @@ }, "vmSize": { "type": "string", - "defaultValue": "Standard_D2_v3", + "defaultValue": "Standard_D1_v2", "metadata": { "description": "VM Size." } diff --git a/prepare-vms/azuredeploy.parameters.json b/prepare-vms/azuredeploy.parameters.json index 51f7edae..81058ffb 100644 --- a/prepare-vms/azuredeploy.parameters.json +++ b/prepare-vms/azuredeploy.parameters.json @@ -12,7 +12,7 @@ "value": 3 }, "vmSize": { - "value": "Standard_D2_v3" + "value": "Standard_D1_v2" } } } From 3a21cbc72b2dd1936896dad047f9b7b81bce7af1 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 5 Mar 2018 14:37:10 -0600 Subject: [PATCH 2/7] Makes more sense for "in person" chat --- slides/common/prereqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/common/prereqs.md b/slides/common/prereqs.md index bbc190bc..cc2d17aa 100644 --- a/slides/common/prereqs.md +++ b/slides/common/prereqs.md @@ -70,7 +70,7 @@ Misattributed to Benjamin Franklin - Go to [container.training](http://container.training/) to view these slides -- Join the chat room on @@CHAT@@ +- Join the chat room: @@CHAT@@ From 8c2c9bc5df0d35d1c0aa4894f99d0dbcab85bcdb Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 5 Mar 2018 14:51:26 -0600 Subject: [PATCH 3/7] De-dup thanks; add comma --- slides/common/thankyou.md | 2 +- slides/kube/links.md | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/slides/common/thankyou.md b/slides/common/thankyou.md index 0b18b64f..e383865f 100644 --- a/slides/common/thankyou.md +++ b/slides/common/thankyou.md @@ -6,6 +6,6 @@ Thank you! class: title, in-person -That's all folks!
Questions? +That's all, folks!
Questions? ![end](images/end.jpg) diff --git a/slides/kube/links.md b/slides/kube/links.md index 35a25f05..2a54ed54 100644 --- a/slides/kube/links.md +++ b/slides/kube/links.md @@ -1,17 +1,3 @@ -class: title, self-paced - -Thank you! - ---- - -class: title, in-person - -That's all folks!
Questions? - -![end](images/end.jpg) - ---- - # Links and resources All things Kubernetes: From b64b16dd678c55c7042e089897a2562bd955dd36 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 5 Mar 2018 14:54:28 -0600 Subject: [PATCH 4/7] Adding Bridget-specific files --- slides/kube/links-bridget.md | 17 +++++++++++++++++ slides/logistics-bridget.md | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 slides/kube/links-bridget.md create mode 100644 slides/logistics-bridget.md diff --git a/slides/kube/links-bridget.md b/slides/kube/links-bridget.md new file mode 100644 index 00000000..1c9601da --- /dev/null +++ b/slides/kube/links-bridget.md @@ -0,0 +1,17 @@ +# Links and resources + +- [Kubernetes Community](https://kubernetes.io/community/) - Slack, Google Groups, meetups + +- [Kubernetes on StackOverflow](https://stackoverflow.com/questions/tagged/kubernetes) + +- [Play With Kubernetes Hands-On Labs](https://medium.com/@marcosnils/introducing-pwk-play-with-k8s-159fcfeb787b) + +- [Azure Container Service](https://docs.microsoft.com/azure/aks/) + +- [Cloud Developer Advocates](https://developer.microsoft.com/advocates/) + +- [Local meetups](https://www.meetup.com/) + +- [devopsdays](https://www.devopsdays.org/) + +.footnote[These slides (and future updates) are on → http://container.training/] diff --git a/slides/logistics-bridget.md b/slides/logistics-bridget.md new file mode 100644 index 00000000..9a4f38bb --- /dev/null +++ b/slides/logistics-bridget.md @@ -0,0 +1,16 @@ +## Intros + + - Hello! We are: + + - .emoji[✨] Bridget ([@bridgetkromhout](https://twitter.com/bridgetkromhout)) + + - .emoji[🌟] Joe ([@joelaha](https://twitter.com/joelaha)) + +- The workshop will run from 13:30-16:45 + +- There will be a break from 15:00-15:15 + +- Feel free to interrupt for questions at any time + +- *Especially when you see full screen container pictures!* + From c778fc84edf3a8c81be3a744372d601c936a5c10 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Mon, 5 Mar 2018 14:30:39 -0800 Subject: [PATCH 5/7] Add a dump of the checklist I use when delivering --- CHECKLIST.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CHECKLIST.md diff --git a/CHECKLIST.md b/CHECKLIST.md new file mode 100644 index 00000000..1b7c6e8c --- /dev/null +++ b/CHECKLIST.md @@ -0,0 +1,19 @@ +This is the checklist that I (Jérôme) use when delivering a workshop. + +- [ ] Create branch + `_redirects` + push to GitHub + Netlify setup +- [ ] Add branch to index.html +- [ ] Update the slides that says which versions we are using +- [ ] Update the version of Compose and Machine in settings +- [ ] Create chatroom +- [ ] Set chatroom in YML and deploy +- [ ] Put chat room in index.html +- [ ] Walk the room to count seats, check power supplies, lectern, A/V setup +- [ ] How many VMs do we need? +- [ ] Provision VMs +- [ ] Print cards +- [ ] Cut cards +- [ ] Last minute merge from master +- [ ] Check that all looks good +- [ ] DELIVER! +- [ ] Shutdown VMs +- [ ] Update index.html to remove chat link and move session to past things From cdca5655fcac0079b2f217a28f0e55eb57ba9a47 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Mon, 5 Mar 2018 17:08:06 -0600 Subject: [PATCH 6/7] Clarifications and links for checklist --- CHECKLIST.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 1b7c6e8c..0038de59 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -1,19 +1,24 @@ -This is the checklist that I (Jérôme) use when delivering a workshop. +Checklist to use when delivering a workshop +Authored by Jérôme; additions by Bridget -- [ ] Create branch + `_redirects` + push to GitHub + Netlify setup -- [ ] Add branch to index.html -- [ ] Update the slides that says which versions we are using -- [ ] Update the version of Compose and Machine in settings -- [ ] Create chatroom -- [ ] Set chatroom in YML and deploy -- [ ] Put chat room in index.html -- [ ] Walk the room to count seats, check power supplies, lectern, A/V setup -- [ ] How many VMs do we need? -- [ ] Provision VMs +- [ ] Create event-named branch (such as `conferenceYYYY`) in the [main repo](https://github.com/jpetazzo/container.training/) + - [ ] Create file `slides/_redirects` containing a link to the desired tutorial: `/ /kube-halfday.yml.html 200` + - [ ] Push local branch to GitHub and merge into main repo + - [ ] [Netlify setup](https://app.netlify.com/sites/container-training/settings/domain): create subdomain for event-named branch +- [ ] Add link to event-named branch to [container.training front page](https://github.com/jpetazzo/container.training/blob/master/slides/index.html) +- [ ] Update the slides that says which versions we are using for [kube](https://github.com/jpetazzo/container.training/blob/master/slides/kube/versions-k8s.md) or [swarm](https://github.com/jpetazzo/container.training/blob/master/slides/swarm/versions.md) workshops +- [ ] Update the version of Compose and Machine in [settings](https://github.com/jpetazzo/container.training/tree/master/prepare-vms/settings) +- [ ] (optional) Create chatroom +- [ ] (optional) Set chatroom in YML ([kube half-day example](https://github.com/jpetazzo/container.training/blob/master/slides/kube-halfday.yml#L6-L8)) and deploy +- [ ] (optional) Put chat link on [container.training front page](https://github.com/jpetazzo/container.training/blob/master/slides/index.html) +- [ ] How many VMs do we need? Check with event organizers ahead of time +- [ ] Provision VMs (slightly more than we think we'll need) +- [ ] Change password on presenter's VMs (to forestall any hijinx) +- [ ] Onsite: walk the room to count seats, check power supplies, lectern, A/V setup - [ ] Print cards - [ ] Cut cards -- [ ] Last minute merge from master +- [ ] Last-minute merge from master - [ ] Check that all looks good - [ ] DELIVER! -- [ ] Shutdown VMs +- [ ] Shut down VMs - [ ] Update index.html to remove chat link and move session to past things From aca51901a1ebf3abe28b73213baa69c2fdc788d6 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Mon, 5 Mar 2018 16:13:30 -0800 Subject: [PATCH 7/7] Tag images properly This tags the first build with v0.1, allowing for a smoother, more logical rollback. Also adds a slide explaining why to stay away from latest. @kelseyhightower would be proud :-) --- slides/kube/ourapponkube.md | 29 +++++++++++++++++++++++++++-- slides/kube/rollout.md | 6 +++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/slides/kube/ourapponkube.md b/slides/kube/ourapponkube.md index f2ec887d..e19227f5 100644 --- a/slides/kube/ourapponkube.md +++ b/slides/kube/ourapponkube.md @@ -185,6 +185,7 @@ The curl command should now output: - Build and push the images: ```bash export REGISTRY + export TAG=v0.1 docker-compose -f dockercoins.yml build docker-compose -f dockercoins.yml push ``` @@ -220,6 +221,30 @@ services: --- +class: extra-details + +## Avoiding the `latest` tag + +.warning[Make sure that you've set the `TAG` variable properly!] + +- If you don't, the tag will default to `latest` + +- The problem with `latest`: nobody knows what it points to! + + - the latest commit in the repo? + + - the latest commit in some branch? (Which one?) + + - the latest tag? + + - some random version pushed by a random team member? + +- If you keep pushing the `latest` tag, how do you roll back? + +- Image tags should be meaningful, i.e. correspond to code branches, tags, or hashes + +--- + ## Deploying all the things - We can now deploy our code (as well as a redis instance) @@ -234,7 +259,7 @@ services: - Deploy everything else: ```bash for SERVICE in hasher rng webui worker; do - kubectl run $SERVICE --image=$REGISTRY/$SERVICE + kubectl run $SERVICE --image=$REGISTRY/$SERVICE:$TAG done ``` @@ -268,7 +293,7 @@ services: --- -# Exposing services internally +# Exposing services internally - Three deployments need to be reachable by others: `hasher`, `redis`, `rng` diff --git a/slides/kube/rollout.md b/slides/kube/rollout.md index 21e25898..10a49913 100644 --- a/slides/kube/rollout.md +++ b/slides/kube/rollout.md @@ -149,7 +149,7 @@ Our rollout is stuck. However, the app is not dead (just 10% slower). - We want to: - - revert to `v0.1` (which we now realize we didn't tag - yikes!) + - revert to `v0.1` - be conservative on availability (always have desired number of available workers) - be aggressive on rollout speed (update more than one pod at a time) - give some time to our workers to "warm up" before starting more @@ -163,7 +163,7 @@ spec: spec: containers: - name: worker - image: $REGISTRY/worker:latest + image: $REGISTRY/worker:v0.1 strategy: rollingUpdate: maxUnavailable: 0 @@ -192,7 +192,7 @@ spec: spec: containers: - name: worker - image: $REGISTRY/worker:latest + image: $REGISTRY/worker:v0.1 strategy: rollingUpdate: maxUnavailable: 0