run.sh 4.1 KB

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