run.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/sh
  2. rm -rf /tmp/m{1,2,3,4,5,6}.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/Procfile start &
  7. # TODO: remove random sleeps
  8. sleep 7s
  9. ETCDCTL_API=3 ./etcdctl \
  10. --cacert=/certs/ca.crt \
  11. --cert=/certs/server.crt \
  12. --key=/certs/server.key.insecure \
  13. --discovery-srv etcd.local \
  14. endpoint health --cluster
  15. ETCDCTL_API=3 ./etcdctl \
  16. --cacert=/certs/ca.crt \
  17. --cert=/certs/server.crt \
  18. --key=/certs/server.key.insecure \
  19. --discovery-srv etcd.local \
  20. put abc def
  21. ETCDCTL_API=3 ./etcdctl \
  22. --cacert=/certs/ca.crt \
  23. --cert=/certs/server.crt \
  24. --key=/certs/server.key.insecure \
  25. --discovery-srv etcd.local \
  26. get abc
  27. ETCDCTL_API=3 ./etcdctl \
  28. --cacert=/certs/ca.crt \
  29. --cert=/certs/server.crt \
  30. --key=/certs/server.key.insecure \
  31. --discovery-srv etcd.local \
  32. --discovery-srv-name c1 \
  33. endpoint health --cluster
  34. ETCDCTL_API=3 ./etcdctl \
  35. --cacert=/certs/ca.crt \
  36. --cert=/certs/server.crt \
  37. --key=/certs/server.key.insecure \
  38. --discovery-srv etcd.local \
  39. --discovery-srv-name c1 \
  40. put ghi jkl
  41. ETCDCTL_API=3 ./etcdctl \
  42. --cacert=/certs/ca.crt \
  43. --cert=/certs/server.crt \
  44. --key=/certs/server.key.insecure \
  45. --discovery-srv etcd.local \
  46. --discovery-srv-name c1 \
  47. get ghi