From 1a67a1397b951e397bfc3814bcd9d04f971bfe7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 8 Nov 2017 23:10:34 -0800 Subject: [PATCH] Misc autotest improvements --- slides/common/sampleapp.md | 2 +- slides/swarm/creatingswarm.md | 2 ++ slides/swarm/firstservice.md | 18 +++++++++++------- slides/swarm/netshoot.md | 6 ++++-- slides/swarm/swarmmode.md | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/slides/common/sampleapp.md b/slides/common/sampleapp.md index da29a98b..c1a787fd 100644 --- a/slides/common/sampleapp.md +++ b/slides/common/sampleapp.md @@ -133,7 +133,7 @@ Without further ado, let's start our application. ``` diff --git a/slides/swarm/creatingswarm.md b/slides/swarm/creatingswarm.md index 463f0f21..c8a9e6df 100644 --- a/slides/swarm/creatingswarm.md +++ b/slides/swarm/creatingswarm.md @@ -226,6 +226,8 @@ class: extra-details docker node ls ``` + + - This is because the node that we added is currently a *worker* - Only *managers* can accept Swarm-specific commands diff --git a/slides/swarm/firstservice.md b/slides/swarm/firstservice.md index 20dedb39..4a709f6a 100644 --- a/slides/swarm/firstservice.md +++ b/slides/swarm/firstservice.md @@ -8,12 +8,12 @@ - Create a service featuring an Alpine container pinging Google resolvers: ```bash - docker service create alpine ping 8.8.8.8 + docker service create --name pingpong alpine ping 8.8.8.8 ``` - Check the result: ```bash - docker service ps + docker service ps pingpong ``` ] @@ -47,7 +47,7 @@ You can ignore that for now; but we'll come back to it in just a few minutes! - Check the output of our ping command: ```bash - docker service logs + docker service logs pingpong ``` ] @@ -82,7 +82,7 @@ class: extra-details - Look up the `NODE` on which the container is running: ```bash - docker service ps + docker service ps pingpong ``` - If you use Play-With-Docker, switch to that node's tab, or set `DOCKER_HOST` @@ -106,9 +106,11 @@ class: extra-details - View its logs: ```bash - docker logs + docker logs containerID ``` + + - Go back to `node1` afterwards ] @@ -123,7 +125,7 @@ class: extra-details - Scale the service to ensure 2 copies per node: ```bash - docker service update --replicas 10 --detach=true + docker service update pingpong --replicas 10 --detach=true ``` - Check that we have two containers on the current node: @@ -147,7 +149,7 @@ class: extra-details - Scale the service to ensure 3 copies per node: ```bash - docker service update --replicas 15 --detach=false + docker service update pingpong --replicas 15 --detach=false ``` ] @@ -402,6 +404,8 @@ https://docs.docker.com/engine/userguide/networking/get-started-macvlan/ docker-compose up -d ``` + + ] --- diff --git a/slides/swarm/netshoot.md b/slides/swarm/netshoot.md index 308fc33b..3a3dae41 100644 --- a/slides/swarm/netshoot.md +++ b/slides/swarm/netshoot.md @@ -59,9 +59,11 @@ The `constraint` makes sure that the container will be created on the local node - Enter it: ```bash - docker exec -ti sh + docker exec -ti containerID sh ``` + + ] --- @@ -129,7 +131,7 @@ It is a virtual IP address (VIP) for the `rng` service. - Try to ping the VIP: ```bash - ping rng + ping -c 3 rng ``` ] diff --git a/slides/swarm/swarmmode.md b/slides/swarm/swarmmode.md index e13dab47..1adfe390 100644 --- a/slides/swarm/swarmmode.md +++ b/slides/swarm/swarmmode.md @@ -34,7 +34,7 @@ docker node ls ``` - + ]