From 5783460dbb97f7fa2b9874228716d5ace7a67451 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Fri, 15 Dec 2017 13:35:48 -0800 Subject: [PATCH] hack/scripts-dev: rename to example Signed-off-by: Gyuho Lee --- hack/scripts-dev/Makefile | 34 ++++++++++--------- .../docker-dns/certs-common-name/gencerts.sh | 2 +- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/hack/scripts-dev/Makefile b/hack/scripts-dev/Makefile index 8e05cbbd6..055b8095e 100644 --- a/hack/scripts-dev/Makefile +++ b/hack/scripts-dev/Makefile @@ -228,7 +228,6 @@ docker-static-ip-test-certs-metrics-proxy-run: # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com # make pull-docker-dns-test -f ./hack/scripts-dev/Makefile # make docker-dns-test-certs-run -f ./hack/scripts-dev/Makefile -# make docker-dns-test-certs-common-name-run -f ./hack/scripts-dev/Makefile # make docker-dns-test-certs-gateway-run -f ./hack/scripts-dev/Makefile # make docker-dns-test-certs-wildcard-run -f ./hack/scripts-dev/Makefile @@ -270,20 +269,6 @@ docker-dns-test-certs-run: gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \ /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd" -docker-dns-test-certs-common-name-run: - $(info GO_VERSION: $(_GO_VERSION)) - $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) - $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG)) - docker run \ - --rm \ - --tty \ - --dns 127.0.0.1 \ - $(_TMP_DIR_MOUNT_FLAG) \ - --mount type=bind,source=`pwd`/bin,destination=/etcd \ - --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs-common-name,destination=/certs-common-name \ - gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \ - /bin/bash -c "cd /etcd && /certs-common-name/run.sh && rm -rf m*.etcd" - docker-dns-test-certs-gateway-run: $(info GO_VERSION: $(_GO_VERSION)) $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) @@ -388,4 +373,21 @@ docker-dns-srv-test-certs-wildcard-run: --mount type=bind,source=`pwd`/bin,destination=/etcd \ --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns-srv/certs-wildcard,destination=/certs-wildcard \ gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \ - /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd" \ No newline at end of file + /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd" + +# example workflow for common name + auth +# TODO: make this as tests +# make docker-dns-example-certs-common-name-run -f ./hack/scripts-dev/Makefile +docker-dns-example-certs-common-name-run: + $(info GO_VERSION: $(_GO_VERSION)) + $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) + $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG)) + docker run \ + --rm \ + --tty \ + --dns 127.0.0.1 \ + $(_TMP_DIR_MOUNT_FLAG) \ + --mount type=bind,source=`pwd`/bin,destination=/etcd \ + --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs-common-name,destination=/certs-common-name \ + gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \ + /bin/bash -c "cd /etcd && /certs-common-name/run.sh && rm -rf m*.etcd" diff --git a/hack/scripts-dev/docker-dns/certs-common-name/gencerts.sh b/hack/scripts-dev/docker-dns/certs-common-name/gencerts.sh index efc098f53..7fcfea569 100755 --- a/hack/scripts-dev/docker-dns/certs-common-name/gencerts.sh +++ b/hack/scripts-dev/docker-dns/certs-common-name/gencerts.sh @@ -14,7 +14,7 @@ cfssl gencert --initca=true ./ca-csr.json | cfssljson --bare ./ca mv ca.pem ca.crt openssl x509 -in ca.crt -noout -text -# generate wildcard certificates DNS: *.etcd.local +# generate wildcard certificates DNS: m1/m2/m3.etcd.local cfssl gencert \ --ca ./ca.crt \ --ca-key ./ca-key.pem \