Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup of AWS hub config #612

Merged
merged 2 commits into from
May 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 55 additions & 77 deletions deployments/icesat2/config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,35 @@ pangeo:
continuous:
enabled: false
singleuser:
profileList:
- display_name: "Standard environment"
description: "https://github.com/pangeo-data/pangeo-cloud-federation/tree/staging/deployments/icesat2/image/binder"
default: true
- display_name: "ICESat-2 Hackweek 2020"
description: "https://github.com/ICESAT-2HackWeek/jupyter-image-2020"
kubespawner_override:
image: uwhackweeks/icesat2:latest
- display_name: "Latest Pangeo-notebook"
description: "https://github.com/pangeo-data/pangeo-docker-images/tree/master/pangeo-notebook"
kubespawner_override:
image: pangeo/pangeo-notebook:latest
- display_name: "Latest Base-notebook"
description: "https://github.com/pangeo-data/pangeo-docker-images/tree/master/base-notebook"
kubespawner_override:
image: pangeo/base-notebook:latest
- display_name: "Latest ML-notebook"
description: "https://github.com/pangeo-data/pangeo-docker-images/tree/master/ml-notebook"
kubespawner_override:
image: pangeo/ml-notebook:latest
mem_limit: 60G
mem_guarantee: 25G
environment: {'NVIDIA_DRIVER_CAPABILITIES': 'compute,utility'}
tolerations: [{'key': 'nvidia.com/gpu','operator': 'Equal','value': 'present','effect': 'NoSchedule'}]
extra_resource_limits: {"nvidia.com/gpu": "1"}
serviceAccountName: pangeo
startTimeout: 600
initContainers:
- name: volume-mount-hack
- name: change-volume-mount-permissions
image: busybox
command:
- "sh"
Expand All @@ -32,10 +57,6 @@ pangeo:
- name: jupyterhub-shared
mountPath: /srv/shared
subPath: "icesat2.pangeo.io/shared"
extraVolumes:
- name: jupyterhub-shared
persistentVolumeClaim:
claimName: data-nfs
storage:
type: static
static:
Expand Down Expand Up @@ -84,84 +105,41 @@ pangeo:
limits:
cpu: 1.25
memory: 2G
initContainers:
- name: git-clone-templates
image: alpine/git
args:
- clone
- --single-branch
- --branch=master
- --depth=1
- --
- https://github.com/scottyhq/pangeo-custom-jupyterhub-templates.git
- /mnt/template-repo
securityContext:
runAsUser: 0
volumeMounts:
- name: custom-templates
mountPath: /mnt/template-repo
extraVolumes:
- name: custom-templates
emptyDir: {}
extraVolumeMounts:
# Note: subPath is relative to repo root dir
- name: custom-templates
mountPath: /usr/local/share/jupyterhub/custom-templates
subPath: templates
- name: custom-templates
mountPath: /usr/local/share/jupyterhub/static/extra-assets
subPath: extra-assets
extraConfig:
profileList: |
c.KubeSpawner.profile_list = [
{
'display_name': 'Standard environment (4 vCPU, 7 Gb RAM)',
'default': 'true'
},
{
'display_name': 'IceSat-2 Hackweek 2020 (4 vCPU, 7 Gb RAM)',
'kubespawner_override': {
'image': 'uwhackweeks/icesat2:latest',
}
},
{
'display_name': 'Latest Pangeo-notebook (4 vCPU, 7 Gb RAM)',
'kubespawner_override': {
'image': 'pangeo/pangeo-notebook:latest',
}
},
{
'display_name': 'Latest Base-notebook (4 vCPU, 7 Gb RAM)',
'kubespawner_override': {
'image': 'pangeo/pangeo-notebook:latest',
}
},
{
'display_name': 'Latest Pangeo ML-notebook *experimental*',
'kubespawner_override': {
'mem_limit': '60G',
'mem_guarantee': '25G',
'image': 'pangeo/ml-notebook:latest',
'environment': {'NVIDIA_DRIVER_CAPABILITIES': 'compute,utility'},
'tolerations': [{'key': 'nvidia.com/gpu','operator': 'Equal','value': 'present','effect': 'NoSchedule'}],
'extra_resource_limits': {"nvidia.com/gpu": "1"}
}
},
{
'display_name': 'RStudio *experimental*',
'kubespawner_override': {
'image': 'scottyhq/jhub-rstudio:latest',
}
},
{
'display_name': 'GeoHackweek 2019 (4 vCPU, 7 Gb RAM)',
'kubespawner_override': {
'image': 'scottyhq/geohackweek2019:latest',
}
},
{
'display_name': 'IceSat-2 Hackweek 2019 (4 vCPU, 7 Gb RAM)',
'kubespawner_override': {
'image': 'uwhackweeks/icesat2:2019',
}
}
]
cloneRepo: |
# Hack solution for branding
import os, shutil
repo = 'https://github.com/scottyhq/pangeo-custom-jupyterhub-templates'
webdir = '/usr/local/share/jupyterhub/static'
dst = '/srv/jupyterhub/style'
shutil.rmtree(dst, ignore_errors=True)
os.system(f'git clone {repo} {dst}')
os.system(f'cp -rf {dst}/extra-assets {webdir}')
customPodHook: |
c.JupyterHub.template_paths = ['/srv/jupyterhub/style/templates']
00-template-config: |
c.JupyterHub.template_paths = ['/usr/local/share/jupyterhub/custom-templates/']
c.JupyterHub.template_vars = {
'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 <a href="https://icesat-2hackweek.github.io">Icesat-2 Hackweek</a>! This hub lives in AWS region <code>us-west-2</code>. It is maintained by the <a href="http://pangeo.io">Pangeo project</a> and is supported by <a href="https://github.com/pangeo-data/nasa-access-17">NASA Grant #17-ACCESS17-0003</a> and cloud credits from Amazon. <strong>This is a prototype and should be treated accordingly. We make no promises that the hub will remain active. Do not store passwords or sensitive data in your home directory</strong> Access is currently limited to the <a href="https://github.com/pangeo-data">Pangeo GitHub Organization members</a>. To provide feedback and report any technical problems, please use the <a href="https://github.com/pangeo-data/pangeo-cloud-federation/issues">github issue tracker</a>."""
}
extraVolumes:
- name: custom-assets
emptyDir: {}
extraVolumeMounts:
- name: custom-assets
mountPath: /usr/local/share/jupyterhub/static/extra-assets


dask-gateway:
gateway:
Expand Down