From 44701d5d7514dbce240d2ae473ab57004f7544aa Mon Sep 17 00:00:00 2001 From: Scott Henderson Date: Wed, 30 Oct 2019 06:06:28 +0000 Subject: [PATCH] initial attempt to bring back aws hub --- .circleci/config.yml | 46 ++++++++++-------- .gitattributes | 2 +- .../{icesat2 => aws-uswest2}/README.md | 0 .../config/common.yaml | 6 +-- .../{icesat2 => aws-uswest2}/config/prod.yaml | 4 +- .../config/shared-nfs-prod.yaml | 0 .../config/shared-nfs-staging.yaml | 0 .../config/staging.yaml | 4 +- .../{icesat2 => aws-uswest2}/hubploy.yaml | 0 .../image/binder/Dockerfile | 0 .../image/binder/apt.txt | 0 .../image/binder/dask_config.yaml | 0 .../image/binder/environment.yml | 0 .../image/binder/postBuild | 0 .../aws-uswest2/secrets/aws-config.txt | Bin 0 -> 137 bytes .../secrets/prod.yaml | Bin .../secrets/staging.yaml | Bin deployments/icesat2/secrets/aws-config.txt | Bin 137 -> 0 bytes 18 files changed, 33 insertions(+), 29 deletions(-) rename deployments/{icesat2 => aws-uswest2}/README.md (100%) rename deployments/{icesat2 => aws-uswest2}/config/common.yaml (80%) rename deployments/{icesat2 => aws-uswest2}/config/prod.yaml (75%) rename deployments/{icesat2 => aws-uswest2}/config/shared-nfs-prod.yaml (100%) rename deployments/{icesat2 => aws-uswest2}/config/shared-nfs-staging.yaml (100%) rename deployments/{icesat2 => aws-uswest2}/config/staging.yaml (73%) rename deployments/{icesat2 => aws-uswest2}/hubploy.yaml (100%) rename deployments/{icesat2 => aws-uswest2}/image/binder/Dockerfile (100%) rename deployments/{icesat2 => aws-uswest2}/image/binder/apt.txt (100%) rename deployments/{icesat2 => aws-uswest2}/image/binder/dask_config.yaml (100%) rename deployments/{icesat2 => aws-uswest2}/image/binder/environment.yml (100%) rename deployments/{icesat2 => aws-uswest2}/image/binder/postBuild (100%) create mode 100644 deployments/aws-uswest2/secrets/aws-config.txt rename deployments/{icesat2 => aws-uswest2}/secrets/prod.yaml (100%) rename deployments/{icesat2 => aws-uswest2}/secrets/staging.yaml (100%) delete mode 100644 deployments/icesat2/secrets/aws-config.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 73f6ce3b..a5e78c9a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,13 +72,13 @@ jobs: # environment: # PYTHONIOENCODING: utf-8 - # - run: - # name: Test building icesat2.pangeo.io image if needed - # when: always - # command: | - # hubploy build icesat2 --commit-range ${COMMIT_RANGE} - # environment: - # PYTHONIOENCODING: utf-8 + - run: + name: Test building aws-uswest2.pangeo.io image if needed + when: always + command: | + hubploy build aws-uswest2 --commit-range ${COMMIT_RANGE} + environment: + PYTHONIOENCODING: utf-8 # - run: # name: Test building esip.pangeo.io image if needed @@ -131,7 +131,8 @@ jobs: pip install --upgrade -r requirements.txt curl -sSL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-226.0.0-linux-x86_64.tar.gz | tar -C venv/ -xzf - - curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator > venv/bin/aws-iam-authenticator + # Can remove this: https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html + curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/linux/amd64/aws-iam-authenticator chmod +x venv/bin/aws-iam-authenticator # https://github.com/awslabs/amazon-ecr-credential-helper/issues/101 # Can simplify to sudo apt install amazon-ecr-credential-helper if running Ubuntu 19.04 and newer @@ -190,13 +191,13 @@ jobs: # environment: # PYTHONIOENCODING: utf-8 - # - run: - # name: Build icesat2.pangeo.io image if needed - # when: always - # command: | - # hubploy build icesat2 --check-registry --push - # environment: - # PYTHONIOENCODING: utf-8 + - run: + name: Build aws-uswest2.pangeo.io image if needed + when: always + command: | + hubploy build aws-uswest2 --check-registry --push + environment: + PYTHONIOENCODING: utf-8 # - run: # name: Build esip.pangeo.io image if needed @@ -219,10 +220,11 @@ jobs: name: Install helm when: always command: | - curl https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz | \ + curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz | \ tar -xzf - sudo mv linux-amd64/helm /usr/local/bin helm init --client-only + helm plugin install https://github.com/rimusz/helm-tiller helm repo add pangeo https://pangeo-data.github.io/helm-chart/ helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/ helm repo update @@ -251,11 +253,13 @@ jobs: # command: | # hubploy deploy nasa pangeo-deploy ${CIRCLE_BRANCH} - # - run: - # name: Deploy icesat2.pangeo.io - # when: always - # command: | - # hubploy deploy icesat2 pangeo-deploy ${CIRCLE_BRANCH} + - run: + name: Deploy aws-uswest2.pangeo.io + when: always + command: | + helm tiller startci + hubploy deploy aws-uswest2 pangeo-deploy ${CIRCLE_BRANCH} + helm tiller stop # - run: # name: Deploy esip.pangeo.io diff --git a/.gitattributes b/.gitattributes index bbc0b5f9..f6d1960f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,6 @@ deployments/ocean/secrets/** filter=git-crypt diff=git-crypt deployments/dev/secrets/** filter=git-crypt diff=git-crypt -deployments/icesat2/secrets/** filter=git-crypt diff=git-crypt +deployments/aws-uswest2/secrets/** filter=git-crypt diff=git-crypt deployments/hydro/secrets/** filter=git-crypt diff=git-crypt deployments/nasa/secrets/** filter=git-crypt diff=git-crypt deployments/esip/secrets/** filter=git-crypt diff=git-crypt diff --git a/deployments/icesat2/README.md b/deployments/aws-uswest2/README.md similarity index 100% rename from deployments/icesat2/README.md rename to deployments/aws-uswest2/README.md diff --git a/deployments/icesat2/config/common.yaml b/deployments/aws-uswest2/config/common.yaml similarity index 80% rename from deployments/icesat2/config/common.yaml rename to deployments/aws-uswest2/config/common.yaml index 496b2226..96205ead 100644 --- a/deployments/icesat2/config/common.yaml +++ b/deployments/aws-uswest2/config/common.yaml @@ -133,9 +133,9 @@ pangeo: customPodHook: | c.JupyterHub.template_paths = ['/srv/jupyterhub/style/templates'] c.JupyterHub.template_vars = { - 'pangeo_hub_title': 'icesat2.pangeo.io', - 'pangeo_hub_subtitle': 'a community hub for icesat2 hackweek', - 'pangeo_welcome': """Welcome to icesat2.pangeo.io, the computational environment for Icesat-2 Hackweek! This hub lives in AWS region us-west-2. It is maintained by the Pangeo project and is supported by NASA Grant #17-ACCESS17-0003 and cloud credits from Amazon. Access is currently limited to the ICESAT-2HackWeek GitHub Organization. The hub's configuration is stored in this github repository. To provide feedback and report any technical problems, please use the github issue tracker.""" + 'pangeo_hub_title': 'aws-uswest.pangeo.io', + 'pangeo_hub_subtitle': 'a community hub for the pangeo project', + 'pangeo_welcome': """Welcome to aws-uswest2.pangeo.io, the computational environment for Icesat-2 Hackweek! This hub lives in AWS region us-west-2. It is maintained by the Pangeo project and is supported by NASA Grant #17-ACCESS17-0003 and cloud credits from Amazon. This is a prototype and should be treated accordingly. We make no promises that the hub will remain active. Do not store passwords or confidential data in your home directory, as we can't guarantee restricted access. Access is currently limited to the Pangeo GitHub Organization members. To provide feedback and report any technical problems, please use the github issue tracker.""" } extraVolumes: - name: custom-assets diff --git a/deployments/icesat2/config/prod.yaml b/deployments/aws-uswest2/config/prod.yaml similarity index 75% rename from deployments/icesat2/config/prod.yaml rename to deployments/aws-uswest2/config/prod.yaml index d141108c..81c376f2 100644 --- a/deployments/icesat2/config/prod.yaml +++ b/deployments/aws-uswest2/config/prod.yaml @@ -4,11 +4,11 @@ pangeo: proxy: https: hosts: - - icesat2.pangeo.io + - aws-uswest2.pangeo.io letsencrypt: contactEmail: scottyh@uw.edu service: loadBalancerIP: aa19367a4573811e9a9ef06d2bcc51c9-1125496385.us-west-2.elb.amazonaws.com auth: github: - callbackUrl: "https://icesat2.pangeo.io/hub/oauth_callback" + callbackUrl: "https://aws-uswest2.pangeo.io/hub/oauth_callback" diff --git a/deployments/icesat2/config/shared-nfs-prod.yaml b/deployments/aws-uswest2/config/shared-nfs-prod.yaml similarity index 100% rename from deployments/icesat2/config/shared-nfs-prod.yaml rename to deployments/aws-uswest2/config/shared-nfs-prod.yaml diff --git a/deployments/icesat2/config/shared-nfs-staging.yaml b/deployments/aws-uswest2/config/shared-nfs-staging.yaml similarity index 100% rename from deployments/icesat2/config/shared-nfs-staging.yaml rename to deployments/aws-uswest2/config/shared-nfs-staging.yaml diff --git a/deployments/icesat2/config/staging.yaml b/deployments/aws-uswest2/config/staging.yaml similarity index 73% rename from deployments/icesat2/config/staging.yaml rename to deployments/aws-uswest2/config/staging.yaml index 883f7702..27008cc5 100644 --- a/deployments/icesat2/config/staging.yaml +++ b/deployments/aws-uswest2/config/staging.yaml @@ -4,11 +4,11 @@ pangeo: proxy: https: hosts: - - staging.icesat2.pangeo.io + - staging.aws-uswest2.pangeo.io letsencrypt: contactEmail: scottyh@uw.edu service: loadBalancerIP: a070b2175523111e9924302ea5ee1624-1148941357.us-west-2.elb.amazonaws.com auth: github: - callbackUrl: "https://staging.icesat2.pangeo.io/hub/oauth_callback" + callbackUrl: "https://staging.aws-uswest2.pangeo.io/hub/oauth_callback" diff --git a/deployments/icesat2/hubploy.yaml b/deployments/aws-uswest2/hubploy.yaml similarity index 100% rename from deployments/icesat2/hubploy.yaml rename to deployments/aws-uswest2/hubploy.yaml diff --git a/deployments/icesat2/image/binder/Dockerfile b/deployments/aws-uswest2/image/binder/Dockerfile similarity index 100% rename from deployments/icesat2/image/binder/Dockerfile rename to deployments/aws-uswest2/image/binder/Dockerfile diff --git a/deployments/icesat2/image/binder/apt.txt b/deployments/aws-uswest2/image/binder/apt.txt similarity index 100% rename from deployments/icesat2/image/binder/apt.txt rename to deployments/aws-uswest2/image/binder/apt.txt diff --git a/deployments/icesat2/image/binder/dask_config.yaml b/deployments/aws-uswest2/image/binder/dask_config.yaml similarity index 100% rename from deployments/icesat2/image/binder/dask_config.yaml rename to deployments/aws-uswest2/image/binder/dask_config.yaml diff --git a/deployments/icesat2/image/binder/environment.yml b/deployments/aws-uswest2/image/binder/environment.yml similarity index 100% rename from deployments/icesat2/image/binder/environment.yml rename to deployments/aws-uswest2/image/binder/environment.yml diff --git a/deployments/icesat2/image/binder/postBuild b/deployments/aws-uswest2/image/binder/postBuild similarity index 100% rename from deployments/icesat2/image/binder/postBuild rename to deployments/aws-uswest2/image/binder/postBuild diff --git a/deployments/aws-uswest2/secrets/aws-config.txt b/deployments/aws-uswest2/secrets/aws-config.txt new file mode 100644 index 0000000000000000000000000000000000000000..5612ab2b3ae9959580e2c87a6a33a096d6ef980f GIT binary patch literal 137 zcmV;40CxWXM@dveQdv+`0Ng8UfmOR+;q%?1iS(D%!DgPO$<1*Z`bavO`yp19Pj$`- z3ih#!Kt$;?^IYa>7%vls#iSJ}IKY!x-Q0x^qKYJy`Cd$eyw15q=5#+`%%gP!5|fE& rt)EoH$w-TU#aF@k)g~bcn2V6hwGRCFc;A13Vcg$4A|^v&VIVDGJyJvI literal 0 HcmV?d00001 diff --git a/deployments/icesat2/secrets/prod.yaml b/deployments/aws-uswest2/secrets/prod.yaml similarity index 100% rename from deployments/icesat2/secrets/prod.yaml rename to deployments/aws-uswest2/secrets/prod.yaml diff --git a/deployments/icesat2/secrets/staging.yaml b/deployments/aws-uswest2/secrets/staging.yaml similarity index 100% rename from deployments/icesat2/secrets/staging.yaml rename to deployments/aws-uswest2/secrets/staging.yaml diff --git a/deployments/icesat2/secrets/aws-config.txt b/deployments/icesat2/secrets/aws-config.txt deleted file mode 100644 index a7ec255f17d543277bd202463d631bedfe587350..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmV;40CxWXM@dveQdv+`0KQ{^M(gL{=ZO%`Dujlq*mO1z3>gcLh2=LOoTo753^31j zd=sPcTk5Jd9Uif#1N%S25Mi4BOaeKWEdVR!s!K4d>~|@{f