From 55d4ce6c0e154c66cd7f9840451543537dfdd429 Mon Sep 17 00:00:00 2001 From: Steven Miller Date: Tue, 25 Feb 2020 10:27:48 -0500 Subject: [PATCH] Remove kubernetes version testing --- .circleci/config.yml | 9 +-------- bin/install-ci-tools | 11 +++++++++++ bin/reset-local-dev | 4 ++++ bin/run-ci | 4 ++++ bin/start-kind-cluster | 19 ++++++++++++++----- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d0412f6..2c386439 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,17 +8,10 @@ workflows: - build-artifact: requires: - lint - - 'airflow-on-k8s-1-14': - requires: - - build-artifact - - 'airflow-on-k8s-1-15': - requires: - - build-artifact - approve-release: type: approval requires: - - 'airflow-on-k8s-1-14' - - 'airflow-on-k8s-1-15' + - build-artifact filters: branches: only: diff --git a/bin/install-ci-tools b/bin/install-ci-tools index a8a73747..ba3a4859 100755 --- a/bin/install-ci-tools +++ b/bin/install-ci-tools @@ -46,4 +46,15 @@ else chmod +x ./kubectl fi +set -e + +# Install mkcert +if [[ -f /tmp/bin/mkcert ]]; then + echo "mkcert is already installed." +else + cd /tmp/ + curl -Lo /tmp/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-${OS}-amd64 + chmod +x /tmp/bin/mkcert +fi + cd $CURRENT_DIR diff --git a/bin/reset-local-dev b/bin/reset-local-dev index c45c8e6d..daf2137a 100755 --- a/bin/reset-local-dev +++ b/bin/reset-local-dev @@ -12,4 +12,8 @@ echo "Deploying Airflow..." helm install \ -n airflow \ + --set webserver.jwtSigningCertificateSecretName=astronomer-tls \ + --set ingress.tlsSecretName=astronomer-tls \ + --set data.metadataSecretName=astronomer-bootstrap \ + --set data.resultBackendSecretName=astronomer-bootstrap \ $REPO_DIR diff --git a/bin/run-ci b/bin/run-ci index a7f5fbcf..8a1e3360 100755 --- a/bin/run-ci +++ b/bin/run-ci @@ -43,6 +43,10 @@ set -x helm install \ -n airflow \ + --set webserver.jwtSigningCertificateSecretName=astronomer-tls \ + --set ingress.tlsSecretName=astronomer-tls \ + --set data.metadataSecretName=astronomer-bootstrap \ + --set data.resultBackendSecretName=astronomer-bootstrap \ --wait \ $HELM_CHART_PATH diff --git a/bin/start-kind-cluster b/bin/start-kind-cluster index 7a12af19..92449c5b 100755 --- a/bin/start-kind-cluster +++ b/bin/start-kind-cluster @@ -17,15 +17,24 @@ helm init --service-account tiller --upgrade --wait echo "Tiller installed." echo "Deploying postgresql..." -helm install -n postgresql --namespace astronomer --wait \ +helm install -n postgresql --namespace default --wait \ --set image.tag=9.6.15-centos-7-r34 \ --set postgresqlPassword=notactuallysecret \ stable/postgresql > /dev/null 2>&1 -export POSTGRES_PASSWORD=$(kubectl get secret --namespace astronomer postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode) -export DB_CONNECTION_STRING="postgres://postgres:${POSTGRES_PASSWORD}@postgresql.astronomer:5432" +export POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode) +export DB_CONNECTION_STRING="postgres://postgres:${POSTGRES_PASSWORD}@postgresql.default:5432" kubectl create secret generic astronomer-bootstrap \ --from-literal connection=$DB_CONNECTION_STRING \ - --namespace astronomer - + --namespace default echo "Postgresql deployed." + +echo "Making certs" +mkcert -install +mkcert -cert-file /tmp/fullchain.pem -key-file /tmp/privkey.pem app.local.astronomer-development.com local.astronomer-development.com "*.local.astronomer-development.com" +cat "$(mkcert -CAROOT)/rootCA.pem" >> /tmp/fullchain.pem + +echo "Installing TLS cert and private key" +kubectl create secret tls astronomer-tls \ + --key /tmp/privkey.pem \ + --cert /tmp/fullchain.pem