mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-17 20:09:43 +00:00
Misc autotest improvements
This commit is contained in:
@@ -133,7 +133,7 @@ Without further ado, let's start our application.
|
||||
```
|
||||
|
||||
<!--
|
||||
```wait units of work done```
|
||||
```longwait units of work done```
|
||||
```keys ^C```
|
||||
-->
|
||||
|
||||
|
||||
@@ -226,6 +226,8 @@ class: extra-details
|
||||
docker node ls
|
||||
```
|
||||
|
||||
<!-- Ignore errors: ```wait not a swarm manager``` -->
|
||||
|
||||
- This is because the node that we added is currently a *worker*
|
||||
- Only *managers* can accept Swarm-specific commands
|
||||
|
||||
|
||||
@@ -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 <serviceID>
|
||||
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 <serviceID>
|
||||
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 <serviceID>
|
||||
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 <containerID>
|
||||
docker logs containerID
|
||||
```
|
||||
|
||||
<!-- ```wait No such container: 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 <serviceID> --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 <serviceID> --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
|
||||
```
|
||||
|
||||
<!-- ```longwait Creating dockerswarmvisualizer_viz_1``` -->
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
@@ -59,9 +59,11 @@ The `constraint` makes sure that the container will be created on the local node
|
||||
|
||||
- Enter it:
|
||||
```bash
|
||||
docker exec -ti <containerID> sh
|
||||
docker exec -ti containerID sh
|
||||
```
|
||||
|
||||
<!-- ```wait No such container: containerID``` -->
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
@@ -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
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
docker node ls
|
||||
```
|
||||
|
||||
<!-- Ignore errors: ```wait ``` -->
|
||||
<!-- Ignore errors: ```wait not a swarm manager``` -->
|
||||
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user