Skip to content
Snippets Groups Projects
Commit 11133535 authored by youngsuKim-CSUSB's avatar youngsuKim-CSUSB
Browse files

Update myspawner, profile list for customization

parent b74b00c1
No related branches found
No related tags found
2 merge requests!11Draft: Merge,!10Update HTML, add customizable spawner page
Pipeline #24529 failed
......@@ -8,6 +8,16 @@ deploy-helm:
- envsubst < values.template.yaml > values.yaml
- helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
- helm repo update
- helm upgrade --cleanup-on-fail --install hpchub jupyterhub/jupyterhub -n csusb-hpc --version=1.2.0 --values values.yaml
# - helm upgrade --cleanup-on-fail --install hpchub jupyterhub/jupyterhub -n csusb-hpc --version=1.2.0 --values values.yaml
- helm upgrade --cleanup-on-fail
--install hpchub jupyterhub/jupyterhub
--namespace csusb-hpc --version=1.2
--values values.yaml
--set-file hub.extraFiles.image_select_idp.binaryData=./select_idp_cilogon.png.b64
--set-file hub.extraFiles.custom_spawner.stringData=./my_spawner.py
--set-file hub.extraFiles.custom_spawner_profile.stringData=./my_spawner.html
environment:
#Check the namespace
name: csusb-hpc
# csusb-hpc
# csusb-hub-project
Dedicated jupyter hub for CSUSB faculty research
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.nrp-nautilus.io/vutiendung/csusb-hpc.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.nrp-nautilus.io/vutiendung/csusb-hpc/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
Testing JupyterHub for Cal State San Bernardino
\ No newline at end of file
# This file can update the JupyterHub Helm chart's default configuration values.
#
# For reference see the configuration reference and default values, but make
# sure to refer to the Helm chart version of interest to you!
#
# Introduction to YAML: https://www.youtube.com/watch?v=cdLNKUoMc6c
# Chart config reference: https://zero-to-jupyterhub.readthedocs.io/en/stable/resources/reference.html
# Chart default values: https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/HEAD/jupyterhub/values.yaml
# Available chart versions: https://jupyterhub.github.io/helm-chart/
#
# https://ucsd-prp.gitlab.io/userdocs/development/jupyterhub/
hub:
config:
CILogonOAuthenticator:
client_id: $CILOGON_ID
client_secret: $CILOGON_SECRET
oauth_callback_url: https://csusb-hpc.nrp-nautilus.io/hub/oauth_callback
client_id: cilogon:/client_id/76c3f7eb194ad6ef6c22a92ce1b54d89
client_secret: t_zrDuJRlJX4LZhUCrk3iPMwG9MKKuveHZMzqINyET3RfidDEvAnkNRHhYC1NiRtShsThwF0cy4vzLNorNw4-Q
oauth_callback_url: https://csusb-hub-project.nrp-nautilus.io/hub/oauth_callback
username_claim: "email"
allowed_idps: ["csusb.edu"]
JupyterHub:
admin_access: true
authenticator_class: cilogon
admin_users: ["dvu@csusb.edu", "000065181@csusb.edu", "youngsu.kim@csusb.edu", "006501270@csusb.edu"]
allowed_users:
- 000065181@csusb.edu
- 004793408@csusb.edu
- 006501322@csusb.edu
- 003574622@csusb.edu
- 005795019@csusb.edu
- 005061741@csusb.edu
- 003087200@csusb.edu
- 000030081@csusb.edu
- dmishin@ucsd.edu
authenticator_class: cilogon
#Restricts access to csusb domains
#allowed_idps command may change its funtionality after update
#https://github.com/jupyterhub/oauthenticator/issues/494
allowed_idps: ["csusb.edu"]
# initContainers for custom htmls
initContainers:
- name: git-clone-templates
image: alpine/git
......@@ -39,7 +26,7 @@ hub:
- --branch=main
- --depth=1
- --
- https://gitlab.nrp-nautilus.io/youngsu_kim/csusb-jupyterhub-custom-templates.git
- https://gitlab.nrp-nautilus.io/csusb-prp/csusb-jupyterhub-templates.git
- /etc/jupyterhub/custom
securityContext:
runAsUser: 0
......@@ -55,11 +42,28 @@ hub:
extraConfig:
templates: |
c.JupyterHub.template_paths = ['/etc/jupyterhub/custom']
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1990
extraFiles:
image_select_idp:
mountPath: /usr/local/share/jupyterhub/static/select_idp_cilogon.png
# Files in /usr/local/etc/jupyterhub/jupyterhub_config.d are
# automatically loaded in alphabetical order of the final file
# name when JupyterHub starts.
# for dynamic resource allocation
custom_spawner:
mountPath: /usr/local/etc/jupyterhub/jupyterhub_config.d/my_spawner.py
# Custom profiles list for the spawner above
custom_spawner_profile:
mountPath: /etc/jupyterhub/custom/my_spawner.html
service:
type: ClusterIP
annotations: {}
ports:
nodePort:
nodePort:
loadBalancerIP:
deploymentStrategy:
type: Recreate
......@@ -68,29 +72,29 @@ hub:
pvc:
accessModes:
- ReadWriteOnce
storage: 5Gi
storage: 2Gi
storageClassName: rook-ceph-block
resources:
limits:
cpu: "2"
memory: 4Gi
memory: 1Gi
requests:
cpu: "2"
memory: 4Gi
cpu: 100m
memory: 512Mi
networkPolicy:
enabled: false
proxy:
secretToken: '$SECRET_TOKEN'
secretToken: "795cb91892686a06560e9532d2b073b4cdbe102e92ea2b25496e3ae76f240c09"
service:
type: ClusterIP
chp:
resources:
limits:
cpu: "2"
memory: 4Gi
memory: 1Gi
requests:
cpu: "2"
memory: 4Gi
cpu: 200m
memory: 512Mi
singleuser:
extraNodeAffinity:
required:
......@@ -98,6 +102,15 @@ singleuser:
- 'key': 'topology.kubernetes.io/region'
'operator': 'In'
'values': ["us-west"]
# - 'key': 'nvidia.com/cuda.runtime.major'
# 'operator': 'In'
# 'values': ["11"]
# - 'key': 'nvidia.com/cuda.runtime.minor'
# 'operator': 'In'
# 'values': ["4"]
# - 'key': 'kubernetes.io/hostname'
# 'operator': 'In'
# 'values': ['fiona8-0.calit2.uci.edu','fiona8-1.calit2.uci.edu','fiona8-2.calit2.uci.edu','fiona8-3.calit2.uci.edu']
cloudMetadata:
blockWithIptables: false
networkPolicy:
......@@ -105,94 +118,53 @@ singleuser:
storage:
type: dynamic
extraLabels: {}
extraVolumes: []
extraVolumeMounts: []
capacity: 100Gi
# extraVolumes: []
# extraVolumeMounts: []
capacity: 5Gi
homeMountPath: /home/jovyan
dynamic:
storageClass: rook-ceph-block
pvcNameTemplate: claim-{username}{servername}
volumeNameTemplate: volume-{username}{servername}
storageAccessModes: [ReadWriteOnce]
extraVolumes:
- name: csusb-hpc-share
persistentVolumeClaim:
claimName: csusb-hpc-share
- name: mkshare-script
configMap:
name: mkshare-script
defaultMode: 0777
extraVolumeMounts:
- name: csusb-hpc-share
mountPath: /home/shared
- name: mkshare-script
mountPath: /usr/local/bin/before-notebook.d/mkshare.sh
subPath: mkshare.sh
# extraVolumes:
# - name: csusb-hub-project-share
# persistentVolumeClaim:
# claimName: csusb-hub-project-share
# extraVolumeMounts:
# - name: csusb-hub-project-share
# mountPath: /home/jovyan/shared
image:
name: localhost:30081/prp/jupyter-stack/prp
tag: latest
startTimeout: 600
cpu:
limit: 16
guarantee: 16
limit: 1
guarantee: 1
memory:
limit: 128G
guarantee: 128G
limit: 2G
guarantee: 2G
extraResource:
limits: {}
guarantees: {}
cmd: start-notebook.sh
# cmd: jupyterhub-singleuser
cmd: jupyterhub-singleuser
defaultUrl: "/lab"
# This list is overriden by extraFile
profileList:
- display_name: Stack Minimal
default: true
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/minimal
- display_name: Stack Minimal + Desktop GUI + Relion
# extra_resource_limits:
# nvidia.com/gpu: {}
# default: True
- display_name: Stack Minimal no GPU
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/relion-desktop
- display_name: Stack All Spark
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/all-spark
extra_resource_limits:
nvidia.com/gpu: "2"
- display_name: Stack Datascience
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/datascience
extra_resource_limits:
nvidia.com/gpu: "2"
- display_name: Stack Tensorflow [2GPUs]
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/prp
extra_resource_limits:
nvidia.com/gpu: "2"
- display_name: Stack Tensorflow [4GPUs]
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/prp
extra_resource_limits:
nvidia.com/gpu: "4"
- display_name: Stack R-Studio [4.1.2]
kubespawner_override:
image_spec: gitlab-registry.nrp-nautilus.io/youngsu_kim/csusb-jupyter-stack/stack-rstudio:sr-r1
- display_name: Stack R-Studio
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/r-studio
# extra_resource_limits:
# nvidia.com/gpu: "1"
- display_name: Stack Pyspark [2GPUs]
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/pyspark
extra_resource_limits:
nvidia.com/gpu: "2"
- display_name: Stack Pyspark [4GPUs]
kubespawner_override:
image_spec: localhost:30081/prp/jupyter-stack/pyspark
extra_resource_limits:
nvidia.com/gpu: "4"
- display_name: Stack SageMath
kubespawner_override:
image_spec: gitlab-registry.nrp-nautilus.io/youngsu_kim/csusb-jupyter-stack/stack-sagemath:b353d66b
image_spec: localhost:30081/prp/jupyter-stack/minimal
# extra_resource_limits:
# nvidia.com/gpu: "1"
# default: True
scheduling:
userScheduler:
enabled: false
......@@ -207,17 +179,17 @@ ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: haproxy
hosts: ["csusb-hpc.nrp-nautilus.io"]
hosts: ["csusb-hub-project.nrp-nautilus.io"]
pathSuffix: ''
tls:
- hosts:
- csusb-hpc.nrp-nautilus.io
- csusb-hub-project.nrp-nautilus.io
cull:
enabled: false
enabled: true
users: false
removeNamedServers: false
timeout: 3600
every: 600
concurrency: 10
maxAge: 0
maxAge: 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment