mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-04-19 08:36:39 +00:00
Round of update for video content
This commit is contained in:
@@ -68,6 +68,8 @@ that you [provisioned yourself](https://github.com/jpetazzo/container.training/t
|
||||
docker node ls
|
||||
```
|
||||
|
||||
<!-- ```wait Swarm is encrypted``` -->
|
||||
|
||||
]
|
||||
|
||||
(The last command should fail, and it will tell you how to unlock this node.)
|
||||
|
||||
@@ -281,6 +281,8 @@ class: extra-details
|
||||
|
||||
.exercise[
|
||||
|
||||
<!-- Give it a few seconds to be ready ```bash sleep 5``` -->
|
||||
|
||||
- Try the following command:
|
||||
```bash
|
||||
curl localhost:9200
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
docker run --net host nicolaka/netshoot ngrep -tpd eth0 HTTP
|
||||
```
|
||||
|
||||
<!-- ```wait User-Agent``` -->
|
||||
<!-- ```keys ^C``` -->
|
||||
|
||||
]
|
||||
|
||||
--
|
||||
|
||||
@@ -284,6 +284,8 @@ Once again, we will send 50 requests, with different levels of concurrency.
|
||||
ab -c 50 -n 50 -T application/octet-stream -p /tmp/random http://hasher/
|
||||
```
|
||||
|
||||
<!-- ```bash exit``` -->
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
@@ -29,11 +29,17 @@
|
||||
watch docker service ps dockercoins_worker
|
||||
```
|
||||
|
||||
<!-- ```wait dockercoins_worker.1``` -->
|
||||
<!-- ```keys ^C``` -->
|
||||
|
||||
- Hide the tasks that are shutdown:
|
||||
```bash
|
||||
watch -n1 "docker service ps dockercoins_worker | grep -v Shutdown.*Shutdown"
|
||||
```
|
||||
|
||||
<!-- ```wait dockercoins_worker.1``` -->
|
||||
<!-- ```keys ^C``` -->
|
||||
|
||||
]
|
||||
|
||||
If you had stopped the workers earlier, this will automatically restart them.
|
||||
|
||||
@@ -68,13 +68,16 @@ class: secrets
|
||||
```bash
|
||||
docker service create \
|
||||
--secret hackme --secret arewesecureyet \
|
||||
--name dummyservice --mode global \
|
||||
--name dummyservice \
|
||||
--constraint node.hostname==$HOSTNAME \
|
||||
alpine sleep 1000000000
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
We use a global service to make sure that there will be an instance on the local node.
|
||||
We constrain the container to be on the local node for convenience.
|
||||
<br/>
|
||||
(We are going to use `docker exec` in just a moment!)
|
||||
|
||||
---
|
||||
|
||||
@@ -98,6 +101,9 @@ class: secrets
|
||||
|
||||
- Check the files in `/run/secrets`
|
||||
|
||||
<!-- ```bash grep . /run/secrets/*``` -->
|
||||
<!-- ```bash exit``` -->
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
@@ -152,6 +152,8 @@ It *cannot* work on live files, so you must stop Docker or make a copy first.
|
||||
cp -r /graph/swarm /swarmdata
|
||||
```
|
||||
|
||||
<!-- ```wait cp: cannot stat``` -->
|
||||
|
||||
- Otherwise, it is in the default `/var/lib/docker`:
|
||||
```bash
|
||||
sudo cp -r /var/lib/docker/swarm /swarmdata
|
||||
@@ -174,6 +176,8 @@ It *cannot* work on live files, so you must stop Docker or make a copy first.
|
||||
/lib/ld-musl-x86_64.so.1 /usr/local/bin/swarm-rafttool -d /swarmdata/ dump-wal
|
||||
```
|
||||
|
||||
<!-- ```wait -bash:``` -->
|
||||
|
||||
- Otherwise, you don't need the musl linker but you need to get root:
|
||||
```bash
|
||||
sudo swarm-rafttool -d /swarmdata/ dump-wal
|
||||
|
||||
Reference in New Issue
Block a user