Created
February 14, 2017 19:13
-
-
Save retr0h/233f11c084613468fa5e5ceef9b2307c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
[jodewey:~/git/ansible-etcd] master(+20/-20)+ ± molecule login --host etcd-01 | |
7.0.4:2379 member list etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.1 | |
9198227ac1a2c055: name=etcd-02 peerURLs=http://172.17.0.3:2380 clientURLs=http://172.17.0.3:2379 isLeader=true | |
983274ac8c0149ec: name=etcd-01 peerURLs=http://172.17.0.2:2380 clientURLs=http://172.17.0.2:2379 isLeader=false | |
ab3fbede047aa1ac: name=etcd-03 peerURLs=http://172.17.0.4:2380 clientURLs=http://172.17.0.4:2379 isLeader=false | |
[root@63be8a0b63c9 /]# | |
``` | |
``` | |
[root@63be8a0b63c9 /]# etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.17.0.4:2379 set /foo bar | |
bar | |
[root@63be8a0b63c9 /]# etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.17.0.4:2379 get /foo | |
bar | |
[root@63be8a0b63c9 /]# | |
``` | |
``` | |
[jodewey:~/git/ansible-etcd] master(+20/-20)+ 127 ± docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
2ad19ca5e177 molecule_local/solita/ubuntu-systemd:latest "/sbin/init" 5 minutes ago Up 5 minutes etcd-03 | |
3f5b07de13a0 molecule_local/retr0h/centos7-systemd-ansible:latest "/usr/sbin/init" 5 minutes ago Up 5 minutes etcd-02 | |
63be8a0b63c9 molecule_local/retr0h/centos7-systemd-ansible:latest "/usr/sbin/init" 5 minutes ago Up 5 minutes etcd-01 | |
``` | |
``` | |
[jodewey:~/git/ansible-etcd] master(+20/-20)+ ± docker stop 3f5b07de13a0 | |
3f5b07de13a0 | |
``` | |
``` | |
[jodewey:~/git/ansible-etcd] master(+20/-20)+ ± docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
2ad19ca5e177 molecule_local/solita/ubuntu-systemd:latest "/sbin/init" 5 minutes ago Up 5 minutes etcd-03 | |
63be8a0b63c9 molecule_local/retr0h/centos7-systemd-ansible:latest "/usr/sbin/init" 5 minutes ago Up 5 minutes etcd-01 | |
``` | |
``` | |
[root@63be8a0b63c9 /]# etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.17.0.4:2379 member list | |
9198227ac1a2c055: name=etcd-02 peerURLs=http://172.17.0.3:2380 clientURLs=http://172.17.0.3:2379 isLeader=false | |
983274ac8c0149ec: name=etcd-01 peerURLs=http://172.17.0.2:2380 clientURLs=http://172.17.0.2:2379 isLeader=true | |
ab3fbede047aa1ac: name=etcd-03 peerURLs=http://172.17.0.4:2380 clientURLs=http://172.17.0.4:2379 isLeader=false | |
``` | |
``` | |
[root@63be8a0b63c9 /]# etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.17.0.4:2379 cluster-health | |
failed to check the health of member 9198227ac1a2c055 on http://172.17.0.3:2379: Get http://172.17.0.3:2379/health: dial tcp 172.17.0.3:2379: i/o timeout | |
member 9198227ac1a2c055 is unreachable: [http://172.17.0.3:2379] are all unreachable | |
member 983274ac8c0149ec is healthy: got healthy result from http://172.17.0.2:2379 | |
member ab3fbede047aa1ac is healthy: got healthy result from http://172.17.0.4:2379 | |
cluster is healthy | |
``` | |
``` | |
[root@63be8a0b63c9 /]# etcdctl --endpoints 172.17.0.3:2379,172.17.0.2:2379,172.17.0.4:2379 get /foo | |
bar | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment