1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#!/bin/sh
rm -rf /tmp/m1.data /tmp/m2.data /tmp/m3.data /tmp/proxy.data
goreman -f /certs-metrics-proxy/Procfile start &
# TODO: remove random sleeps
sleep 7s
ETCDCTL_API=3 ./etcdctl \
--cacert=/certs-metrics-proxy/ca.crt \
--cert=/certs-metrics-proxy/server.crt \
--key=/certs-metrics-proxy/server.key.insecure \
--endpoints=https://localhost:2379 \
endpoint health --cluster
ETCDCTL_API=3 ./etcdctl \
--cacert=/certs-metrics-proxy/ca.crt \
--cert=/certs-metrics-proxy/server.crt \
--key=/certs-metrics-proxy/server.key.insecure \
--endpoints=https://localhost:2379,https://localhost:22379,https://localhost:32379 \
put abc def
ETCDCTL_API=3 ./etcdctl \
--cacert=/certs-metrics-proxy/ca.crt \
--cert=/certs-metrics-proxy/server.crt \
--key=/certs-metrics-proxy/server.key.insecure \
--endpoints=https://localhost:2379,https://localhost:22379,https://localhost:32379 \
get abc
#################
sleep 3s && printf "\n\n" && echo "curl https://localhost:2378/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:2378/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl https://localhost:2379/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:2379/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl http://localhost:9379/metrics"
curl -L http://localhost:9379/metrics | grep Put | tail -3
#################
#################
sleep 3s && printf "\n\n" && echo "curl https://localhost:22378/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:22378/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl https://localhost:22379/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:22379/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl http://localhost:29379/metrics"
curl -L http://localhost:29379/metrics | grep Put | tail -3
#################
#################
sleep 3s && printf "\n\n" && echo "curl https://localhost:32378/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:32378/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl https://localhost:32379/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:32379/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "curl http://localhost:39379/metrics"
curl -L http://localhost:39379/metrics | grep Put | tail -3
#################
#################
sleep 3s && printf "\n\n" && echo "Requests to gRPC proxy localhost:23790"
ETCDCTL_API=3 ./etcdctl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
--endpoints=localhost:23790 \
put ghi jkl
ETCDCTL_API=3 ./etcdctl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
--endpoints=localhost:23790 \
get ghi
sleep 3s && printf "\n" && echo "Requests to gRPC proxy https://localhost:23790/metrics"
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:23790/metrics | grep Put | tail -3
sleep 3s && printf "\n" && echo "Requests to gRPC proxy http://localhost:9378/metrics"
curl -L http://localhost:9378/metrics | grep Put | tail -3
<<COMMENT
curl \
--cacert /certs-metrics-proxy/ca.crt \
--cert /certs-metrics-proxy/server.crt \
--key /certs-metrics-proxy/server.key.insecure \
-L https://localhost:9378/metrics | grep Put | tail -3
COMMENT
#################
|