mirror of https://github.com/docker/docs.git
explain ip generator in discovery/README
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
This commit is contained in:
parent
882be558e8
commit
92ef21d2ec
|
@ -149,6 +149,27 @@ $ docker -H <swarm_ip:swarm_port> logs ...
|
|||
...
|
||||
```
|
||||
|
||||
### Range pattern for IP addresses
|
||||
|
||||
The `file` and `nodes` discoveries support a range pattern to specify IP addresses, i.e., `10.0.0.[10:200]` will be a list of nodes starting from `10.0.0.10` to `10.0.0.200`.
|
||||
|
||||
For example,
|
||||
|
||||
```bash
|
||||
# file example
|
||||
$ echo 10.0.0.[11:100]:2375 >> /tmp/my_cluster
|
||||
$ echo 10.0.1.[15:20]:2375 >> /tmp/my_cluster
|
||||
$ echo 192.168.1.2:[2:20]375 >> /tmp/my_cluster
|
||||
|
||||
# start the manager
|
||||
$ swarm manage -H tcp://<swarm_ip:swarm_port> file:///tmp/my_cluster
|
||||
```
|
||||
|
||||
```bash
|
||||
# nodes example
|
||||
$ swarm manage -H <swarm_ip:swarm_port> nodes://10.0.0.[10:200]:2375,10.0.1.[2:250]:2375
|
||||
```
|
||||
|
||||
## Contributing a new discovery backend
|
||||
|
||||
Contributing a new discovery backend is easy,
|
||||
|
|
Loading…
Reference in New Issue