diff --git a/docs/creatingswarm.md b/docs/creatingswarm.md index b1bb0d56..9f97fde0 100644 --- a/docs/creatingswarm.md +++ b/docs/creatingswarm.md @@ -347,6 +347,9 @@ Some presentations from the Docker Distributed Systems Summit in Berlin: And DockerCon Black Belt talks: -.blackbelt[[Everything You Thought You Already Knew About Orchestration](https://www.youtube.com/watch?v=Qsv-q8WbIZY&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=6) by Laura Frank (DC17US)] +.blackbelt[DC17US: Everything You Thought You Already Knew About Orchestration + ([video](https://www.youtube.com/watch?v=Qsv-q8WbIZY&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=6))] + +.blackbelt[DC17EU: Container Orchestration from Theory to Practice + ([video](https://dockercon.docker.com/watch/5fhwnQxW8on1TKxPwwXZ5r))] -.blackbelt[Container Orchestration from Theory to Practice by Laura Frank and Stephen Day (Wednesday 14:25)] diff --git a/docs/leastprivilege.md b/docs/leastprivilege.md index 4f28e476..9bdc6a07 100644 --- a/docs/leastprivilege.md +++ b/docs/leastprivilege.md @@ -50,8 +50,11 @@ ## Learning more about container security -.blackbelt[[Securing Containers, One Patch At A Time](https://www.youtube.com/watch?v=jZSs1RHwcqo&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=4) by Michael Crosby (DC17US)] +.blackbelt[DC17US: Securing Containers, One Patch At A Time +([video](https://www.youtube.com/watch?v=jZSs1RHwcqo&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=4))] -.blackbelt[Container-relevant Upstream Kernel Developments by Tycho Andersen (Tuesday 14:55)] +.blackbelt[DC17EU: Container-relevant Upstream Kernel Developments +([video](https://dockercon.docker.com/watch/7JQBpvHJwjdW6FKXvMfCK1))] -.blackbelt[What Have Syscalls Done for you Lately? by Liz Rice (Tuesday 11:45)] +.blackbelt[DC17EU: What Have Syscalls Done for you Lately? +([video](https://dockercon.docker.com/watch/4ZxNyWuwk9JHSxZxgBBi6J))] diff --git a/docs/lisa.yml b/docs/lisa.yml new file mode 100644 index 00000000..8ebe6aa6 --- /dev/null +++ b/docs/lisa.yml @@ -0,0 +1,136 @@ +title: "LISA17 T9: Build, Ship, and Run Microservices on a Docker Swarm Cluster" + +chat: "[Slack](https://usenix-lisa.slack.com/messages/C0E6N1NJW)" + + +exclude: +- self-paced +- snap +- auto-btp +- benchmarking +- elk-manual +- prom-manual + +chapters: +- | + class: title + + .small[ + + LISA17 T9 + + Build, Ship, and Run Microservices on a Docker Swarm Cluster + + .small[.small[ + + **Be kind to the WiFi!** + + *Use the 5G network* +
+ *Don't use your hotspot* +
+ *Don't stream videos from YouTube, Netflix, etc. +
(if you're bored, watch local content instead)* + + + + Thank you! + + ] + ] + ] + + --- + + ## Intros + + - Hello! We are + AJ ([@s0ulshake](https://twitter.com/s0ulshake), Travis CI) + & + Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Docker Inc.) + + -- + + - This is our collective Docker knowledge: + + ![Bell Curve](bell-curve.jpg) + + --- + + ## Logistics + + - The tutorial will run from 1:30pm to 5:00pm + + - This will be fast-paced, but DON'T PANIC! + + - There will be a coffee break at 3:00pm +
+ (please remind us if we forget about it!) + + - Feel free to interrupt for questions at any time + + - All the content is publicly available (slides, code samples, scripts) + + One URL to remember: http://container.training + + - Live feedback, questions, help on @@CHAT@@ + +- intro.md +- | + @@TOC@@ +- - prereqs.md + - versions.md + - | + class: title + + All right! +
+ We're all set. +
+ Let's do this. + - sampleapp.md + - swarmkit.md + - creatingswarm.md + - morenodes.md +- - firstservice.md + - ourapponswarm.md + - updatingservices.md + #- rollingupdates.md + #- healthchecks.md +- - operatingswarm.md + #- netshoot.md + #- ipsec.md + #- swarmtools.md + - security.md + #- secrets.md + #- encryptionatrest.md + - leastprivilege.md + - apiscope.md + - logging.md + - metrics.md + #- stateful.md + #- extratips.md + - end.md +- | + class: title + + That's all folks!
Questions? + + .small[.small[ + + AJ ([@s0ulshake](https://twitter.com/s0ulshake)) — [@TravisCI](https://twitter.com/travisci) + + Jérôme ([@jpetazzo](https://twitter.com/jpetazzo)) — [@Docker](https://twitter.com/docker) + + ]] + + diff --git a/docs/metrics.md b/docs/metrics.md index 00909ddc..071fbdeb 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -1630,8 +1630,8 @@ class: prom, snap - [The Prometheus Time Series Database](https://www.youtube.com/watch?v=HbnGSNEjhUc), a talk explaining why custom data storage is necessary for metrics -.blackbelt[[Monitoring, the Prometheus Way -](https://www.youtube.com/watch?v=PDxcEzu62jk&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=5) by Julius Volz (DC17US)] +.blackbelt[DC17US: Monitoring, the Prometheus Way +([video](https://www.youtube.com/watch?v=PDxcEzu62jk&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=5))] -.blackbelt[How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series Databases - by Goutham Veeramachaneni (Tuesday 17:10)] +.blackbelt[DC17EU: Prometheus 2.0 Storage Engine +([video](https://dockercon.docker.com/watch/NNZ8GXHGomouwSXtXnxb8P))] diff --git a/docs/rollingupdates.md b/docs/rollingupdates.md new file mode 100644 index 00000000..235a93b7 --- /dev/null +++ b/docs/rollingupdates.md @@ -0,0 +1,139 @@ +# Rolling updates + +- Let's change a scaled service: `worker` + +.exercise[ + +- Edit `worker/worker.py` + +- Locate the `sleep` instruction and change the delay + +- Build, ship, and run our changes: + ```bash + export TAG=v0.4 + docker-compose -f dockercoins.yml build + docker-compose -f dockercoins.yml push + docker stack deploy -c dockercoins.yml dockercoins + ``` + +] + +--- + +## Viewing our update as it rolls out + +.exercise[ + +- Check the status of the `dockercoins_worker` service: + ```bash + watch docker service ps dockercoins_worker + ``` + +- Hide the tasks that are shutdown: + ```bash + watch -n1 "docker service ps dockercoins_worker | grep -v Shutdown.*Shutdown" + ``` + +] + +If you had stopped the workers earlier, this will automatically restart them. + +By default, SwarmKit does a rolling upgrade, one instance at a time. + +We should therefore see the workers being updated one my one. + +--- + +## Changing the upgrade policy + +- We can set upgrade parallelism (how many instances to update at the same time) + +- And upgrade delay (how long to wait between two batches of instances) + +.exercise[ + +- Change the parallelism to 2 and the delay to 5 seconds: + ```bash + docker service update dockercoins_worker \ + --update-parallelism 2 --update-delay 5s + ``` + +] + +The current upgrade will continue at a faster pace. + +--- + +## Changing the policy in the Compose file + +- The policy can also be updated in the Compose file + +- This is done by adding an `update_config` key under the `deploy` key: + + ```yaml + deploy: + replicas: 10 + update_config: + parallelism: 2 + delay: 10s + ``` + +--- + +## Rolling back + +- At any time (e.g. before the upgrade is complete), we can rollback: + + - by editing the Compose file and redeploying; + + - or with the special `--rollback` flag + +.exercise[ + +- Try to rollback the service: + ```bash + docker service update dockercoins_worker --rollback + ``` + +] + +What happens with the web UI graph? + +--- + +## The fine print with rollback + +- Rollback reverts to the previous service definition + +- If we visualize successive updates as a stack: + + - it doesn't "pop" the latest update + + - it "pushes" a copy of the previous update on top + + - ergo, rolling back twice does nothing + +- "Service definition" includes rollout cadence + +- Each `docker service update` command = a new service definition + +--- + +class: extra-details + +## Timeline of an upgrade + +- SwarmKit will upgrade N instances at a time +
(following the `update-parallelism` parameter) + +- New tasks are created, and their desired state is set to `Ready` +
.small[(this pulls the image if necessary, ensures resource availability, creates the container ... without starting it)] + +- If the new tasks fail to get to `Ready` state, go back to the previous step +
.small[(SwarmKit will try again and again, until the situation is addressed or desired state is updated)] + +- When the new tasks are `Ready`, it sets the old tasks desired state to `Shutdown` + +- When the old tasks are `Shutdown`, it starts the new tasks + +- Then it waits for the `update-delay`, and continues with the next batch of instances diff --git a/docs/selfpaced.yml b/docs/selfpaced.yml index e764e57b..7b34d3b4 100644 --- a/docs/selfpaced.yml +++ b/docs/selfpaced.yml @@ -44,6 +44,7 @@ chapters: - swarmnbt.md - ipsec.md - updatingservices.md + - rollingupdates.md - healthchecks.md - nodeinfo.md - swarmtools.md diff --git a/docs/updatingservices.md b/docs/updatingservices.md index aeef15ab..225c34f8 100644 --- a/docs/updatingservices.md +++ b/docs/updatingservices.md @@ -82,145 +82,3 @@ - Or just mash "reload" frantically - ... Eventually the legend on the left will be bigger! - ---- - -## Rolling updates - -- Let's change a scaled service: `worker` - -.exercise[ - -- Edit `worker/worker.py` - -- Locate the `sleep` instruction and change the delay - -- Build, ship, and run our changes: - ```bash - export TAG=v0.4 - docker-compose -f dockercoins.yml build - docker-compose -f dockercoins.yml push - docker stack deploy -c dockercoins.yml dockercoins - ``` - -] - ---- - -## Viewing our update as it rolls out - -.exercise[ - -- Check the status of the `dockercoins_worker` service: - ```bash - watch docker service ps dockercoins_worker - ``` - -- Hide the tasks that are shutdown: - ```bash - watch -n1 "docker service ps dockercoins_worker | grep -v Shutdown.*Shutdown" - ``` - -] - -If you had stopped the workers earlier, this will automatically restart them. - -By default, SwarmKit does a rolling upgrade, one instance at a time. - -We should therefore see the workers being updated one my one. - ---- - -## Changing the upgrade policy - -- We can set upgrade parallelism (how many instances to update at the same time) - -- And upgrade delay (how long to wait between two batches of instances) - -.exercise[ - -- Change the parallelism to 2 and the delay to 5 seconds: - ```bash - docker service update dockercoins_worker \ - --update-parallelism 2 --update-delay 5s - ``` - -] - -The current upgrade will continue at a faster pace. - ---- - -## Changing the policy in the Compose file - -- The policy can also be updated in the Compose file - -- This is done by adding an `update_config` key under the `deploy` key: - - ```yaml - deploy: - replicas: 10 - update_config: - parallelism: 2 - delay: 10s - ``` - ---- - -## Rolling back - -- At any time (e.g. before the upgrade is complete), we can rollback: - - - by editing the Compose file and redeploying; - - - or with the special `--rollback` flag - -.exercise[ - -- Try to rollback the service: - ```bash - docker service update dockercoins_worker --rollback - ``` - -] - -What happens with the web UI graph? - ---- - -## The fine print with rollback - -- Rollback reverts to the previous service definition - -- If we visualize successive updates as a stack: - - - it doesn't "pop" the latest update - - - it "pushes" a copy of the previous update on top - - - ergo, rolling back twice does nothing - -- "Service definition" includes rollout cadence - -- Each `docker service update` command = a new service definition - ---- - -class: extra-details - -## Timeline of an upgrade - -- SwarmKit will upgrade N instances at a time -
(following the `update-parallelism` parameter) - -- New tasks are created, and their desired state is set to `Ready` -
.small[(this pulls the image if necessary, ensures resource availability, creates the container ... without starting it)] - -- If the new tasks fail to get to `Ready` state, go back to the previous step -
.small[(SwarmKit will try again and again, until the situation is addressed or desired state is updated)] - -- When the new tasks are `Ready`, it sets the old tasks desired state to `Shutdown` - -- When the old tasks are `Shutdown`, it starts the new tasks - -- Then it waits for the `update-delay`, and continues with the next batch of instances