|
@@ -37,7 +37,7 @@ $ goreman -f Procfile start
|
|
|
...
|
|
...
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-The started members listen on `localhost:12379`, `localhost:22379`, and `localhost:32379` for client requests respectively.
|
|
|
|
|
|
|
+The started members listen on `localhost:2379`, `localhost:22379`, and `localhost:32379` for client requests respectively.
|
|
|
|
|
|
|
|
To interact with the started cluster by using etcdctl:
|
|
To interact with the started cluster by using etcdctl:
|
|
|
|
|
|
|
@@ -49,12 +49,12 @@ $ etcdctl --write-out=table --endpoints=localhost:12379 member list
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
|
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS |
|
|
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS |
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
|
-| 8211f1d0f64f3269 | started | infra1 | http://127.0.0.1:12380 | http://127.0.0.1:12379 |
|
|
|
|
|
|
|
+| 8211f1d0f64f3269 | started | infra1 | http://127.0.0.1:2380 | http://127.0.0.1:2379 |
|
|
|
| 91bc3c398fb3c146 | started | infra2 | http://127.0.0.1:22380 | http://127.0.0.1:22379 |
|
|
| 91bc3c398fb3c146 | started | infra2 | http://127.0.0.1:22380 | http://127.0.0.1:22379 |
|
|
|
| fd422379fda50e48 | started | infra3 | http://127.0.0.1:32380 | http://127.0.0.1:32379 |
|
|
| fd422379fda50e48 | started | infra3 | http://127.0.0.1:32380 | http://127.0.0.1:32379 |
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
|
|
|
|
|
|
-$ etcdctl --endpoints=localhost:12379 put foo bar
|
|
|
|
|
|
|
+$ etcdctl put foo bar
|
|
|
OK
|
|
OK
|
|
|
```
|
|
```
|
|
|
|
|
|
|
@@ -64,10 +64,10 @@ To exercise etcd's fault tolerance, kill a member:
|
|
|
# kill etcd2
|
|
# kill etcd2
|
|
|
$ goreman run stop etcd2
|
|
$ goreman run stop etcd2
|
|
|
|
|
|
|
|
-$ etcdctl --endpoints=localhost:12379 put key hello
|
|
|
|
|
|
|
+$ etcdctl put key hello
|
|
|
OK
|
|
OK
|
|
|
|
|
|
|
|
-$ etcdctl --endpoints=localhost:12379 get key
|
|
|
|
|
|
|
+$ etcdctl get key
|
|
|
hello
|
|
hello
|
|
|
|
|
|
|
|
# try to get key from the killed member
|
|
# try to get key from the killed member
|