From c624caabb15890b98e1fe76c049b558fb20cd06a Mon Sep 17 00:00:00 2001 From: tobilarscheid Date: Thu, 12 Jan 2017 09:16:21 +0100 Subject: [PATCH 1/3] improve example run commands in docker_guide When bootstrapping a cluster, the docker run command is mostly the same for all cluster member. This commits highlight the small variations between the commands to make them stand out. --- Documentation/v2/docker_guide.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/v2/docker_guide.md b/Documentation/v2/docker_guide.md index 789ca9aeb..2e7c1c590 100644 --- a/Documentation/v2/docker_guide.md +++ b/Documentation/v2/docker_guide.md @@ -44,48 +44,48 @@ The main difference being the value used for the `-initial-cluster` flag, which ### etcd0 -``` +
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd0 \
- -advertise-client-urls http://192.168.12.50:2379,http://192.168.12.50:4001 \
+ -name etcd0 \
+ -advertise-client-urls http://192.168.12.50:2379,http://192.168.12.50:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.50:2380 \
+ -initial-advertise-peer-urls http://192.168.12.50:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-```
+
### etcd1 -``` +
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd1 \
- -advertise-client-urls http://192.168.12.51:2379,http://192.168.12.51:4001 \
+ -name etcd1 \
+ -advertise-client-urls http://192.168.12.51:2379,http://192.168.12.51:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.51:2380 \
+ -initial-advertise-peer-urls http://192.168.12.51:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-```
+
### etcd2 -``` +
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd2 \
- -advertise-client-urls http://192.168.12.52:2379,http://192.168.12.52:4001 \
+ -name etcd2 \
+ -advertise-client-urls http://192.168.12.52:2379,http://192.168.12.52:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.52:2380 \
+ -initial-advertise-peer-urls http://192.168.12.52:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-```
+
Once the cluster has been bootstrapped etcd clients can be configured with a list of etcd members: From 3d97da0672acf3820599485e1080fa132e684b67 Mon Sep 17 00:00:00 2001 From: tobilarscheid Date: Fri, 13 Jan 2017 09:20:37 +0100 Subject: [PATCH 2/3] improve documentation regarding docker cluster instead of trying to highlight stuff within markdown code blocks, this commits adds a descriptive sentence explaining the differences. --- Documentation/v2/docker_guide.md | 34 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Documentation/v2/docker_guide.md b/Documentation/v2/docker_guide.md index 2e7c1c590..3eaf010ea 100644 --- a/Documentation/v2/docker_guide.md +++ b/Documentation/v2/docker_guide.md @@ -42,53 +42,55 @@ etcdctl -C http://192.168.12.50:4001 member list Using Docker to setup a multi-node cluster is very similar to the standalone mode configuration. The main difference being the value used for the `-initial-cluster` flag, which must contain the peer urls for each etcd member in the cluster. +**Although the following commands look the same, please note that _-name_, _-advertise-client-urls_ and _-initial-advertise-peer-urls_ differ between the cluster members!** + ### etcd0 -
+```
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd0 \
- -advertise-client-urls http://192.168.12.50:2379,http://192.168.12.50:4001 \
+ -name etcd0 \
+ -advertise-client-urls http://192.168.12.50:2379,http://192.168.12.50:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.50:2380 \
+ -initial-advertise-peer-urls http://192.168.12.50:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-
+``` ### etcd1 -
+```
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd1 \
- -advertise-client-urls http://192.168.12.51:2379,http://192.168.12.51:4001 \
+ -name etcd1 \
+ -advertise-client-urls http://192.168.12.51:2379,http://192.168.12.51:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.51:2380 \
+ -initial-advertise-peer-urls http://192.168.12.51:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-
+``` ### etcd2 -
+```
 docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
  --name etcd quay.io/coreos/etcd \
- -name etcd2 \
- -advertise-client-urls http://192.168.12.52:2379,http://192.168.12.52:4001 \
+ -name etcd2 \
+ -advertise-client-urls http://192.168.12.52:2379,http://192.168.12.52:4001 \
  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
- -initial-advertise-peer-urls http://192.168.12.52:2380 \
+ -initial-advertise-peer-urls http://192.168.12.52:2380 \
  -listen-peer-urls http://0.0.0.0:2380 \
  -initial-cluster-token etcd-cluster-1 \
  -initial-cluster etcd0=http://192.168.12.50:2380,etcd1=http://192.168.12.51:2380,etcd2=http://192.168.12.52:2380 \
  -initial-cluster-state new
-
+``` Once the cluster has been bootstrapped etcd clients can be configured with a list of etcd members: ``` etcdctl -C http://192.168.12.50:2379,http://192.168.12.51:2379,http://192.168.12.52:2379 member list -``` +``` \ No newline at end of file From eb88a5f288d02faec48d7cf75fd9f7416bae27d8 Mon Sep 17 00:00:00 2001 From: Josh Wood Date: Wed, 18 Jan 2017 14:55:02 -0800 Subject: [PATCH 3/3] Polish note about varying parameters for each member --- Documentation/v2/docker_guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/v2/docker_guide.md b/Documentation/v2/docker_guide.md index 3eaf010ea..2600a9801 100644 --- a/Documentation/v2/docker_guide.md +++ b/Documentation/v2/docker_guide.md @@ -42,7 +42,7 @@ etcdctl -C http://192.168.12.50:4001 member list Using Docker to setup a multi-node cluster is very similar to the standalone mode configuration. The main difference being the value used for the `-initial-cluster` flag, which must contain the peer urls for each etcd member in the cluster. -**Although the following commands look the same, please note that _-name_, _-advertise-client-urls_ and _-initial-advertise-peer-urls_ differ between the cluster members!** +**Although the following commands look very similar, note that `-name`, `-advertise-client-urls` and `-initial-advertise-peer-urls` differ for each cluster member** ### etcd0 @@ -93,4 +93,4 @@ Once the cluster has been bootstrapped etcd clients can be configured with a lis ``` etcdctl -C http://192.168.12.50:2379,http://192.168.12.51:2379,http://192.168.12.52:2379 member list -``` \ No newline at end of file +```