diff --git a/.gitignore b/.gitignore index 192eeeb40af..88f3293fc05 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /machine* /bin .vagrant -/*_etcd_data +*_etcd_data etcd *.swp +/hack/insta-discovery/.env diff --git a/hack/README.md b/hack/README.md new file mode 100644 index 00000000000..9392dc15dd7 --- /dev/null +++ b/hack/README.md @@ -0,0 +1 @@ +Various hacks that are used by developers. diff --git a/hack/insta-discovery/Procfile b/hack/insta-discovery/Procfile new file mode 100644 index 00000000000..cd41434fc69 --- /dev/null +++ b/hack/insta-discovery/Procfile @@ -0,0 +1,4 @@ +# Use goreman to run `go get github.com/mattn/goreman` +etcd1: ../../bin/etcd -name node1 -listen-client-urls http://127.0.0.1:4001 -advertise-client-urls http://127.0.0.1:4001 -listen-peer-urls http://127.0.0.1:7001 -advertise-peer-urls http://127.0.0.1:7001 +etcd2: ../../bin/etcd -name node2 -listen-client-urls http://127.0.0.1:4002 -advertise-client-urls http://127.0.0.1:4002 -listen-peer-urls http://127.0.0.1:7002 -advertise-peer-urls http://127.0.0.1:7002 +etcd3: ../../bin/etcd -name node3 -listen-client-urls http://127.0.0.1:4003 -advertise-client-urls http://127.0.0.1:4003 -listen-peer-urls http://127.0.0.1:7003 -advertise-peer-urls http://127.0.0.1:7003 diff --git a/hack/insta-discovery/README.md b/hack/insta-discovery/README.md new file mode 100644 index 00000000000..4649b4c4826 --- /dev/null +++ b/hack/insta-discovery/README.md @@ -0,0 +1 @@ +Starts a cluster via the discovery service on your local machine. Useful for testing. diff --git a/hack/insta-discovery/discovery b/hack/insta-discovery/discovery new file mode 100755 index 00000000000..c80d5c75831 --- /dev/null +++ b/hack/insta-discovery/discovery @@ -0,0 +1,7 @@ +#!/bin/sh + +disc=$(curl https://discovery.etcd.io/new?size=3) +echo ETCD_DISCOVERY=${disc} > .env +echo "setup discovery start your cluster" +cat .env +goreman start