mirror of https://github.com/docker/docs.git
ucp: fix whitespace on node labels doc (#9395)
what i did: - fix whitespace so markdown numbering is consistent how i tested: 1. build docs locally `docker-compose build; docker-compose up -d` 2. verify numbering corrected 3. deploy compose file through UCP 3.2.1 UI to make sure its spacing was unaffected\* \* note: not addressing outdated screenshots with this commit Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
This commit is contained in:
parent
dbee5b0ab6
commit
5a466a57c3
|
|
@ -30,13 +30,14 @@ scheduled to run on a node that has the `ssd` label.
|
||||||
2. Select **Nodes** in the left-hand navigation menu.
|
2. Select **Nodes** in the left-hand navigation menu.
|
||||||
3. In the nodes list, select the node to which you want to apply labels.
|
3. In the nodes list, select the node to which you want to apply labels.
|
||||||
4. In the details pane, select the edit node icon in the upper-right corner to edit the node.
|
4. In the details pane, select the edit node icon in the upper-right corner to edit the node.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
5. In the **Edit Node** page, scroll down to the **Labels** section.
|
5. In the **Edit Node** page, scroll down to the **Labels** section.
|
||||||
6. Select **Add Label**.
|
6. Select **Add Label**.
|
||||||
7. Add a label with the key `disk` and a value of `ssd`.
|
7. Add a label with the key `disk` and a value of `ssd`.
|
||||||
|
|
||||||
{: .with-border}
|
{: .with-border}
|
||||||
|
|
||||||
8. Click **Save** then dismiss the **Edit Node** page.
|
8. Click **Save** then dismiss the **Edit Node** page.
|
||||||
9. In the node's details pane, select **Labels** to view the labels that are applied to the node.
|
9. In the node's details pane, select **Labels** to view the labels that are applied to the node.
|
||||||
|
|
@ -60,67 +61,66 @@ service to be scheduled only on nodes that have SSD storage:
|
||||||
1. Navigate to the **Stacks** page.
|
1. Navigate to the **Stacks** page.
|
||||||
2. Name the new stack "wordpress".
|
2. Name the new stack "wordpress".
|
||||||
3. Under **Orchestrator Mode**, select **Swarm Services**.
|
3. Under **Orchestrator Mode**, select **Swarm Services**.
|
||||||
|
|
||||||
4. In the **docker-compose.yml** editor, paste the following stack file.
|
4. In the **docker-compose.yml** editor, paste the following stack file.
|
||||||
|
|
||||||
```
|
```
|
||||||
version: "3.1"
|
version: "3.1"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.labels.disk == ssd
|
- node.labels.disk == ssd
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
networks:
|
networks:
|
||||||
- wordpress-net
|
- wordpress-net
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: wordpress
|
MYSQL_ROOT_PASSWORD: wordpress
|
||||||
MYSQL_DATABASE: wordpress
|
MYSQL_DATABASE: wordpress
|
||||||
MYSQL_USER: wordpress
|
MYSQL_USER: wordpress
|
||||||
MYSQL_PASSWORD: wordpress
|
MYSQL_PASSWORD: wordpress
|
||||||
wordpress:
|
wordpress:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
image: wordpress:latest
|
image: wordpress:latest
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.labels.disk == ssd
|
- node.labels.disk == ssd
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
networks:
|
networks:
|
||||||
- wordpress-net
|
- wordpress-net
|
||||||
ports:
|
ports:
|
||||||
- "8000:80"
|
- "8000:80"
|
||||||
environment:
|
environment:
|
||||||
WORDPRESS_DB_HOST: db:3306
|
WORDPRESS_DB_HOST: db:3306
|
||||||
WORDPRESS_DB_PASSWORD: wordpress
|
WORDPRESS_DB_PASSWORD: wordpress
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
wordpress-net:
|
wordpress-net:
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Click **Create** to deploy the stack, and when the stack deploys,
|
5. Click **Create** to deploy the stack, and when the stack deploys,
|
||||||
click **Done**.
|
click **Done**.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
6. Navigate to the **Nodes** page, and click the node that has the
|
6. Navigate to the **Nodes** page, and click the node that has the
|
||||||
`disk` label. In the details pane, click the **Inspect Resource**
|
`disk` label. In the details pane, click the **Inspect Resource**
|
||||||
dropdown and select **Containers**.
|
dropdown and select **Containers**.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Dismiss the filter and navigate to the **Nodes** page. Click a node that
|
Dismiss the filter and navigate to the **Nodes** page. Click a node that
|
||||||
doesn't have the `disk` label. In the details pane, click the
|
doesn't have the `disk` label. In the details pane, click the
|
||||||
**Inspect Resource** dropdown and select **Containers**. There are no
|
**Inspect Resource** dropdown and select **Containers**. There are no
|
||||||
WordPress containers scheduled on the node. Dismiss the filter.
|
WordPress containers scheduled on the node. Dismiss the filter.
|
||||||
|
|
||||||
## Add a constraint to a service by using the UCP web UI
|
## Add a constraint to a service by using the UCP web UI
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue