run.sh 757 B

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/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