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

Merge #5844, #5899, #5901, #5904, #5905, #5909, #5910, #5912, #5916, #5917, #5918 #5919

Merged
merged 36 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
69d0c67
UGR GKE as GCP Deployments; minor docs edit
gmerritt Jul 7, 2024
3c4684c
Clean-up thanks to Shane's feedback
gmerritt Jul 8, 2024
6d1b6f2
cookiecutter'ed the deployment, sops'ed the secrets
gmerritt Jul 16, 2024
1fe4cae
README for deployment manager scripts & files
gmerritt Jul 23, 2024
c8384f1
Custom image, BUT I'm having personal repo2docker issues in general
gmerritt Jul 30, 2024
8375cbf
Fixing cluster reference in ugr01 common.yaml
gmerritt Jul 31, 2024
1f8596e
Merge pull request #5844 from gmerritt/ugrgke
gmerritt Aug 1, 2024
37c8d1a
Add GCP .json secrets to ugr01 deployment
gmerritt Aug 1, 2024
fd10975
Merge pull request #5899 from gmerritt/ugrgke
gmerritt Aug 1, 2024
69fa5b1
Add jupyter_app_launcher and jupyter_cache to dashboard image in Dev hub
balajialg Aug 1, 2024
00e15a3
Merge pull request #5901 from balajialg/jupyterlab_app_launcher
balajialg Aug 2, 2024
015d6ad
Debump 4 GB RAM allocation for a Data 100 assignment
balajialg Aug 5, 2024
35ff741
debumping ram
shaneknapp Aug 5, 2024
51219f5
Merge pull request #5904 from balajialg/data100_ram_debump
balajialg Aug 5, 2024
e1a71d7
change conf.py
shaneknapp Aug 5, 2024
fd09570
undo changes to data100 config
shaneknapp Aug 5, 2024
6bc7a29
Merge pull request #5905 from shaneknapp/debump-data100-ram
shaneknapp Aug 5, 2024
6760c51
Enable gh-scoped-creds on dev hub.
ryanlovett Aug 5, 2024
ebfb1c9
Merge pull request #5909 from ryanlovett/dev-gh-scoped-creds
ryanlovett Aug 5, 2024
4b46301
Remove group-specific vars.
ryanlovett Aug 5, 2024
986a168
Merge pull request #5910 from ryanlovett/dev-gh-group-remove
ryanlovett Aug 5, 2024
63e2ba7
Add tools for summer workshop.
ryanlovett Aug 5, 2024
00a8bc9
Bump matplotlib.
ryanlovett Aug 6, 2024
7a4e56e
Move packages from pip section to conda.
ryanlovett Aug 6, 2024
c483db5
mystmd requires nodejs >=18.
ryanlovett Aug 6, 2024
05e5e5d
Merge pull request #5912 from ryanlovett/datahub-aug-workshop
ryanlovett Aug 6, 2024
b6074f4
Enable man.
ryanlovett Aug 8, 2024
4825897
Specify dpkg exclude file properly.
ryanlovett Aug 8, 2024
bda73ad
Reorder commands.
ryanlovett Aug 8, 2024
430d865
Pass correct path.
ryanlovett Aug 8, 2024
5f6f8ef
common.yaml proxy update to match edx
gmerritt Aug 8, 2024
266961d
Merge pull request #5916 from ryanlovett/datahub-man
ryanlovett Aug 8, 2024
180801e
load balancer IP added to staging
gmerritt Aug 8, 2024
55195ba
Merge pull request #5917 from gmerritt/ugrgke
gmerritt Aug 8, 2024
42df278
correcting load balancer IP
gmerritt Aug 8, 2024
12cec7a
Merge pull request #5918 from gmerritt/ugrgke
gmerritt Aug 8, 2024
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
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ jobs:
hubploy deploy --timeout 30m stat20 hub ${CIRCLE_BRANCH}
no_output_timeout: 30m

- run:
name: Deploy ugr01
command: |
hubploy deploy --timeout 30m ugr01 hub ${CIRCLE_BRANCH}
no_output_timeout: 30m

- run:
name: Deploy workshop
command: |
Expand Down Expand Up @@ -626,6 +632,15 @@ workflows:
ignore:
- staging
- prod
- hubploy/build-image:
deployment: ugr01
name: ugr01 image build
# Filters can only be per-job? wtf
filters:
branches:
ignore:
- staging
- prod

deploy:
jobs:
Expand Down Expand Up @@ -799,6 +814,14 @@ workflows:
branches:
only:
- staging
- hubploy/build-image:
deployment: ugr01
name: ugr01 image build
push: true
filters:
branches:
only:
- staging
# Build images only during the staging deploy. All merges
# to prod need to go via staging, so prod should *never*
# use images not built for staging. By enforcing this at the
Expand Down
5 changes: 0 additions & 5 deletions deployments/data100/config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ jupyterhub:
admin: true
mem_limit: 4G

# Data 100, Summer 2024, https://github.com/berkeley-dsep-infra/datahub/issues/5862, to be removed by 7/29
course::1535115:
mem_limit: 4G
mem_guarantee: 4G

# Data 100, Spring 2024, https://github.com/berkeley-dsep-infra/datahub/issues/5376
#course::1531798::group::Admins: # Spring 2024, Data 100 Admins, ensured 4G RAM
# mem_limit: 4G
Expand Down
12 changes: 12 additions & 0 deletions deployments/datahub/images/default/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ RUN apt-get -qq update --yes && \

RUN adduser --disabled-password --gecos "Default Jupyter user" ${NB_USER}

# Do not exclude manpages from being installed.
RUN sed -i -e '/usr.share.man/s/^/#/' /etc/dpkg/dpkg.cfg.d/excludes

# Install all apt packages
COPY apt.txt /tmp/apt.txt
RUN apt-get -qq update --yes && \
Expand All @@ -30,6 +33,15 @@ RUN apt-get -qq update --yes && \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/*

# From docker-ce-packaging
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi

RUN mandb -c

# Create user owned R libs dir
# This lets users temporarily install packages
RUN install -d -o ${NB_USER} -g ${NB_USER} ${R_LIBS_USER}
Expand Down
4 changes: 4 additions & 0 deletions deployments/datahub/images/default/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ libgdal-dev
libgeos-dev
libproj-dev
libmysqlclient-dev

# 2024-08 workshop
# https://github.com/berkeley-dsep-infra/datahub/issues/5906
man
31 changes: 19 additions & 12 deletions deployments/datahub/images/default/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For conda, == is exact constraint, while = is fuzzy constraint.
# pip uses https://peps.python.org/pep-0440/ which does not have =.
dependencies:
- nodejs=16.*
- nodejs=18.*
- traitlets=5.9.*
- pip=22.2.*
- python=3.11.*
Expand All @@ -18,7 +18,7 @@ dependencies:
# Base scientific packages that other conda packages we install depend on
# We don't want to have conda packages depend on pip packages if possible
- numpy=1.26.*
- matplotlib=3.7.*
- matplotlib=3.9.*
- scipy=1.10.0
- ipympl=0.9.*
- pandas==2.2.2
Expand Down Expand Up @@ -99,9 +99,21 @@ dependencies:
- obspy==1.4.1

# Install VSCode for ESPM courses - https://github.com/berkeley-dsep-infra/datahub/issues/5716
- nodejs=16 # code-server requires node < 17
- jupyter-vscode-proxy==0.5
- code-server==4.10.1
- jupyter-vscode-proxy==0.6
- code-server==4.23.1

# 2024-08 workshop, #5908
- tree==2.1.3
- ruff==0.5.6

# Stat 165/265 requires prophet, Spring, 2024
- prophet==1.1.5

# [DH-319] https://github.com/berkeley-dsep-infra/datahub/issues/5827, ESPM 157
- altair==5.3.0
- leafmap==0.36.4
- mystmd==1.3.1
- jupyterlab-git==0.50.1

- pip:
# - -r /tmp/infra-requirements.txt
Expand Down Expand Up @@ -205,9 +217,6 @@ dependencies:
# pulled in by ottr, if not pinned to 1.16.2, 1.16.3 causes DH-323
- jupytext==1.16.2

# Stat 165/265 requires prophet, Spring, 2024
- prophet==1.1.5

# https://github.com/berkeley-dsep-infra/datahub/issues/5497
- ottr-force-save-labextension==0.1.1

Expand All @@ -219,8 +228,6 @@ dependencies:
- rtree==1.2.0

# [DH-319] https://github.com/berkeley-dsep-infra/datahub/issues/5827, ESPM 157
- altair==5.3.0
- ibis-framework[pandas]==9.2.0
- leafmap==0.36.1
- mystmd==1.3.0
- jupyterlab-git==0.50.1

# ATTEMPT TO PUT NEW PACKAGES IN THE CONDA LIST ABOVE FIRST, RATHER THAN PIP
8 changes: 5 additions & 3 deletions deployments/dev/config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ jupyterhub:
extraEnv:
# Unset NotebookApp from hub/values. Necessary for recent lab versions.
JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp"

# Specify our app for gh-scoped-creds that has read/write scopes
GH_SCOPED_CREDS_CLIENT_ID: Iv23ct7Qx1mAotaIIYx9
GH_SCOPED_CREDS_APP_URL: https://github.com/apps/berkeley-datahub-git-access
defaultUrl: /lab
profileList:
- display_name: "Dockerfile image"
Expand Down Expand Up @@ -97,9 +101,7 @@ jupyterhub:
course::1524699::group::all-admins:
mem_limit: 12288M
mem_guarantee: 12288M
env:
GH_SCOPED_CREDS_CLIENT_ID: "Iv23liFjgKFgkSBWph4C"
GH_SCOPED_CREDS_APP_URL: "https://github.com/apps/test-gh-scoped-creds"

#
# # Example: increase memory for everyone affiliated with a course.
#
Expand Down
2 changes: 2 additions & 0 deletions deployments/dev/images/secondary/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dependencies:
- python==3.11.*
- git==2.39.1
- jupyterhub==4.1.5
- jupyter_app_launcher==0.2.1
- jupyter-cache==1.0.0
- jupyter-resource-usage==1.0.0
- jupyterlab==4.0.11
- jupyterlab-favorites==3.0.0
Expand Down
96 changes: 96 additions & 0 deletions deployments/ugr01/config/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
nfsPVC:
enabled: true
nfs:
serverIP: 10.49.181.18

jupyterhub:
scheduling:
userScheduler:
nodeSelector:
hub.jupyter.org/pool-name: core-pool-2024-07-07
proxy:
chp:
nodeSelector:
hub.jupyter.org/pool-name: core-pool-2024-07-07
service:
type: LoadBalancer

hub:
nodeSelector:
hub.jupyter.org/pool-name: core-pool-2024-07-07
config:
loadRoles:
# datahub staff
datahub-staff:
description: Enable admin for datahub staff
# this role provides permissions to...
scopes:
- admin-ui
- admin:groups
- admin:users
- admin:servers
- read:roles
- read:hub
- access:servers
# this role will be assigned to...
groups:
- course::1524699::group::all-admins
singleuser:
extraFiles:
# DH-216
remove-exporters:
mountPath: /etc/jupyter/jupyter_notebook_config.py
stringData: |
c.QtPDFExporter.enabled = False
c.QtPNGExporter.enabled = False
c.WebPDFExporter.enabled = False
extraEnv:
# Unset NotebookApp from hub/values. Necessary for recent lab versions.
JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp"
nodeSelector:
hub.jupyter.org/pool-name: user-ugr01
storage:
type: static
static:
pvcName: home-nfs-v3
subPath: "{username}"
memory:
guarantee: 512M
limit: 1G

#custom:
# group_profiles:
#
# # Example: increase memory for everyone affiliated with a course.
#
# # Name of Class 100, Fall '22; requested in #98765
# course::123456:
# mem_limit: 4096M
# mem_guarantee: 2048M
#
# # Example: grant admin rights to course staff.
# # Enrollment types returned by the Canvas API are `teacher`,
# # `student`, `ta`, `observer`, and `designer`.
# # https://canvas.instructure.com/doc/api/enrollments.html
#
# # Some other class 200, Spring '23; requested in #98776
# course::234567::enrollment_type::teacher:
# mem_limit: 2096M
# mem_guarantee: 2048M
# course::234567::enrollment_type::ta:
# mem_limit: 2096M
# mem_guarantee: 2048M
#
#
# # Example: a fully specified CanvasOAuthenticator group name.
# # This could be useful for temporary resource bumps where the
# # instructor could add people to groups in the bCourses UI. This
# # would benefit from the ability to read resource bumps from
# # jupyterhub's properties. (attributes in the ORM)
#
# # Name of Class 100, Fall '22; requested in #98770
# course::123456::group::lab4-bigdata:
# - mountPath: /home/rstudio/.ssh
# name: home
# subPath: _some_directory/_ssh
# readOnly: true
16 changes: 16 additions & 0 deletions deployments/ugr01/config/filestore/squash-flags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"--file-share":
{
"name": "shares",
"capacity": "desired-capacity",
"nfs-export-options": [
{
"access-mode": "READ_WRITE",
"ip-ranges": ["10.0.0.0/8"],
"squash-mode": "ROOT_SQUASH",
"anon_uid": 1000,
"anon_gid": 1000
}
],
}
}
18 changes: 18 additions & 0 deletions deployments/ugr01/config/prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
nfsPVC:
nfs:
shareName: shares/ugr01/prod

jupyterhub:
ingress:
enabled: true
hosts:
- ugr01.datahub.berkeley.edu
tls:
- secretName: tls-cert
hosts:
- ugr01.datahub.berkeley.edu
hub:
db:
pvc:
# This also holds logs
storage: 4Gi
22 changes: 22 additions & 0 deletions deployments/ugr01/config/staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
nfsPVC:
nfs:
shareName: shares/ugr01/staging

jupyterhub:
scheduling:
userScheduler:
replicas: 1
prePuller:
continuous:
enabled: false
proxy:
service:
loadBalancerIP: 34.172.42.174
ingress:
enabled: true
hosts:
- ugr01-staging.datahub.berkeley.edu
tls:
- secretName: tls-cert
hosts:
- ugr01-staging.datahub.berkeley.edu
19 changes: 19 additions & 0 deletions deployments/ugr01/hubploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
images:
images:
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/ugr01-user-image
path: image/
repo2docker:
base_image: docker.io/library/buildpack-deps:jammy
registry:
provider: gcloud
gcloud:
project: ucb-datahub-2018
service_key: gcr-key.json

cluster:
provider: gcloud
gcloud:
project: ucb-datahub-2018
service_key: gke-key.json
cluster: ugresearch-cluster
zone: us-central1
Loading
Loading