mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
hack/scripts-dev: add "docker-dns-test-insecure-run"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
33
hack/scripts-dev/docker-dns/insecure/run.sh
Executable file
33
hack/scripts-dev/docker-dns/insecure/run.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
rm -rf /tmp/m1.data /tmp/m2.data /tmp/m3.data
|
||||
|
||||
/etc/init.d/bind9 start
|
||||
|
||||
# get rid of hosts so go lookup won't resolve 127.0.0.1 to localhost
|
||||
cat /dev/null >/etc/hosts
|
||||
|
||||
goreman -f /insecure/Procfile start &
|
||||
|
||||
# TODO: remove random sleeps
|
||||
sleep 7s
|
||||
|
||||
ETCDCTL_API=3 ./etcdctl \
|
||||
--endpoints=http://m1.etcd.local:2379 \
|
||||
endpoint health --cluster
|
||||
|
||||
ETCDCTL_API=3 ./etcdctl \
|
||||
--endpoints=http://m1.etcd.local:2379,http://m2.etcd.local:22379,http://m3.etcd.local:32379 \
|
||||
put abc def
|
||||
|
||||
ETCDCTL_API=3 ./etcdctl \
|
||||
--endpoints=http://m1.etcd.local:2379,http://m2.etcd.local:22379,http://m3.etcd.local:32379 \
|
||||
get abc
|
||||
|
||||
# TODO: add host header check to enforce same-origin-policy
|
||||
curl -L http://127.0.0.1:2379/v2/keys/queue \
|
||||
-XPOST \
|
||||
-d value=Job1
|
||||
|
||||
curl -L http://m1.etcd.local:2379/v2/keys/queue \
|
||||
-XPOST \
|
||||
-d value=Job1
|
||||
Reference in New Issue
Block a user