Skip to content

Commit

Permalink
Merge pull request #885 from scottyhq/aws-fix
Browse files Browse the repository at this point in the history
closes #884. fix AWS staging for jupyterhub 10.2
  • Loading branch information
scottyhq authored Dec 1, 2020
2 parents 4bdb2ce + 7ac73ca commit 6f28f26
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-aws-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ jobs:

- name: Setup Helm
run: |
curl https://get.helm.sh/helm-v3.1.2-linux-amd64.tar.gz | tar -xzf -
curl https://get.helm.sh/helm-v3.4.1-linux-amd64.tar.gz | tar -xzf -
sudo mv linux-amd64/helm $HELM_EXECUTABLE
helm3 version
helm3 repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm3 repo add dask https://helm.dask.org/
helm3 repo add dask-gateway https://dask.org/dask-gateway-helm-repo/
helm3 repo add stable https://kubernetes-charts.storage.googleapis.com
helm3 repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm3 repo add stable https://charts.helm.sh/stable
#for prometheus & grafana
#helm3 repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm3 repo update
- name: Add Runner IP to EKS Kubernetes API Whitelist
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Helm
on:
pull_request_target:
branches:
- staging
- prod

env:
HELM_EXECUTABLE: /usr/local/bin/helm3

# See https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/master/tools/templates/lint-and-validate.py
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Unlock git-crypt Secrets
uses: docker://yuvipanda/hubploy:20200826083951674280
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
with:
entrypoint: /bin/bash
args: -c "echo ${GIT_CRYPT_KEY} | base64 -d | git crypt unlock - && git crypt status"

- name: Setup Helm
run: |
curl https://get.helm.sh/helm-v3.4.1-linux-amd64.tar.gz | tar -xzf -
sudo mv linux-amd64/helm $HELM_EXECUTABLE
helm3 version
helm3 repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm3 repo add dask https://helm.dask.org/
helm3 repo add dask-gateway https://dask.org/dask-gateway-helm-repo/
helm3 repo add stable https://charts.helm.sh/stable
# needed for prometheus and grafana
#helm3 repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm3 repo update
- name: Helm Lint AWS Config
run: |
helm lint --strict pangeo-deploy -f pangeo-deploy/values.yaml \
-f deployments/icesat2/config/common.yaml \
-f deployments/icesat2/config/staging.yaml \
-f deployments/icesat2/secrets/staging.yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.swp
Chart.lock
pangeo-deploy/charts/
pangeo-deploy/requirements.lock
Expand Down
18 changes: 16 additions & 2 deletions deployments/icesat2/config/common.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
daskhub:
jupyterhub:
proxy:
# Disable network security policy, perhaps causing upgrade issues.
# https://github.com/pangeo-data/pangeo-cloud-federation/issues/884
chp:
networkPolicy:
enabled: false
traefik:
networkPolicy:
enabled: false
scheduling:
userPods:
nodeAffinity:
Expand All @@ -12,8 +21,13 @@ daskhub:
continuous:
enabled: false
singleuser:
image:
pullPolicy: 'Always'
networkPolicy:
# Disable network security policy, perhaps causing upgrade issues.
# https://github.com/pangeo-data/pangeo-cloud-federation/issues/884
enabled: false
# only if using 'latest' or 'master' tags
#image:
# pullPolicy: 'Always'
startTimeout: 600
initContainers:
- name: change-volume-mount-permissions
Expand Down
1 change: 1 addition & 0 deletions deployments/icesat2/config/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ daskhub:
image: uwhackweeks/icesat2:latest
proxy:
https:
enabled: true
hosts:
- aws-uswest2.pangeo.io
letsencrypt:
Expand Down
4 changes: 4 additions & 0 deletions deployments/icesat2/config/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ daskhub:
extraEnv:
OAUTH_CALLBACK_URL: "https://staging.aws-uswest2.pangeo.io/hub/oauth_callback"
singleuser:
# only if using 'latest' or 'master' tags
image:
pullPolicy: 'Always'
profileList:
- display_name: "Default Image"
default: "True"
Expand Down Expand Up @@ -44,6 +47,7 @@ daskhub:
image: uwhackweeks/icesat2:latest
proxy:
https:
enabled: true
hosts:
- staging.aws-uswest2.pangeo.io
letsencrypt:
Expand Down
Binary file modified deployments/icesat2/secrets/prod.yaml
Binary file not shown.
Binary file modified deployments/icesat2/secrets/staging.yaml
Binary file not shown.
2 changes: 1 addition & 1 deletion pangeo-deploy/templates/pangeo-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.rbac.enabled -}}
{{- if .Values.daskhub.rbac.enabled -}}
kind: ServiceAccount
apiVersion: v1
metadata:
Expand Down

0 comments on commit 6f28f26

Please sign in to comment.