diff --git a/README.md b/README.md
index ac4fbcbb5..6ff3658ef 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,9 @@ etcdadm
etcdadm is a command-line tool for operating an etcd cluster. It makes it easy to create a new cluster, add a member to, or remove a member from an existing cluster. Its user experience is inspired by [kubeadm](https://kubernetes.io/docs/reference/setup-tools/kubeadm/).
-![alt text](demo.svg "etcdadm demo - generated with https://github.com/nbedos/termtosvg")
+
+
+
## Table of Contents
diff --git a/demo.svg b/demo.svg
index 49ba74c4c..68bf11526 100644
--- a/demo.svg
+++ b/demo.svg
@@ -1,7 +1,7 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- $ $ ssh 10.105.16.154 mkdir -p /etc/etcd/pki $ # create cluster $ ssh 10.105.16.132 /opt/bin/etcdadm init Warning: Permanently added '10.105.16.132' (ECDSA) to the list of known hosts. 2018-09-27 22:15:26.743074 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd150339223 2018-09-27 22:15:27.435171 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:15:27.482961 I | [certificates] creating PKI assets 2018-09-27 22:15:27.482998 I | creating a self signed etcd CA certificate and key files [certificates] Generated ca certificate and key. 2018-09-27 22:15:28.231874 I | creating a new server certificate and key files for etcd [certificates] Generated server certificate and key. [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-132platform9.sys] and IPs [10.10 5.16.132 127.0.0.1] 2018-09-27 22:15:28.806973 I | creating a new certificate and key files for etcd peering [certificates] Generated peer certificate and key. [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-132platform9.sys] and IPs [10.105. 16.132] 2018-09-27 22:15:29.619422 I | creating a new client certificate for the etcdctl [certificates] Generated etcdctl-etcd-client certificate and key. 2018-09-27 22:15:30.432397 I | creating a new client certificate for the apiserver calling etcd [certificates] Generated apiserver-etcd-client certificate and key. [certificates] valid certificates and keys now exist in "/etc/etcd/pki" 2018-09-27 22:15:31.934631 I | [health] Checking local etcd endpoint health 2018-09-27 22:15:31.964148 I | [health] Local etcd endpoint is healthy 2018-09-27 22:15:31.964251 I | To add another member to the cluster, copy the CA cert/key to its certificate dir and run : 2018-09-27 22:15:31.964300 I | etcdadm join https://10.105.16.132:2379 $ # add member (.154) $ ssh 10.105.16.154 mkdir -p /etc/etcd/pki Warning: Permanently added '10.105.16.154' (ECDSA) to the list of known hosts. $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.154:/etc/etcd/pki $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.154:/etc/etcd/pki ca.crt 100% 1009 897.8KB/s 00:00 ca.key 100% 1679 1.6MB/s 00:00 Connection to 10.105.16.132 closed. $ ssh 10.105.16.154 /opt/bin/etcdadm join https://10.105.16.132:2379 $ ssh 10.105.16.154 /opt/bin/etcdadm join https://10.105.16.132:2379 2018-09-27 22:15:53.979417 I | [certificates] creating PKI assets 2018-09-27 22:15:53.979612 I | creating a self signed etcd CA certificate and key files [certificates] Using the existing ca certificate and key. 2018-09-27 22:15:54.332174 I | creating a new server certificate and key files for etcd [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-154platform9.sys] and IPs [10.10 5.16.154 127.0.0.1] 2018-09-27 22:15:54.450963 I | creating a new certificate and key files for etcd peering [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-154platform9.sys] and IPs [10.105. 16.154] 2018-09-27 22:15:54.775645 I | creating a new client certificate for the etcdctl 2018-09-27 22:15:56.061960 I | creating a new client certificate for the apiserver calling etcd 2018-09-27 22:15:56.161669 I | [membership] Checking if this member was added 2018-09-27 22:15:56.191743 I | [membership] Member was not added 2018-09-27 22:15:56.191780 I | Removing existing data dir "/var/lib/etcd" 2018-09-27 22:15:56.191858 I | [membership] Adding member 2018-09-27 22:15:56.202697 I | [membership] Checking if member was started 2018-09-27 22:15:56.202748 I | [membership] Member was not started 2018-09-27 22:15:56.202758 I | [membership] Removing existing data dir "/var/lib/etcd" 2018-09-27 22:15:56.203082 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd473101646 2018-09-27 22:15:56.747299 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:15:57.680865 I | [health] Checking local etcd endpoint health 2018-09-27 22:15:57.715663 I | [health] Local etcd endpoint is healthy $ # add member (.156) $ ssh 10.105.16.156 mkdir -p /etc/etcd/pki $ ssh 10.105.16.156 mkdir -p /etc/etcd/pki Warning: Permanently added '10.105.16.156' (ECDSA) to the list of known hosts. $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.156:/etc/etcd/pki $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.156:/etc/etcd/pki ca.crt 100% 1009 727.1KB/s 00:00 ca.key 0% 0 0.0KB/s --:-- ETA ca.key 100% 1679 1.4MB/s 00:00 $ ssh 10.105.16.156 /opt/bin/etcdadm join https://10.105.16.132:2379 $ ssh 10.105.16.156 /opt/bin/etcdadm join https://10.105.16.132:2379 2018-09-27 22:16:16.478852 I | [certificates] creating PKI assets 2018-09-27 22:16:16.478990 I | creating a self signed etcd CA certificate and key files 2018-09-27 22:16:17.276197 I | creating a new server certificate and key files for etcd [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-156platform9.sys] and IPs [10.10 5.16.156 127.0.0.1] 2018-09-27 22:16:17.546115 I | creating a new certificate and key files for etcd peering [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-156platform9.sys] and IPs [10.105. 16.156] 2018-09-27 22:16:17.990020 I | creating a new client certificate for the etcdctl 2018-09-27 22:16:18.269247 I | creating a new client certificate for the apiserver calling etcd 2018-09-27 22:16:18.490691 I | [membership] Checking if this member was added 2018-09-27 22:16:18.523717 I | [membership] Member was not added 2018-09-27 22:16:18.523779 I | Removing existing data dir "/var/lib/etcd" 2018-09-27 22:16:18.523955 I | [membership] Adding member 2018-09-27 22:16:18.542572 I | [membership] Checking if member was started 2018-09-27 22:16:18.542624 I | [membership] Member was not started 2018-09-27 22:16:18.542636 I | [membership] Removing existing data dir "/var/lib/etcd" 2018-09-27 22:16:18.545835 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd090112384 2018-09-27 22:16:19.248015 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:16:20.423434 I | [health] Checking local etcd endpoint health 2018-09-27 22:16:20.459057 I | [health] Local etcd endpoint is healthy $ # list members $ ssh 10.105.16.132 /opt/bin/etcdctl.sh member list b6eb590b034942b, started, coreos-daniel-478-10-105-16-154platform9.sys, https://10.105.16.154:2380, https://10.105.16.15 4:2379 ac8438069e3ed0e3, started, coreos-daniel-478-10-105-16-132platform9.sys, https://10.105.16.132:2380, https://10.105.16.1 32:2379 fa1eb558ff766227, started, coreos-daniel-478-10-105-16-156platform9.sys, https://10.105.16.156:2380, https://10.105.16.1 56:2379 $ # check health $ ssh 10.105.16.132 /opt/bin/etcdctl.sh endpoint health --cluster https://10.105.16.132:2379 is healthy: successfully committed proposal: took = 3.371347ms https://10.105.16.154:2379 is healthy: successfully committed proposal: took = 6.98771ms https://10.105.16.156:2379 is healthy: successfully committed proposal: took = 3.67975ms $ # remove member (.132) $ ssh 10.105.16.132 /opt/bin/etcdadm reset 2018-09-27 22:16:27.953035 I | [reset] etcd service is running 2018-09-27 22:16:27.953309 I | [membership] Checking if this member was removed 2018-09-27 22:16:27.981597 I | [membership] Member was not removed 2018-09-27 22:16:27.981628 I | [membership] Removing member 2018-09-27 22:16:28.805267 I | [cluster] etcd reset complete $ # remove member (.154) $ ssh 10.105.16.154 /opt/bin/etcdadm reset 2018-09-27 22:16:33.587018 I | [reset] etcd service is running 2018-09-27 22:16:33.587101 I | [membership] Checking if this member was removed 2018-09-27 22:16:33.604637 I | [membership] Member was not removed 2018-09-27 22:16:33.604673 I | [membership] Removing member 2018-09-27 22:16:34.368919 I | [cluster] etcd reset complete $ ssh 10.105.16.156 /opt/bin/etcdctl.sh member list $ ssh 10.105.16.156 /opt/bin/etcdctl.sh endpoint health --cluster https://10.105.16.156:2379 is healthy: successfully committed proposal: took = 1.576846ms $ # remove member (.156) $ ssh 10.105.16.156 /opt/bin/etcdadm reset 2018-09-27 22:17:14.673480 I | [reset] etcd service is running 2018-09-27 22:17:14.673629 I | [membership] Checking if this member was removed 2018-09-27 22:17:14.702193 I | [membership] Member was not removed 2018-09-27 22:17:14.702400 I | [membership] Not removing member because it is the last in the cluster 2018-09-27 22:17:16.711049 I | [cluster] etcd reset complete
- 0:00/0:00
-
-
-
-
-
-
-
-
-
-
+
+ $ $ # create cluster $ ssh 10.105.16.132 /opt/bin/etcdadm init Warning: Permanently added '10.105.16.132' (ECDSA) to the list of known hosts. 2018-09-27 22:15:26.743074 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd150339223 2018-09-27 22:15:27.435171 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:15:27.482961 I | [certificates] creating PKI assets 2018-09-27 22:15:27.482998 I | creating a self signed etcd CA certificate and key files [certificates] Generated ca certificate and key. 2018-09-27 22:15:28.231874 I | creating a new server certificate and key files for etcd [certificates] Generated server certificate and key. [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-132platform9.sys] and IPs [10.10 5.16.132 127.0.0.1] 2018-09-27 22:15:28.806973 I | creating a new certificate and key files for etcd peering [certificates] Generated peer certificate and key. [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-132platform9.sys] and IPs [10.105. 16.132] 2018-09-27 22:15:29.619422 I | creating a new client certificate for the etcdctl [certificates] Generated etcdctl-etcd-client certificate and key. 2018-09-27 22:15:30.432397 I | creating a new client certificate for the apiserver calling etcd [certificates] Generated apiserver-etcd-client certificate and key. [certificates] valid certificates and keys now exist in "/etc/etcd/pki" 2018-09-27 22:15:31.934631 I | [health] Checking local etcd endpoint health 2018-09-27 22:15:31.964148 I | [health] Local etcd endpoint is healthy 2018-09-27 22:15:31.964251 I | To add another member to the cluster, copy the CA cert/key to its certificate dir and run : 2018-09-27 22:15:31.964300 I | etcdadm join https://10.105.16.132:2379 $ # add member (.154) $ ssh 10.105.16.154 mkdir -p /etc/etcd/pki $ ssh 10.105.16.154 mkdir -p /etc/etcd/pki Warning: Permanently added '10.105.16.154' (ECDSA) to the list of known hosts. $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.154:/etc/etcd/pki $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.154:/etc/etcd/pki ca.crt 100% 1009 897.8KB/s 00:00 ca.key 100% 1679 1.6MB/s 00:00 Connection to 10.105.16.132 closed. $ ssh 10.105.16.154 /opt/bin/etcdadm join https://10.105.16.132:2379 $ ssh 10.105.16.154 /opt/bin/etcdadm join https://10.105.16.132:2379 2018-09-27 22:15:53.979417 I | [certificates] creating PKI assets 2018-09-27 22:15:53.979612 I | creating a self signed etcd CA certificate and key files [certificates] Using the existing ca certificate and key. 2018-09-27 22:15:54.332174 I | creating a new server certificate and key files for etcd [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-154platform9.sys] and IPs [10.10 5.16.154 127.0.0.1] 2018-09-27 22:15:54.450963 I | creating a new certificate and key files for etcd peering [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-154platform9.sys] and IPs [10.105. 16.154] 2018-09-27 22:15:54.775645 I | creating a new client certificate for the etcdctl 2018-09-27 22:15:56.061960 I | creating a new client certificate for the apiserver calling etcd 2018-09-27 22:15:56.161669 I | [membership] Checking if this member was added 2018-09-27 22:15:56.191743 I | [membership] Member was not added 2018-09-27 22:15:56.191780 I | Removing existing data dir "/var/lib/etcd" 2018-09-27 22:15:56.191858 I | [membership] Adding member 2018-09-27 22:15:56.202697 I | [membership] Checking if member was started 2018-09-27 22:15:56.202748 I | [membership] Member was not started 2018-09-27 22:15:56.202758 I | [membership] Removing existing data dir "/var/lib/etcd" 2018-09-27 22:15:56.203082 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd473101646 2018-09-27 22:15:56.747299 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:15:57.680865 I | [health] Checking local etcd endpoint health 2018-09-27 22:15:57.715663 I | [health] Local etcd endpoint is healthy $ # add member (.156) $ ssh 10.105.16.156 mkdir -p /etc/etcd/pki $ ssh 10.105.16.156 mkdir -p /etc/etcd/pki Warning: Permanently added '10.105.16.156' (ECDSA) to the list of known hosts. $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.156:/etc/etcd/pki $ scp 10.105.16.132:/etc/etcd/pki/ca.* 10.105.16.156:/etc/etcd/pki ca.crt 100% 1009 727.1KB/s 00:00 ca.key 0% 0 0.0KB/s --:-- ETA ca.key 100% 1679 1.4MB/s 00:00 $ ssh 10.105.16.156 /opt/bin/etcdadm join https://10.105.16.132:2379 $ ssh 10.105.16.156 /opt/bin/etcdadm join https://10.105.16.132:2379 2018-09-27 22:16:16.478852 I | [certificates] creating PKI assets 2018-09-27 22:16:16.478990 I | creating a self signed etcd CA certificate and key files 2018-09-27 22:16:17.276197 I | creating a new server certificate and key files for etcd [certificates] server serving cert is signed for DNS names [coreos-daniel-478-10-105-16-156platform9.sys] and IPs [10.10 5.16.156 127.0.0.1] 2018-09-27 22:16:17.546115 I | creating a new certificate and key files for etcd peering [certificates] peer serving cert is signed for DNS names [coreos-daniel-478-10-105-16-156platform9.sys] and IPs [10.105. 16.156] 2018-09-27 22:16:17.990020 I | creating a new client certificate for the etcdctl 2018-09-27 22:16:18.269247 I | creating a new client certificate for the apiserver calling etcd 2018-09-27 22:16:18.490691 I | [membership] Checking if this member was added 2018-09-27 22:16:18.523717 I | [membership] Member was not added 2018-09-27 22:16:18.523779 I | Removing existing data dir "/var/lib/etcd" 2018-09-27 22:16:18.523955 I | [membership] Adding member 2018-09-27 22:16:18.542572 I | [membership] Checking if member was started 2018-09-27 22:16:18.542624 I | [membership] Member was not started 2018-09-27 22:16:18.542636 I | [membership] Removing existing data dir "/var/lib/etcd" 2018-09-27 22:16:18.545835 I | [install] extracting etcd archive /var/cache/etcdadm/etcd/v3.3.8/etcd-v3.3.8-linux-amd64. tar.gz to /tmp/etcd090112384 2018-09-27 22:16:19.248015 I | [install] verifying etcd 3.3.8 is installed in /opt/bin/ 2018-09-27 22:16:20.423434 I | [health] Checking local etcd endpoint health 2018-09-27 22:16:20.459057 I | [health] Local etcd endpoint is healthy $ # list members $ ssh 10.105.16.132 /opt/bin/etcdctl.sh member list b6eb590b034942b, started, coreos-daniel-478-10-105-16-154platform9.sys, https://10.105.16.154:2380, https://10.105.16.15 4:2379 ac8438069e3ed0e3, started, coreos-daniel-478-10-105-16-132platform9.sys, https://10.105.16.132:2380, https://10.105.16.1 32:2379 fa1eb558ff766227, started, coreos-daniel-478-10-105-16-156platform9.sys, https://10.105.16.156:2380, https://10.105.16.1 56:2379 $ # check health $ ssh 10.105.16.132 /opt/bin/etcdctl.sh endpoint health --cluster https://10.105.16.132:2379 is healthy: successfully committed proposal: took = 3.371347ms https://10.105.16.154:2379 is healthy: successfully committed proposal: took = 6.98771ms https://10.105.16.156:2379 is healthy: successfully committed proposal: took = 3.67975ms $ # remove member (.132) $ ssh 10.105.16.132 /opt/bin/etcdadm reset 2018-09-27 22:16:27.953035 I | [reset] etcd service is running 2018-09-27 22:16:27.953309 I | [membership] Checking if this member was removed 2018-09-27 22:16:27.981597 I | [membership] Member was not removed 2018-09-27 22:16:27.981628 I | [membership] Removing member 2018-09-27 22:16:28.805267 I | [cluster] etcd reset complete $ # remove member (.154) $ ssh 10.105.16.154 /opt/bin/etcdadm reset 2018-09-27 22:16:33.587018 I | [reset] etcd service is running 2018-09-27 22:16:33.587101 I | [membership] Checking if this member was removed 2018-09-27 22:16:33.604637 I | [membership] Member was not removed 2018-09-27 22:16:33.604673 I | [membership] Removing member 2018-09-27 22:16:34.368919 I | [cluster] etcd reset complete $ ssh 10.105.16.156 /opt/bin/etcdctl.sh member list $ ssh 10.105.16.156 /opt/bin/etcdctl.sh endpoint health --cluster https://10.105.16.156:2379 is healthy: successfully committed proposal: took = 1.576846ms $ # remove member (.156) $ ssh 10.105.16.156 /opt/bin/etcdadm reset 2018-09-27 22:17:14.673480 I | [reset] etcd service is running 2018-09-27 22:17:14.673629 I | [membership] Checking if this member was removed 2018-09-27 22:17:14.702193 I | [membership] Member was not removed 2018-09-27 22:17:14.702400 I | [membership] Not removing member because it is the last in the cluster 2018-09-27 22:17:16.711049 I | [cluster] etcd reset complete
\ No newline at end of file