mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
hack: introduce a insta-discovery script
This sets up a localhost cluster via a new discovery token. Very useful for testing.
This commit is contained in:
parent
3ca3c9ad4c
commit
ef0ed31210
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,6 +4,7 @@
|
|||||||
/machine*
|
/machine*
|
||||||
/bin
|
/bin
|
||||||
.vagrant
|
.vagrant
|
||||||
/*_etcd_data
|
*_etcd_data
|
||||||
etcd
|
etcd
|
||||||
*.swp
|
*.swp
|
||||||
|
/hack/insta-discovery/.env
|
||||||
|
1
hack/README.md
Normal file
1
hack/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Various hacks that are used by developers.
|
4
hack/insta-discovery/Procfile
Normal file
4
hack/insta-discovery/Procfile
Normal file
@ -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
|
1
hack/insta-discovery/README.md
Normal file
1
hack/insta-discovery/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Starts a cluster via the discovery service on your local machine. Useful for testing.
|
7
hack/insta-discovery/discovery
Executable file
7
hack/insta-discovery/discovery
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user