|
@@ -37,7 +37,7 @@ run your manager node. For example, the tutorial uses a machine named
|
|
e216jshn25ckzbvmwlnh5jr3g * manager1 Ready Active Leader
|
|
e216jshn25ckzbvmwlnh5jr3g * manager1 Ready Active Leader
|
|
```
|
|
```
|
|
|
|
|
|
-2. If you aren't still running the `redis` service from the [rolling
|
|
|
|
|
|
+3. If you aren't still running the `redis` service from the [rolling
|
|
update](rolling-update.md) tutorial, start it now:
|
|
update](rolling-update.md) tutorial, start it now:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -46,7 +46,7 @@ update](rolling-update.md) tutorial, start it now:
|
|
c5uo6kdmzpon37mgj9mwglcfw
|
|
c5uo6kdmzpon37mgj9mwglcfw
|
|
```
|
|
```
|
|
|
|
|
|
-3. Run `docker service tasks redis` to see how the Swarm manager assigned the
|
|
|
|
|
|
+4. Run `docker service tasks redis` to see how the Swarm manager assigned the
|
|
tasks to different nodes:
|
|
tasks to different nodes:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -61,7 +61,7 @@ tasks to different nodes:
|
|
In this case the swarm manager distributed one task to each node. You may
|
|
In this case the swarm manager distributed one task to each node. You may
|
|
see the tasks distributed differently among the nodes in your environment.
|
|
see the tasks distributed differently among the nodes in your environment.
|
|
|
|
|
|
-4. Run `docker node update --availability drain <NODE-ID>` to drain a node that
|
|
|
|
|
|
+5. Run `docker node update --availability drain <NODE-ID>` to drain a node that
|
|
had a task assigned to it:
|
|
had a task assigned to it:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -70,7 +70,7 @@ had a task assigned to it:
|
|
worker1
|
|
worker1
|
|
```
|
|
```
|
|
|
|
|
|
-5. Inspect the node to check its availability:
|
|
|
|
|
|
+6. Inspect the node to check its availability:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
$ docker node inspect --pretty worker1
|
|
$ docker node inspect --pretty worker1
|
|
@@ -85,7 +85,7 @@ had a task assigned to it:
|
|
|
|
|
|
The drained node shows `Drain` for `AVAILABILITY`.
|
|
The drained node shows `Drain` for `AVAILABILITY`.
|
|
|
|
|
|
-6. Run `docker service tasks redis` to see how the Swarm manager updated the
|
|
|
|
|
|
+7. Run `docker service tasks redis` to see how the Swarm manager updated the
|
|
task assignments for the `redis` service:
|
|
task assignments for the `redis` service:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -101,7 +101,7 @@ task assignments for the `redis` service:
|
|
with `Drain` availability and creating a new task on a node with `Active`
|
|
with `Drain` availability and creating a new task on a node with `Active`
|
|
availability.
|
|
availability.
|
|
|
|
|
|
-7. Run `docker node update --availability active <NODE-ID>` to return the
|
|
|
|
|
|
+8. Run `docker node update --availability active <NODE-ID>` to return the
|
|
drained node to an active state:
|
|
drained node to an active state:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -110,7 +110,7 @@ drained node to an active state:
|
|
worker1
|
|
worker1
|
|
```
|
|
```
|
|
|
|
|
|
-8. Inspect the node to see the updated state:
|
|
|
|
|
|
+9. Inspect the node to see the updated state:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
$ docker node inspect --pretty worker1
|
|
$ docker node inspect --pretty worker1
|