From 92ef21d2ec0336df8adc7dd8907587894f4b0a39 Mon Sep 17 00:00:00 2001 From: Chanwit Kaewkasi Date: Thu, 12 Mar 2015 11:53:19 +0700 Subject: [PATCH] explain ip generator in discovery/README Signed-off-by: Chanwit Kaewkasi --- discovery/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/discovery/README.md b/discovery/README.md index df99ed9d92..2fe6a6baf7 100644 --- a/discovery/README.md +++ b/discovery/README.md @@ -149,6 +149,27 @@ $ docker -H 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:// file:///tmp/my_cluster +``` + +```bash +# nodes example +$ swarm manage -H 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,