run.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-gateway/Procfile start &
  7. # TODO: remove random sleeps
  8. sleep 7s
  9. ETCDCTL_API=3 ./etcdctl \
  10. --cacert=/certs-gateway/ca.crt \
  11. --cert=/certs-gateway/server.crt \
  12. --key=/certs-gateway/server.key.insecure \
  13. --endpoints=https://m1.etcd.local:2379 \
  14. endpoint health --cluster
  15. ETCDCTL_API=3 ./etcdctl \
  16. --cacert=/certs-gateway/ca.crt \
  17. --cert=/certs-gateway/server.crt \
  18. --key=/certs-gateway/server.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-gateway/ca.crt \
  23. --cert=/certs-gateway/server.crt \
  24. --key=/certs-gateway/server.key.insecure \
  25. --endpoints=https://m1.etcd.local:2379,https://m2.etcd.local:22379,https://m3.etcd.local:32379 \
  26. get abc
  27. ETCDCTL_API=3 ./etcdctl \
  28. --cacert=/certs-gateway/ca.crt \
  29. --cert=/certs-gateway/server.crt \
  30. --key=/certs-gateway/server.key.insecure \
  31. --endpoints=127.0.0.1:23790 \
  32. put ghi jkl
  33. ETCDCTL_API=3 ./etcdctl \
  34. --cacert=/certs-gateway/ca.crt \
  35. --cert=/certs-gateway/server.crt \
  36. --key=/certs-gateway/server.key.insecure \
  37. --endpoints=127.0.0.1:23790 \
  38. get ghi