Skip to content

Commit

Permalink
Working version of the production demo server (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Jusong Yu <[email protected]>
  • Loading branch information
yakutovicha and unkcpz authored Oct 22, 2024
1 parent c69f901 commit 2b83bb7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-to-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy to AKS
on:
push:
branches:
- main
- production
- staging
workflow_dispatch:

Expand All @@ -17,7 +17,7 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
# production if is main branch, staging if it is staging branch
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
environment: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
K8S_NAMESPACE: ${{ vars.K8S_NAMESPACE }}

- name: Connect to AKS
run: az aks get-credentials --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} --name ${{ secrets.AZURE_KUBERNETES_CLUSTER }}
run: az aks get-credentials --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_KUBERNETES_CLUSTER }}

- name: Deploy to AKS
run: |
Expand Down
2 changes: 1 addition & 1 deletion basehub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ name: basehub
version: 0.1.0
dependencies:
- name: jupyterhub
version: 3.1.0
version: 3.3.8
repository: https://jupyterhub.github.io/helm-chart/
15 changes: 6 additions & 9 deletions basehub/files/etc/jupyterhub/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<a class="logo" href="https://aiidalab.net" target="_blank">
<img src="/hub/static/external/aiidalab-wide-logo.png" alt="AiiDAlab" style="max-height:80px;max-width:100%;">
</a>
<a class="logo" href="https://psi.ch" target="_blank" style="padding:20px;">
<img src="/hub/static/external/psi-old-logo.svg" alt="PSI" style="max-height:100px;max-width:100%;">
</a>
<a class="logo" href="https://www.psi.ch/en/lms" target="_blank">
Laboratory for Materials Simulations (LMS)
</a>
<a class="logo" href="http://nccr-marvel.ch/" target="_blank">
<img class="sponsor" src="/hub/static/external/marvel-cropped-logo.png" alt="NCCR MARVEL" style="max-height:100px;max-width:100%">
</a>
Expand Down Expand Up @@ -54,12 +48,15 @@ <h3 align="center">Login to AiiDAlab</h3>
{% endblock login %}

<div class="container col-sm-7">
<h1>Welcome to the AiiDAlab deployment for PSI staff!</h1>
<p>This AiiDAlab server is deployed and maintained by the <a href="https://www.psi.ch/en/lms/msd-group" target="_blank">Materials Software and Data Group (MSD)</a> and its aim is to serve PSI staff in facilitating the execution and analysis of DFT simulations.</p>
<h1>Welcome to the AiiDAlab demo server!</h1>
<p> This AiiDAlab server is deployed and maintained by the <a href="https://www.aiidalab.net/about/" target="_blank">AiiDAlab team</a>.</p>
<p> The goal of the server is to provide a platform for users to try out AiiDAlab without the need to install it locally.</p>
<p> The server is not intended for production use, and the data on the server may be deleted at any time without notice. </p>

<h2>Login to AiiDAlab</h2>
<p>
The service is available to all PSI staff. Please login with your PSI account.
The service is available to anyone with GitHub credentials.
Click the "Sign in with GitHub" button to login.
</p>

<h2 id="gettingstartedwithaiidalab">Getting started with AiiDAlab</h2>
Expand Down
34 changes: 11 additions & 23 deletions basehub/values.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
jupyterhub:
proxy:
service:
loadBalancerIP: 20.250.195.79
https:
enabled: true
hosts:
Expand All @@ -12,20 +10,23 @@ jupyterhub:
singleuser:
image:
name: ghcr.io/aiidalab/qe
tag: pr-781
tag: v24.10.0a2
pullPolicy: Always
cmd:
- start-singleuser.sh
extraEnv:
JUPYTERHUB_SINGLEUSER_APP: notebook.notebookapp.NotebookApp
cpu:
guarantee: 1
limit: 2
guarantee: 1.5
limit: 1.5
memory:
guarantee: 4G
limit: 8G
guarantee: 5G
limit: 5G
storage:
type: none # user don't have persistent storage, the data will be lost after the pod is deleted
homeMountPath: /home/jovyan
dynamic:
storageClass: default
capacity: 50Gi
extraVolumes:
- name: hub-templates
configMap:
Expand All @@ -43,20 +44,6 @@ jupyterhub:
name: hub-external
- mountPath: /etc/jupyter
name: etc-jupyter
profileList:
# A potential issue that profiles share the same PVC
# using multiple storageClass can solve this issue, but we do not
# need to do this for now.
- display_name: Quantum ESPRESSO App image
description: Ready to run Quantum ESPRESSO app.
default: true
- display_name: AiiDA in JupyterLab
description: AiiDA in JupyterHub for tutorials.
kubespawner_override:
image: ghcr.io/aiidalab/base-with-services:2024.1020
default_url: /lab
environment:
JUPYTERHUB_SINGLEUSER_APP: jupyter_server.serverapp.ServerApp
hub:
db:
pvc:
Expand Down Expand Up @@ -108,7 +95,8 @@ jupyterhub:
client_id: {{ environ('OAUTH_CLIENT_ID') }}
client_secret: {{ environ('OAUTH_CLIENT_SECRET') }}
oauth_callback_url: {{ environ('OAUTH_CALLBACK_URL') }}
allowed_organizations: ['aiidalab']
allow_all: true
#allowed_organizations: ['aiidalab']
admin_users:
- unkcpz
- yakutovicha

0 comments on commit 2b83bb7

Please sign in to comment.