From a3ef8efaf5abcf2245571ed0dc6212a53de1df5f Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Mon, 22 Apr 2019 12:04:33 -0500 Subject: [PATCH] Customizations for PyCon 2019 --- slides/_redirects | 2 +- slides/k8s/concepts-k8s.md | 54 -------------------------------------- slides/k8s/rollout.md | 53 +------------------------------------ slides/k8s/whatsnext.md | 38 --------------------------- slides/kube-fullday.yml | 31 +++++++++++----------- slides/logistics.md | 22 ++-------------- slides/shared/sampleapp.md | 38 --------------------------- 7 files changed, 20 insertions(+), 218 deletions(-) diff --git a/slides/_redirects b/slides/_redirects index 142cc30f..fa81b13b 100644 --- a/slides/_redirects +++ b/slides/_redirects @@ -1,4 +1,4 @@ # Uncomment and/or edit one of the the following lines if necessary. #/ /kube-halfday.yml.html 200 -#/ /kube-fullday.yml.html 200 +/ /kube-fullday.yml.html 200 #/ /kube-twodays.yml.html 200 diff --git a/slides/k8s/concepts-k8s.md b/slides/k8s/concepts-k8s.md index 78e524a3..b1ebc6ef 100644 --- a/slides/k8s/concepts-k8s.md +++ b/slides/k8s/concepts-k8s.md @@ -171,60 +171,6 @@ class: pic --- -## Do we need to run Docker at all? - -No! - --- - -- By default, Kubernetes uses the Docker Engine to run containers - -- We could also use `rkt` ("Rocket") from CoreOS - -- Or leverage other pluggable runtimes through the *Container Runtime Interface* - - (like CRI-O, or containerd) - ---- - -## Do we need to run Docker at all? - -Yes! - --- - -- In this workshop, we run our app on a single node first - -- We will need to build images and ship them around - -- We can do these things without Docker -
- (and get diagnosed with NIH¹ syndrome) - -- Docker is still the most stable container engine today -
- (but other options are maturing very quickly) - -.footnote[¹[Not Invented Here](https://en.wikipedia.org/wiki/Not_invented_here)] - ---- - -## Do we need to run Docker at all? - -- On our development environments, CI pipelines ... : - - *Yes, almost certainly* - -- On our production servers: - - *Yes (today)* - - *Probably not (in the future)* - -.footnote[More information about CRI [on the Kubernetes blog](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes)] - ---- - ## Kubernetes resources - The Kubernetes API defines a lot of objects called *resources* diff --git a/slides/k8s/rollout.md b/slides/k8s/rollout.md index b01111b4..e9f9440d 100644 --- a/slides/k8s/rollout.md +++ b/slides/k8s/rollout.md @@ -62,29 +62,6 @@ --- -## Building a new version of the `worker` service - -.exercise[ - -- Go to the `stack` directory: - ```bash - cd ~/container.training/stacks - ``` - -- Edit `dockercoins/worker/worker.py`; update the first `sleep` line to sleep 1 second - -- Build a new tag and push it to the registry: - ```bash - #export REGISTRY=localhost:3xxxx - export TAG=v0.2 - docker-compose -f dockercoins.yml build - docker-compose -f dockercoins.yml push - ``` - -] - ---- - ## Rolling out the new `worker` service .exercise[ @@ -103,6 +80,7 @@ - Update `worker` either with `kubectl edit`, or by running: ```bash + export TAG=v0.2 kubectl set image deploy worker worker=$REGISTRY/worker:$TAG ``` @@ -208,35 +186,6 @@ class: extra-details --- -## Checking the dashboard during the bad rollout - -If you haven't deployed the Kubernetes dashboard earlier, just skip this slide. - -.exercise[ - -- Check which port the dashboard is on: - ```bash - kubectl -n kube-system get svc socat - ``` - -] - -Note the `3xxxx` port. - -.exercise[ - -- Connect to http://oneofournodes:3xxxx/ - - - -] - --- - -- We have failures in Deployments, Pods, and Replica Sets - ---- - ## Recovering from a bad rollout - We could push some `v0.3` image diff --git a/slides/k8s/whatsnext.md b/slides/k8s/whatsnext.md index 0b7d39be..d46e881c 100644 --- a/slides/k8s/whatsnext.md +++ b/slides/k8s/whatsnext.md @@ -223,44 +223,6 @@ And *then* it is time to look at orchestration! --- -## Cluster federation - --- - -![Star Trek Federation](images/startrek-federation.jpg) - --- - -Sorry Star Trek fans, this is not the federation you're looking for! - --- - -(If I add "Your cluster is in another federation" I might get a 3rd fandom wincing!) - ---- - -## Cluster federation - -- Kubernetes master operation relies on etcd - -- etcd uses the [Raft](https://raft.github.io/) protocol - -- Raft recommends low latency between nodes - -- What if our cluster spreads to multiple regions? - --- - -- Break it down in local clusters - -- Regroup them in a *cluster federation* - -- Synchronize resources across clusters - -- Discover resources across clusters - ---- - ## Developer experience *We've put this last, but it's pretty important!* diff --git a/slides/kube-fullday.yml b/slides/kube-fullday.yml index 7313ce00..fbe4cdd3 100644 --- a/slides/kube-fullday.yml +++ b/slides/kube-fullday.yml @@ -1,14 +1,15 @@ title: | - Deploying and Scaling Microservices - with Kubernetes + Getting started with + Kubernetes and + container orchestration #chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)" -#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)" -chat: "In person!" +chat: "[Gitter](https://gitter.im/jpetazzo/workshop-20190501)" +#chat: "In person!" gitrepo: github.com/jpetazzo/container.training -slides: http://container.training/ +slides: http://pycon2019.container.training/ exclude: - self-paced @@ -20,7 +21,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md - - k8s/versions-k8s.md +# - k8s/versions-k8s.md - shared/sampleapp.md # - shared/composescale.md # - shared/hastyconclusions.md @@ -28,34 +29,34 @@ chapters: - k8s/concepts-k8s.md - shared/declarative.md - k8s/declarative.md -- - k8s/kubenet.md + - k8s/kubenet.md - k8s/kubectlget.md - - k8s/setup-k8s.md +# - k8s/setup-k8s.md - k8s/kubectlrun.md - - k8s/kubectlexpose.md -- - k8s/shippingimages.md +- - k8s/kubectlexpose.md + - k8s/shippingimages.md # - k8s/buildshiprun-selfhosted.md - k8s/buildshiprun-dockerhub.md - k8s/ourapponkube.md # - k8s/kubectlproxy.md # - k8s/localkubeconfig.md # - k8s/accessinternal.md - - k8s/dashboard.md +# - k8s/dashboard.md # - k8s/kubectlscale.md - k8s/scalingdockercoins.md - shared/hastyconclusions.md - k8s/daemonset.md -- - k8s/rollout.md + - k8s/rollout.md # - k8s/healthchecks.md - - k8s/logs-cli.md - - k8s/logs-centralized.md +# - k8s/logs-cli.md +# - k8s/logs-centralized.md #- - k8s/helm.md # - k8s/namespaces.md # - k8s/netpol.md # - k8s/authn-authz.md #- - k8s/ingress.md # - k8s/gitworkflows.md - - k8s/prometheus.md +# - k8s/prometheus.md #- - k8s/volumes.md # - k8s/build-with-docker.md # - k8s/build-with-kaniko.md diff --git a/slides/logistics.md b/slides/logistics.md index 33388a06..5ca1192d 100644 --- a/slides/logistics.md +++ b/slides/logistics.md @@ -1,32 +1,14 @@ ## Intros -- This slide should be customized by the tutorial instructor(s). - - Hello! We are: - - .emoji[👩🏻‍🏫] Ann O'Nymous ([@...](https://twitter.com/...), Megacorp Inc) - - - .emoji[👨🏾‍🎓] Stu Dent ([@...](https://twitter.com/...), University of Wakanda) - - - -- The workshop will run from ... - -- There will be a lunch break at ... - - (And coffee breaks!) +- There will be a short coffee break at 10:30am - Feel free to interrupt for questions at any time diff --git a/slides/shared/sampleapp.md b/slides/shared/sampleapp.md index cd9db553..d6b57ef7 100644 --- a/slides/shared/sampleapp.md +++ b/slides/shared/sampleapp.md @@ -165,26 +165,6 @@ https://@@GITREPO@@/blob/8279a3bce9398f7c1a53bdd95187c53eda4e6435/dockercoins/wo --- -class: extra-details - -## Links, naming, and service discovery - -- Containers can have network aliases (resolvable through DNS) - -- Compose file version 2+ makes each container reachable through its service name - -- Compose file version 1 did require "links" sections - -- Network aliases are automatically namespaced - - - you can have multiple apps declaring and using a service named `database` - - - containers in the blue app will resolve `database` to the IP of the blue database - - - containers in the green app will resolve `database` to the IP of the green database - ---- - ## Show me the code! - You can check the GitHub repository with all the materials of this workshop: @@ -210,24 +190,6 @@ class: extra-details --- -class: extra-details - -## Compose file format version - -*This is relevant only if you have used Compose before 2016...* - -- Compose 1.6 introduced support for a new Compose file format (aka "v2") - -- Services are no longer at the top level, but under a `services` section - -- There has to be a `version` key at the top level, with value `"2"` (as a string, not an integer) - -- Containers are placed on a dedicated network, making links unnecessary - -- There are other minor differences, but upgrade is easy and straightforward - ---- - ## Our application at work - On the left-hand side, the "rainbow strip" shows the container names