run.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. rm -rf /tmp/m1.data /tmp/m2.data /tmp/m3.data
  3. /etc/init.d/bind9 start
  4. # get rid of hosts so go lookup won't resolve 127.0.0.1 to localhost
  5. cat /dev/null >/etc/hosts
  6. goreman -f /certs-common-name-multi/Procfile start &
  7. # TODO: remove random sleeps
  8. sleep 7s
  9. ETCDCTL_API=3 ./etcdctl \
  10. --cacert=/certs-common-name-multi/ca.crt \
  11. --cert=/certs-common-name-multi/server-1.crt \
  12. --key=/certs-common-name-multi/server-1.key.insecure \
  13. --endpoints=https://m1.etcd.local:2379 \
  14. endpoint health --cluster
  15. ETCDCTL_API=3 ./etcdctl \
  16. --cacert=/certs-common-name-multi/ca.crt \
  17. --cert=/certs-common-name-multi/server-2.crt \
  18. --key=/certs-common-name-multi/server-2.key.insecure \
  19. --endpoints=https://m1.etcd.local:2379,https://m2.etcd.local:22379,https://m3.etcd.local:32379 \
  20. put abc def
  21. ETCDCTL_API=3 ./etcdctl \
  22. --cacert=/certs-common-name-multi/ca.crt \
  23. --cert=/certs-common-name-multi/server-3.crt \
  24. --key=/certs-common-name-multi/server-3.key.insecure \
  25. --endpoints=https://m1.etcd.local:2379,https://m2.etcd.local:22379,https://m3.etcd.local:32379 \
  26. get abc