Updating with new tooling that supports GitHub source Markdown

Signed-off-by: Mary Anthony <mary@docker.com>
This commit is contained in:
Mary Anthony 2015-10-13 04:18:50 -07:00
parent 3fc52aa81d
commit f1a64ea23a
6 changed files with 54 additions and 69 deletions

View File

@ -1,4 +1,4 @@
FROM docs/base:latest FROM docs/base:hugo-github-linking
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl) MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
# to get the git info for this repo # to get the git info for this repo
@ -6,22 +6,10 @@ COPY . /src
COPY . /docs/content/swarm/ COPY . /docs/content/swarm/
# Sed to process GitHub Markdown RUN svn checkout https://github.com/docker/docker/trunk/docs /docs/content/engine
# 1-2 Remove comment code from metadata block RUN svn checkout https://github.com/docker/compose/trunk/docs /docs/content/compose
# 3 Change ](/word to ](/project/ in links RUN svn checkout https://github.com/docker/machine/trunk/docs /docs/content/machine
# 4 Change ](word.md) to ](/project/word) RUN svn checkout https://github.com/docker/distribution/trunk/docs /docs/content/registry
# 5 Remove .md extension from link text RUN svn checkout https://github.com/kitematic/kitematic/trunk/docs /docs/content/kitematic
# 6 Change ](./ to ](/project/word) RUN svn checkout https://github.com/docker/tutorials/trunk/docs /docs/content/tutorials
# 7 Change ](../../ to ](/project/ RUN svn checkout https://github.com/docker/opensource/trunk/docs /docs/content
# 8 Change ](../ to ](/project/
#
RUN find /docs/content/swarm -type f -name "*.md" -exec sed -i.old \
-e '/^<!.*metadata]>/g' \
-e '/^<!.*end-metadata.*>/g' \
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/swarm\//g' \
-e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/swarm\/\2/g' \
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
-e 's/\(\][(]\)\(\.\/\)/\1\/swarm\//g' \
-e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/swarm\//g' \
-e 's/\(\][(]\)\(\.\.\/\)/\1\/swarm\//g' {} \;

View File

@ -226,7 +226,7 @@ discovery README in the Docker Swarm repository</a>.
## Docker Swarm documentation index ## Docker Swarm documentation index
- [User guide](/) - [User guide]()
- [Scheduler strategies](/scheduler/strategy.md) - [Scheduler strategies](scheduler/strategy.md)
- [Scheduler filters](/scheduler/filter.md) - [Scheduler filters](scheduler/filter.md)
- [Swarm API](/api/swarm-api.md) - [Swarm API](api/swarm-api.md)

View File

@ -54,12 +54,12 @@ To dynamically configure and manage the services in your containers, you use a d
## Advanced Scheduling ## Advanced Scheduling
To learn more about advanced scheduling, see the To learn more about advanced scheduling, see the
[strategies](/scheduler/strategy) and [filters](/scheduler/filter.md) [strategies](scheduler/strategy.md) and [filters](scheduler/filter.md)
documents. documents.
## Swarm API ## Swarm API
The [Docker Swarm API](/api/swarm-api.md) is compatible with The [Docker Swarm API](api/swarm-api.md) is compatible with
the [Docker remote the [Docker remote
API](http://docs.docker.com/reference/api/docker_remote_api/), and extends it API](http://docs.docker.com/reference/api/docker_remote_api/), and extends it
with some new endpoints. with some new endpoints.

View File

@ -38,7 +38,7 @@ node with a discovery service. This example uses the token discovery
service hosted by Docker Hub. This discovery service associates a service hosted by Docker Hub. This discovery service associates a
token with instances of the Docker Daemon running on each node. Other token with instances of the Docker Daemon running on each node. Other
discovery service backends such as `etcd`, `consul`, and `zookeeper` discovery service backends such as `etcd`, `consul`, and `zookeeper`
are [available](/discovery). are [available](discovery.md).
1. List the machines on your system. 1. List the machines on your system.
@ -56,13 +56,13 @@ are [available](/discovery).
INFO[0000] Creating VirtualBox VM... INFO[0000] Creating VirtualBox VM...
INFO[0005] Starting VirtualBox VM... INFO[0005] Starting VirtualBox VM...
INFO[0005] Waiting for VM to start... INFO[0005] Waiting for VM to start...
INFO[0050] "local" has been created and is now the active machine. INFO[0050] "local" has been created and is now the active machine.
INFO[0050] To point your Docker client at it, run this in your shell: eval "$(docker-machine env local)" INFO[0050] To point your Docker client at it, run this in your shell: eval "$(docker-machine env local)"
3. Load the `local` machine configuration into your shell. 3. Load the `local` machine configuration into your shell.
$ eval "$(docker-machine env local)" $ eval "$(docker-machine env local)"
4. Generate a discovery token using the Docker Swarm image. 4. Generate a discovery token using the Docker Swarm image.
The command below runs the `swarm create` command in a container. If you The command below runs the `swarm create` command in a container. If you
@ -72,21 +72,21 @@ are [available](/discovery).
$ docker run swarm create $ docker run swarm create
Unable to find image 'swarm:latest' locally Unable to find image 'swarm:latest' locally
latest: Pulling from swarm latest: Pulling from swarm
de939d6ed512: Pull complete de939d6ed512: Pull complete
79195899a8a4: Pull complete 79195899a8a4: Pull complete
79ad4f2cc8e0: Pull complete 79ad4f2cc8e0: Pull complete
0db1696be81b: Pull complete 0db1696be81b: Pull complete
ae3b6728155e: Pull complete ae3b6728155e: Pull complete
57ec2f5f3e06: Pull complete 57ec2f5f3e06: Pull complete
73504b2882a3: Already exists 73504b2882a3: Already exists
swarm:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. swarm:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:aaaf6c18b8be01a75099cc554b4fb372b8ec677ae81764dcdf85470279a61d6f Digest: sha256:aaaf6c18b8be01a75099cc554b4fb372b8ec677ae81764dcdf85470279a61d6f
Status: Downloaded newer image for swarm:latest Status: Downloaded newer image for swarm:latest
fe0cc96a72cf04dba8c1c4aa79536ec3 fe0cc96a72cf04dba8c1c4aa79536ec3
The `swarm create` command returned the `fe0cc96a72cf04dba8c1c4aa79536ec3` The `swarm create` command returned the `fe0cc96a72cf04dba8c1c4aa79536ec3`
token. token.
5. Save the token in a safe place. 5. Save the token in a safe place.
You'll use this token in the next step to create a Docker Swarm. You'll use this token in the next step to create a Docker Swarm.
@ -96,7 +96,7 @@ are [available](/discovery).
A single system in your network is known as your Docker Swarm manager. The swarm A single system in your network is known as your Docker Swarm manager. The swarm
manager orchestrates and schedules containers on the entire cluster. The swarm manager orchestrates and schedules containers on the entire cluster. The swarm
manager rules a set of agents (also called nodes or Docker nodes). manager rules a set of agents (also called nodes or Docker nodes).
Swarm agents are responsible for hosting containers. They are regular docker Swarm agents are responsible for hosting containers. They are regular docker
daemons and you can communicate with them using the Docker remote API. daemons and you can communicate with them using the Docker remote API.
@ -113,20 +113,20 @@ In this section, you create a swarm manager and two nodes.
swarm-master swarm-master
For example: For example:
$ docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-master $ docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-master
INFO[0000] Creating SSH key... INFO[0000] Creating SSH key...
INFO[0000] Creating VirtualBox VM... INFO[0000] Creating VirtualBox VM...
INFO[0005] Starting VirtualBox VM... INFO[0005] Starting VirtualBox VM...
INFO[0005] Waiting for VM to start... INFO[0005] Waiting for VM to start...
INFO[0060] "swarm-master" has been created and is now the active machine. INFO[0060] "swarm-master" has been created and is now the active machine.
INFO[0060] To point your Docker client at it, run this in your shell: eval "$(docker-machine env swarm-master)" INFO[0060] To point your Docker client at it, run this in your shell: eval "$(docker-machine env swarm-master)"
2. Open your VirtualBox Manager, it should contain the `local` machine and the 2. Open your VirtualBox Manager, it should contain the `local` machine and the
new `swarm-master` machine. new `swarm-master` machine.
![VirtualBox](/images/virtual-box.png) ![VirtualBox](images/virtual-box.png)
3. Create a swarm node. 3. Create a swarm node.
docker-machine create \ docker-machine create \
@ -136,19 +136,19 @@ new `swarm-master` machine.
swarm-agent-00 swarm-agent-00
For example: For example:
$ docker-machine create -d virtualbox --swarm --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-agent-00 $ docker-machine create -d virtualbox --swarm --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-agent-00
INFO[0000] Creating SSH key... INFO[0000] Creating SSH key...
INFO[0000] Creating VirtualBox VM... INFO[0000] Creating VirtualBox VM...
INFO[0005] Starting VirtualBox VM... INFO[0005] Starting VirtualBox VM...
INFO[0006] Waiting for VM to start... INFO[0006] Waiting for VM to start...
INFO[0066] "swarm-agent-00" has been created and is now the active machine. INFO[0066] "swarm-agent-00" has been created and is now the active machine.
INFO[0066] To point your Docker client at it, run this in your shell: eval "$(docker-machine env swarm-agent-00)" INFO[0066] To point your Docker client at it, run this in your shell: eval "$(docker-machine env swarm-agent-00)"
3. Add another agent called `swarm-agent-01`. 3. Add another agent called `swarm-agent-01`.
$ docker-machine create -d virtualbox --swarm --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-agent-01 $ docker-machine create -d virtualbox --swarm --swarm-discovery token://fe0cc96a72cf04dba8c1c4aa79536ec3 swarm-agent-01
You should see the two agents in your VirtualBox Manager. You should see the two agents in your VirtualBox Manager.
## Direct your swarm ## Direct your swarm
@ -181,10 +181,10 @@ your swarm, and start an image on your swarm.
└ Containers: 2 └ Containers: 2
└ Reserved CPUs: 0 / 8 └ Reserved CPUs: 0 / 8
You can see that each agent and the master all have port `2376` exposed. When you create a swarm, you can use any port you like and even different ports on different nodes. Each swarm node runs the swarm agent container. You can see that each agent and the master all have port `2376` exposed. When you create a swarm, you can use any port you like and even different ports on different nodes. Each swarm node runs the swarm agent container.
The master is running both the swarm manager and a swarm agent container. This isn't recommended in a production environment because it can cause problems with agent failover. However, it is perfectly fine to do this in a learning environment like this one. The master is running both the swarm manager and a swarm agent container. This isn't recommended in a production environment because it can cause problems with agent failover. However, it is perfectly fine to do this in a learning environment like this one.
3. Check the images currently running on your swarm. 3. Check the images currently running on your swarm.
$ docker ps -a $ docker ps -a
@ -196,7 +196,7 @@ your swarm, and start an image on your swarm.
4. Run the Docker `hello-world` test image on your swarm. 4. Run the Docker `hello-world` test image on your swarm.
$ docker run hello-world $ docker run hello-world
Hello from Docker. Hello from Docker.
This message shows that your installation appears to be working correctly. This message shows that your installation appears to be working correctly.
@ -215,7 +215,7 @@ your swarm, and start an image on your swarm.
For more examples and ideas, visit: For more examples and ideas, visit:
http://docs.docker.com/userguide/ http://docs.docker.com/userguide/
5. Use the `docker ps` command to find out which node the container ran on. 5. Use the `docker ps` command to find out which node the container ran on.
$ docker ps -a $ docker ps -a
@ -232,5 +232,5 @@ your swarm, and start an image on your swarm.
At this point, you've installed Docker Swarm by pulling the latest image of At this point, you've installed Docker Swarm by pulling the latest image of
it from Docker Hub. Then, you built and ran a swarm on your local machine it from Docker Hub. Then, you built and ran a swarm on your local machine
using VirtualBox. If you want, you can onto read an [overview of Docker Swarm using VirtualBox. If you want, you can onto read an [overview of Docker Swarm
features](/). Alternatively, you can develop a more in-depth view of Swarm by features](index.md). Alternatively, you can develop a more in-depth view of Swarm by
[manually installing Swarm](install-manual.md) on a network. [manually installing Swarm](install-manual.md) on a network.

View File

@ -406,7 +406,7 @@ This filter will prevent scheduling containers on unhealthy nodes.
## Docker Swarm documentation index ## Docker Swarm documentation index
- [User guide](/) - [User guide](../index.md)
- [Discovery options](/discovery/) - [Discovery options](../discovery.md)
- [Scheduler strategies](/scheduler/strategy/) - [Scheduler strategies](strategy.md)
- [Swarm API](/api/swarm-api) - [Swarm API](../api/swarm-api.md)

View File

@ -116,10 +116,7 @@ strategy prefers the node with most containers running.
## Docker Swarm documentation index ## Docker Swarm documentation index
- [User guide](../index.md)
- [User guide](/) - [Discovery options](../discovery.md)
- [Discovery options](/discovery/) - [Scheduler filters](filter.md)
- [Scheduler strategies](/scheduler/strategy) - [Swarm API](../api/swarm-api.md)
- [Scheduler filters](/scheduler/filter)
- [Swarm API](/api/swarm-api)