mirror of https://github.com/docker/docs.git
Point to documentation in the readme
So the docs aren't duplicated in two places. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
621b83fc6f
commit
63658054ce
73
README.md
73
README.md
|
|
@ -17,19 +17,13 @@ The goal is to provide a smooth out-of-box experience for simple use cases, and
|
||||||
allow swapping in more powerful backends, like Mesos, for large scale production
|
allow swapping in more powerful backends, like Mesos, for large scale production
|
||||||
deployments.
|
deployments.
|
||||||
|
|
||||||
## Installation
|
## Installation and documentation
|
||||||
|
|
||||||
###1 - Docker image.
|
Full documentation [is available here](http://docs.docker.com/swarm/).
|
||||||
The easiest way to get started with Swarm is to use the
|
|
||||||
[official Docker image](https://registry.hub.docker.com/_/swarm/).
|
|
||||||
|
|
||||||
```sh
|
## Development installation
|
||||||
docker pull swarm
|
|
||||||
```
|
|
||||||
|
|
||||||
###2 - Alternative: Download and install from source.
|
You can download and install from source instead of using the Docker image.
|
||||||
Alternatively, you can download and install from source instead of using the
|
|
||||||
Docker image.
|
|
||||||
|
|
||||||
Ensure you have golang and git client installed (e.g. `apt-get install golang git` on Ubuntu).
|
Ensure you have golang and git client installed (e.g. `apt-get install golang git` on Ubuntu).
|
||||||
You may need to set `$GOPATH`, e.g `mkdir ~/gocode; export GOPATH=~/gocode`.
|
You may need to set `$GOPATH`, e.g `mkdir ~/gocode; export GOPATH=~/gocode`.
|
||||||
|
|
@ -40,63 +34,8 @@ The install `swarm` binary to your `$GOPATH` directory.
|
||||||
go get -u github.com/docker/swarm
|
go get -u github.com/docker/swarm
|
||||||
```
|
```
|
||||||
|
|
||||||
###3 - Nodes setup
|
From here, you can follow the instructions [in the main documentation](http://docs.docker.com/swarm/),
|
||||||
The only requirement for Swarm nodes is to run a regular Docker daemon (version
|
replacing `docker run swarm` with just `swarm`.
|
||||||
`1.4.0` and later).
|
|
||||||
|
|
||||||
In order for Swarm to be able to communicate with its nodes, they must bind on a
|
|
||||||
network interface. This can be achieved by starting Docker with the `-H` flag
|
|
||||||
(e.g. `-H tcp://0.0.0.0:2375`).
|
|
||||||
|
|
||||||
# Example usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# create a cluster
|
|
||||||
$ docker run --rm swarm create
|
|
||||||
6856663cdefdec325839a4b7e1de38e8 # <- this is your unique <cluster_id>
|
|
||||||
|
|
||||||
# on each of your nodes, start the swarm agent
|
|
||||||
# <node_ip> doesn't have to be public (eg. 192.168.0.X),
|
|
||||||
# as long as the swarm manager can access it.
|
|
||||||
$ docker run -d swarm join --addr=<node_ip:2375> token://<cluster_id>
|
|
||||||
|
|
||||||
# start the manager on any machine or your laptop
|
|
||||||
$ docker run -d -p <swarm_port>:2375 swarm manage token://<cluster_id>
|
|
||||||
|
|
||||||
# use the regular docker cli
|
|
||||||
$ docker -H tcp://<swarm_ip:swarm_port> info
|
|
||||||
$ docker -H tcp://<swarm_ip:swarm_port> run ...
|
|
||||||
$ docker -H tcp://<swarm_ip:swarm_port> ps
|
|
||||||
$ docker -H tcp://<swarm_ip:swarm_port> logs ...
|
|
||||||
...
|
|
||||||
|
|
||||||
# list nodes in your cluster
|
|
||||||
$ docker run --rm swarm list token://<cluster_id>
|
|
||||||
<node_ip:2375>
|
|
||||||
```
|
|
||||||
|
|
||||||
See [here](discovery) for more information about
|
|
||||||
other discovery services.
|
|
||||||
|
|
||||||
## Advanced Scheduling
|
|
||||||
|
|
||||||
See [filters](scheduler/filter) and [strategies](scheduler/strategy) to learn
|
|
||||||
more about advanced scheduling.
|
|
||||||
|
|
||||||
## TLS
|
|
||||||
|
|
||||||
Swarm supports TLS authentication between the CLI and Swarm but also between
|
|
||||||
Swarm and the Docker nodes.
|
|
||||||
|
|
||||||
In order to enable TLS, the same command line options as Docker can be specified:
|
|
||||||
|
|
||||||
`swarm manage --tlsverify --tlscacert=<CACERT> --tlscert=<CERT> --tlskey=<KEY> [...]`
|
|
||||||
|
|
||||||
Please refer to the [Docker documentation](https://docs.docker.com/articles/https/)
|
|
||||||
for more information on how to set up TLS authentication on Docker and generating
|
|
||||||
the certificates.
|
|
||||||
|
|
||||||
Note that Swarm certificates must be generated with`extendedKeyUsage = clientAuth,serverAuth`.
|
|
||||||
|
|
||||||
## Participating
|
## Participating
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue