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