Merge pull request #1875 from moxiegirl/carry-close-1852

Fixed typos and formatting issues.
This commit is contained in:
moxiegirl 2016-02-24 09:28:03 -08:00
commit 9617bdb860
1 changed files with 7 additions and 6 deletions

View File

@ -106,7 +106,7 @@ Here, you connect to each of the hosts and create a Swarm manager or node.
manager * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
2. Your client should still be pointing to Docker Engine on `manager`. Use the following syntax to run a Swarm container as the primary Swarm manager on `manager`.
2. Your client should still be pointing to Docker Engine on `manager`. Use the following syntax to run a Swarm container that functions as the primary manager on `manager`.
$ docker run -d -p <your_selected_port>:3376 -t -v /var/lib/boot2docker:/certs:ro swarm manage -H 0.0.0.0:3376 --tlsverify --tlscacert=/certs/ca.pem --tlscert=/certs/server.pem --tlskey=/certs/server-key.pem token://<cluster_id>
@ -120,7 +120,7 @@ Here, you connect to each of the hosts and create a Swarm manager or node.
$ eval $(docker-machine env agent1)
4. Use the following syntax to run a Swarm container as an agent on `agent1`. Replace `<node_ip>` with the IP address of the VM from above, or use the `docker-machine ip` command.
4. Use the following syntax to run a Swarm container that functions as an agent on `agent1`. Replace `<node_ip>` with the IP address of the VM from above, or use the `docker-machine ip` command.
$ docker run -d swarm join --addr=<node_ip>:<node_port> token://<cluster_id>
@ -148,7 +148,7 @@ Here, you connect to the cluster and review information about the Swarm manager
$ DOCKER_HOST=$(docker-machine ip manager):3376
Because Docker Swarm uses the standard Docker API, you can connect to it using Docker Client and other tools such as Docker Compose, Dokku, Jenkins, and Krane, among others.
Because Docker Swarm uses the standard Docker API, you can connect to it using Docker Client and other tools such as Docker Compose, Dokku, Jenkins, and Krane, among others.
2. Get information about the Swarm.
@ -172,21 +172,22 @@ Here, you connect to the cluster and review information about the Swarm manager
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0b0628349187 hello-world "/hello" 20 minutes ago Exited (0) 20 minutes ago agent1
0b0628349187 hello-world "/hello" 20 minutes ago Exited (0) 11 seconds ago agent1
.
.
.
In this case, the Swarm ran 'hello-world' on the 'swarm1'.
In this case, the Swarm ran `hello-world` on `agent1`.
By default, Docker Swarm uses the "spread" strategy to choose which node runs a container. When you run multiple containers, the spread strategy assigns each container to the node with the fewest containers.
## Where to go next
At this point, you've done the following:
- Created a Swarm discovery token.
- Created Swarm nodes using Docker Machine.
- Managed a Swarm and run containers on it.
- Managed a Swarm cluster and run containers on it.
- Learned Swarm-related concepts and terminology.
However, Docker Swarm has many other aspects and capabilities.