Skip to content
Snippets Groups Projects
Commit 3287c0cb authored by Youngsu Kim's avatar Youngsu Kim
Browse files

Merge branch 'remove-init-container' into 'main'

Remove init container

See merge request csusb-hpc!13
parents f59e0e8c 9647f7ce
No related branches found
No related tags found
No related merge requests found
.DS_Store 0 → 100644
File added
values.template2.yaml values.template2.yaml
\ No newline at end of file .DS_Store
...@@ -13,10 +13,13 @@ deploy-helm: ...@@ -13,10 +13,13 @@ deploy-helm:
--install hpchub jupyterhub/jupyterhub --install hpchub jupyterhub/jupyterhub
--namespace csusb-hpc --version=1.2 --namespace csusb-hpc --version=1.2
--values values.yaml --values values.yaml
--set-file hub.extraFiles.image_select_idp.binaryData=./select_idp_cilogon.png.b64 --set-file hub.extraFiles.custom_spawner_profile.stringData=./extraFiles/my_spawner.html
--set-file hub.extraFiles.custom_spawner_profile.stringData=./my_spawner.html --set-file hub.extraFiles.custom_spawner.stringData=./extraFiles/my_spawner.py
--set-file hub.extraFiles.custom_spawner.stringData=./my_spawner.py --set-file hub.extraFiles.image_select_idp.binaryData=./extraFiles/select_idp_cilogon.png.b64
--set-file hub.extraFiles.custom_login_html.stringData=./extraFiles/login.html
--set-file hub.extraFiles.custom_page_html.stringData=./extraFiles/page.html
--set-file hub.extraFiles.custom_spawn_pending_html.stringData=./extraFiles/spawn_pending.html
environment: environment:
#Check the namespace #Check the namespace
name: csusb-hpc name: csusb-hpc
......
File added
File moved
{# https://github.com/jupyterhub/jupyterhub/issues/1385 #}
{# https://github.com/jupyterhub/jupyterhub/issues/1385#issuecomment-738447175 #}
{% extends "templates/login.html" %}
<!-- {% set announcement = 'We are testing customized style / The server works the same way as before' %} -->
{% set csusb_hub_title = 'Welcome to Cal State San Bernardino JupyterHub' %}
{% set csusb_cilogon = 'The login process (the orange button) uses CSUSB\'s DUO system' %}
{% block login %}
<div class="container text-center">
<h2>{{ csusb_hub_title }}</h2>
<h5>
<p>{{ csusb_cilogon | safe }}</p>
{# <p>Visit <a href="https://www.csusb.edu/high-performance-computing" target="_blank">CSUSB High Performance Computing Initiative</a> for more information about CSUSB HPCI
</p> #}
</h5>
</div>
<p> &nbsp </p>
<p> &nbsp </p>
<p> &nbsp </p>
{{ super() }}
<p> &nbsp </p>
<div id="login-cilogon-info" class="service-login">
<h5>
<p>Be sure to choose <ins>California State University San Bernardino</ins> on the next page instead of <del>ORCID</del>
</h5>
</div>
<div class="container text-center">
<details>
<summary>Click here for more details</summary>
<img id="idp_selector_info" style="width: 70%" src="{{ static_url("select_idp_cilogon.png") }}" alt="CILogon-CSUSB-Select">
</details>
</div>
{% endblock %}
{% block stylesheet %}
{{ super() }}
<style>
#login-main{
margin-top: 1%;
height: 100%;
}
#login-cilogon-info{
text-align: center;
display: table;
vertical-align: middle;
margin: 1% auto auto auto;
padding-left: 0%;
width: 380px;
}
#idp_selector_info {
max-width:100%;
height:auto;
max-height:100%;
}
p.extra-space {
line-height: 0.7;
}
</style>
{% endblock %}
\ No newline at end of file
<style> <style>
<!--
/* The profile description should not be bold, even though it is inside the <label> tag */
font-weight: normal;
}
-->
input[type="range"] { input[type="range"] {
display: inline; display: inline;
width: 40%; width: 40%;
......
...@@ -110,7 +110,7 @@ class MySpawner(KubeSpawner): ...@@ -110,7 +110,7 @@ class MySpawner(KubeSpawner):
{ {
'display_name': 'Stack SageMath', 'display_name': 'Stack SageMath',
'kubespawner_override': { 'kubespawner_override': {
'image_spec': 'gitlab-registry.nrp-nautilus.io/youngsu_kim/csusb-jupyter-stack/stack-sagemath:b353d66b', 'image_spec': 'gitlab-registry.nrp-nautilus.io/youngsu_kim/csusb-jupyter-stack/stack-sagemath',
} }
}, },
] ]
......
{% extends "templates/page.html" %}
<!-- {% set announcement = 'Please contact Youngsu Kim at youngsu.kim@csusb.edu for support' %} -->
{% block stylesheet %}
{{ super() }}
<style>
.footer-bottom {
position: auto;
bottom: 0px;
text-align: center;
width: 100%;
z-index: -1;
}
</style>
{% endblock %}
{% block footer %}
<p> &nbsp <br> &nbsp </p>
<p> &nbsp <br> &nbsp </p>
<div class="footer-bottom">
<hr style="width:35%; margin-bottom: 5px;">
<p style="font-size: 100%">This JupyterHub is provided by the <a href="https://www.csusb.edu/high-performance-computing" target="_blank">High Performance Computing Initiative </a> at <a href="https://www.csusb.edu/" target="_blank">California State Univeristy San Bernardino</a> and <a href="https://pacificresearchplatform.org/" target="_blank">Pacific Research Platform</a> <br>
If you obtain any results by utilizing our resources, please include <a href="https://www.csusb.edu/academic-technologies-innovation/xreal-lab-and-high-performance-computing/high-performance-computing#acknowledgement" target="_blank">acknowledgements of our service</a> in your work e.g., presentations or papers. <br>
It will help us maintain the funding for our resources.
</p></div>
{% endblock %}
\ No newline at end of file
File moved
{% extends "templates/spawn_pending.html" %}
{% block message %}
{# {{ super() }} #}
<p>Your server is starting up and it may take several minutes</p>
<p>Most issues are related to the server upgrade or temporary maintanance</p>
<p>If it does not start for an extended period of time, please contact the <a href="https://www.csusb.edu/high-performance-computing/#team" target="_blank"> CSUSB HPC team </a></p>
<p> &nbsp <br> &nbsp </p>
{% endblock %}
\ No newline at end of file
File moved
...@@ -30,33 +30,12 @@ hub: ...@@ -30,33 +30,12 @@ hub:
- 003087200@csusb.edu - 003087200@csusb.edu
- 000030081@csusb.edu - 000030081@csusb.edu
- dmishin@ucsd.edu - dmishin@ucsd.edu
initContainers:
- name: git-clone-templates
image: alpine/git
args:
- clone
- --single-branch
- --branch=main
- --depth=1
- --
- https://gitlab.nrp-nautilus.io/csusb-prp/csusb-jupyterhub-templates.git
- /etc/jupyterhub/custom
securityContext:
runAsUser: 0
volumeMounts:
- name: custom-templates
mountPath: /etc/jupyterhub/custom
extraVolumes:
- name: custom-templates
emptyDir: {}
extraVolumeMounts:
- name: custom-templates
mountPath: /etc/jupyterhub/custom
extraConfig: extraConfig:
templates: | templates: |
c.JupyterHub.template_paths = ['/etc/jupyterhub/custom'] c.JupyterHub.template_paths = ['/etc/jupyterhub/custom']
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1990 # https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1990
# To use these .gitlab-ci.yml needs to be updated accordingly
extraFiles: extraFiles:
image_select_idp: image_select_idp:
mountPath: /usr/local/share/jupyterhub/static/select_idp_cilogon.png mountPath: /usr/local/share/jupyterhub/static/select_idp_cilogon.png
...@@ -72,6 +51,47 @@ hub: ...@@ -72,6 +51,47 @@ hub:
custom_spawner_profile: custom_spawner_profile:
mountPath: /etc/jupyterhub/custom/my_spawner.html mountPath: /etc/jupyterhub/custom/my_spawner.html
# Additional custom html files
custom_login_html:
mountPath: /etc/jupyterhub/custom/login.html
custom_page_html:
mountPath: /etc/jupyterhub/custom/page.html
custom_spawn_pending_html:
mountPath: /etc/jupyterhub/custom/spawn_pending.html
nodeSelector:
topology.kubernetes.io/region: "us-west"
kubernetes.io/hostname: "perfsonar.csusb.edu"
# env: system
image:
name: jupyterhub/k8s-hub
tag: '1.2.0'
pullPolicy: ''
pullSecrets: []
livenessProbe:
# The livenessProbe's aim to give JupyterHub sufficient time to startup but
# be able to restart if it becomes unresponsive for ~5 min.
enabled: true
initialDelaySeconds: 300
periodSeconds: 10
failureThreshold: 30
timeoutSeconds: 3
readinessProbe:
# The readinessProbe's aim is to provide a successful startup indication,
# but following that never become unready before its livenessProbe fail and
# restarts it if needed. To become unready following startup serves no
# purpose as there are no other pod to fallback to in our non-HA deployment.
enabled: true
initialDelaySeconds: 0
periodSeconds: 2
failureThreshold: 1000
timeoutSeconds: 1
service: service:
type: ClusterIP type: ClusterIP
annotations: {} annotations: {}
...@@ -131,20 +151,21 @@ singleuser: ...@@ -131,20 +151,21 @@ singleuser:
pvcNameTemplate: claim-{username}{servername} pvcNameTemplate: claim-{username}{servername}
volumeNameTemplate: volume-{username}{servername} volumeNameTemplate: volume-{username}{servername}
storageAccessModes: [ReadWriteOnce] storageAccessModes: [ReadWriteOnce]
extraVolumes: # extraVolumes(Mounts) are overriden by the custom spawner -> extraFiles/my_spawner.py
- name: csusb-hpc-share # extraVolumes:
persistentVolumeClaim: # - name: csusb-hpc-share
claimName: csusb-hpc-share # persistentVolumeClaim:
- name: mkshare-script # claimName: csusb-hpc-share
configMap: # - name: mkshare-script
name: mkshare-script # configMap:
defaultMode: 0777 # name: mkshare-script
extraVolumeMounts: # defaultMode: 0777
- name: csusb-hpc-share # extraVolumeMounts:
mountPath: /home/shared # - name: csusb-hpc-share
- name: mkshare-script # mountPath: /home/shared
mountPath: /usr/local/bin/before-notebook.d/mkshare.sh # - name: mkshare-script
subPath: mkshare.sh # mountPath: /usr/local/bin/before-notebook.d/mkshare.sh
# subPath: mkshare.sh
image: image:
name: localhost:30081/prp/jupyter-stack/prp name: localhost:30081/prp/jupyter-stack/prp
tag: latest tag: latest
...@@ -166,50 +187,6 @@ singleuser: ...@@ -166,50 +187,6 @@ singleuser:
# default: true # default: true
# kubespawner_override: # kubespawner_override:
# image_spec: localhost:30081/prp/jupyter-stack/minimal # image_spec: localhost:30081/prp/jupyter-stack/minimal
# - display_name: Stack Minimal + Desktop GUI + Relion
# 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
scheduling: scheduling:
userScheduler: userScheduler:
enabled: false enabled: false
......
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