Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Add a 'desktop-test' hub
Browse files Browse the repository at this point in the history
This puts people directly into
https://github.com/yuvipanda/jupyter-desktop,
with an XFCE environment. There's no specific use case
for this yet, but I'm sure we'll find one soon enough!

This has the same home directories as datahub.

No HTTPS yet, because of jupyterhub/zero-to-jupyterhub-k8s#1448
  • Loading branch information
yuvipanda committed Nov 6, 2019
1 parent 5afa815 commit 424cf11
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ jobs:
command: |
hubploy deploy r hub ${CIRCLE_BRANCH}
- run:
name: Deploy desktop-test
command: |
hubploy deploy desktop-test hub ${CIRCLE_BRANCH}
- run:
name: Deploy data8x
command: |
Expand Down Expand Up @@ -320,6 +325,15 @@ workflows:
ignore:
- staging
- prod
- hubploy/build-image:
deployment: desktop-test
name: desktop-test hub image build
# Filters can only be per-job? wtf
filters:
branches:
ignore:
- staging
- prod
- hubploy/build-image:
deployment: data102
name: data102 image build
Expand Down Expand Up @@ -391,6 +405,16 @@ workflows:
only:
- staging
- prod
- hubploy/build-image:
deployment: desktop-test
name: desktop-test hub image build
push: true
# Filters can only be per-job? wtf
filters:
branches:
only:
- staging
- prod
- hubploy/build-image:
deployment: data102
name: data102 image build
Expand Down Expand Up @@ -426,6 +450,7 @@ workflows:
- datahub image build
- prob140 image build
- r hub image build
- desktop-test hub image build
- julia hub image build
- data102 image build
- data8x image build
Expand Down
45 changes: 45 additions & 0 deletions deployments/desktop-test/config/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
nfsMounter:
enabled: false

nfsPVC:
enabled: true
nfs:
serverIP: nfsserver1
shareName: export/pool0/homes

jupyterhub:
auth:
type: google
admin:
users:
# infrastructure
- rylo
- yuvipanda
- felder
# List of other admin users

singleuser:
defaultUrl: /desktop
nodeSelector:
hub.jupyter.org/node-purpose: user
initContainers:
- name: volume-mount-hack
image: busybox
command: ["sh", "-c", "id && chown 1000:1000 /home/jovyan && ls -lhd /home/jovyan"]
securityContext:
runAsUser: 0
volumeMounts:
- name: home
mountPath: /home/jovyan
subPath: "{username}"
storage:
type: static
static:
pvcName: home-nfs
subPath: "{username}"
memory:
guarantee: 512M
limit: 1G
image:
name: gcr.io/ucb-datahub-2018/desktop-test-user-image

20 changes: 20 additions & 0 deletions deployments/desktop-test/config/prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
nfsMounter:
mounts:
# FIXME: You need to create this manually on the NFS server
- nfsserver1:/export/pool0/homes/_desktop-test=/data/homes/desktop-test-prod

jupyterhub:
proxy:
# service:
# FIXME: make the IP static in google cloud console so we won't lose it
# then specify it here so if we redeploy we get the same stuff
# loadBalancerIP: <IP of desktop-test.datahub.berkeley.edu
# https:
# hosts:
# FIXME: Make a DNS entry for the service IP first before uncommenting it
# - desktop-test.datahub.berkeley.edu
hub:
db:
pvc:
# This also holds logs
storage: 4Gi
17 changes: 17 additions & 0 deletions deployments/desktop-test/config/staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
nfsMounter:
mounts:
- nfsserver1:/export/pool0/homes/_desktop-test=/data/homes/desktop-test-staging

jupyterhub:
prePuller:
continuous:
enabled: false
proxy:
# service:
# make the IP static in google cloud console so we won't lose it
# then specify it here so if we redeploy we get the same stuff
# loadBalancerIP: <IP of desktop-test.datahub.berkeley.edu
# uncomment once DNS entry has been made
# https:
# hosts:
# - desktop-test-staging.datahub.berkeley.edu
15 changes: 15 additions & 0 deletions deployments/desktop-test/hubploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
images:
image_name: gcr.io/ucb-datahub-2018/desktop-test-user-image
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: fall-2019
zone: us-central1
15 changes: 15 additions & 0 deletions deployments/desktop-test/image/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dbus-x11
xfce4
xfce4-panel
xfce4-session
xfce4-settings
xorg
xubuntu-icon-theme

# install some apps
octave
libreoffice-calc
firefox
gedit
vim-gtk3
emacs
7 changes: 7 additions & 0 deletions deployments/desktop-test/image/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
channels:
- manics
dependencies:
- websockify
- pip:
- https://github.com/jupyterhub/jupyter-server-proxy/archive/0e67e1afd0bab1342443f13bd147a2f8c682e9e0.zip
- jupyter-desktop-server==0.1
3 changes: 3 additions & 0 deletions deployments/desktop-test/image/ipython_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Disable history manager, we don't really use it
# and by default it puts an sqlite file on NFS, which is not something we wanna do
c.Historymanager.enabled = False
6 changes: 6 additions & 0 deletions deployments/desktop-test/image/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -euo pipefail

# Create ipython config directory if it doesn't exist
mkdir -p ${CONDA_DIR}/etc/ipython
cp ipython_config.py ${CONDA_DIR}/etc/ipython/ipython_config.py
Binary file added deployments/desktop-test/secrets/gcr-key.json
Binary file not shown.
Binary file added deployments/desktop-test/secrets/gke-key.json
Binary file not shown.
Binary file added deployments/desktop-test/secrets/prod.yaml
Binary file not shown.
Binary file added deployments/desktop-test/secrets/staging.yaml
Binary file not shown.

0 comments on commit 424cf11

Please sign in to comment.