Skip to content

First version of VRE integrated chart#2

Merged
volodymyrss merged 1 commit into
mainfrom
first-version-vre-chart
Feb 23, 2026
Merged

First version of VRE integrated chart#2
volodymyrss merged 1 commit into
mainfrom
first-version-vre-chart

Conversation

@volodymyrss

@volodymyrss volodymyrss commented Apr 8, 2025

Copy link
Copy Markdown
Collaborator
  • REANA
    • NFS provisioner
    • added bootstrap for admin user
    • used 0.95.0 alpha2, else db is reana:reana unless debug - workaround?
  • jupyterhub with configuration for rucio access
  • optional prometheus
  • optional grafana
  • add basic helm/k8s linting
  • squash

Further features will be added following #3

@volodymyrss volodymyrss self-assigned this Apr 8, 2025
Comment thread vre/templates/reana-ingress.yaml Outdated
Comment thread vre/templates/reana-ingress.yaml Outdated
Comment thread vre/values-custom.yaml Outdated
Comment thread vre/Chart.yaml Outdated
Comment thread skaffold.yaml Outdated
Comment thread vre/values.yaml
Comment thread vre/values.yaml Outdated
Comment thread vre/values.yaml Outdated
Comment thread vre/values.yaml
# JUPYTERHUB_SINGLEUSER_APP: "notebook.notebookapp.NotebookApp"
RUCIO_MODE: "replica"
RUCIO_WILDCARD_ENABLED: "1"
RUCIO_BASE_URL: "https://vre-rucio.cern.ch"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define rucio host once

Comment thread vre/values.yaml

ingress:
enabled: true
ingressClassName: null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is at least confusing to me, the annotations below assume traefik

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a traefik built in reana

Comment thread vre/values.yaml Outdated
reana:
enabled: true

postgres:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a top-level config, not within reana scope, and set DB connection info appropriately

Comment thread vre/values.yaml
consumer_secret: "testsecret"

database:
user:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postgresql.user and password?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to be set from secret in flux, or locally as needed. By default I'd put nothing. Maybe it can be generated like postgres chart does.

Comment thread vre/values.yaml Outdated
Comment thread vre/values.yaml

ingress_override: true

reana_hostname: "reana-vre.obsuks4.unige.ch"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template it so that there's a hostbase path or pick a name, and jhub and reana hostnames are derived from that?

Comment thread vre/values.yaml Outdated
Comment thread vre/values.yaml Outdated
size: 100M
storageClass:

name: cern-vre-shared-volume-storage-class

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on the release name which is really bad, maybe there at least needs to be a templates/storage.yaml

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required by reana, we can not change it here in integrated chart. I will check if there is an nfs provisioner where name can be templated.

@volodymyrss

volodymyrss commented Jul 14, 2025

Copy link
Copy Markdown
Collaborator Author

I added a job which will run bootstrap commands, so it should install without manual interventions. I did not test much yet, but please do give it a try, @paullaycock .

Comment thread skaffold.yaml Outdated
chartPath: vre
valuesFiles:
- vre/values.yaml
# copy vre/values-custom-copy.yaml to vre/values-custom.yaml, set the necessary values, and uncomment this line

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# copy vre/values-custom-copy.yaml to vre/values-custom.yaml, set the necessary values, and uncomment this line
# copy vre/values-custom-example.yaml to vre/values-custom.yaml, set the necessary values, and uncomment this line

Comment thread vre/templates/reana-ingress.yaml Outdated
Comment thread skaffold.yaml Outdated
deploy:
helm:
releases:
- name: cern-vre

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: cern-vre
- name: cern-vre # DO NOT CHANGE!

Comment thread vre/values.yaml
echo "[client]" >> /opt/rucio/etc/rucio.cfg;
echo "rucio_host = $RUCIO_BASE_URL" >> /opt/rucio/etc/rucio.cfg;
echo "auth_host = $RUCIO_AUTH_URL" >> /opt/rucio/etc/rucio.cfg;
echo "account = $JUPYTERHUB_USER" >> /opt/rucio/etc/rucio.cfg;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add
echo "ca_cert = /certs/rucio_ca.pem" >> /opt/rucio/etc/rucio.cfg;

rucio whoami then works

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least when using the ESCAPE IAM + Rucio instance

Comment thread vre/values-custom-example.yaml Outdated
@volodymyrss volodymyrss force-pushed the first-version-vre-chart branch from ac4f363 to 5c08af4 Compare July 21, 2025 13:43

@garciagenrique garciagenrique left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @volodymyrss @paullaycock

Thanks for opening this PR. Let me add some general comments here.

I see that there are a lot of annotations that are cern-vre specific - which in the end are cern infrastructure specific. For example, the names of the volume and storage class naming, as well as the rucio env vars (among others).

Let me share here my (biased) vision of how I envision this repo (which doesn't need to be like this of course).

What would you think of creating an agnostic "base helm layer" (let's call it vre) which only deploys the "main services" - JupyterHub, Rucio and Reana? Then each vre flavor, that ideally inherits from the base layer, would add their own or specific services (nfs, grafana, EOS, CERN MONIT, etc.), change the chart values to point to their specific services (storage, network, db, idp, rucio and REANA server, etc), and name the charts as desired (cern-vre, etap, etc).

Comment thread skaffold.yaml Outdated
Comment thread skaffold.yaml Outdated
Comment thread vre/README.md
Comment thread vre/values.yaml
@volodymyrss

Copy link
Copy Markdown
Collaborator Author

There is a question right now if it makes sense to use try using new pre-release reana 0.95.0, or port the CRM changes back onto 0.9.4.

@garciagenrique

Copy link
Copy Markdown
Member

There is a question right now if it makes sense to use try using new pre-release reana 0.95.0, or port the CRM changes back onto 0.9.4.

I think it is always a good idea to try the latest version @volodymyrss. Any reason to use 0.9.4 ?

@volodymyrss

volodymyrss commented Sep 8, 2025

Copy link
Copy Markdown
Collaborator Author

There is a question right now if it makes sense to use try using new pre-release reana 0.95.0, or port the CRM changes back onto 0.9.4.

I think it is always a good idea to try the latest version @volodymyrss. Any reason to use 0.9.4 ?

The latest version is not released, it's in alpha.

Right now I am having an issue with it, related to parsing user token info from IAM . I think it was working before though, so it's strange the issue appeared both in dev and staging setup. Maybe IAM changed.

Anyway, alpha is not stable and will require continuous updates to our development.

When we last talked with @tiborsimko I think it was said it's too early to try 0.95.0, but I also did not see a huge number of changes in reana github org since, and the latest release is 0.95.0-alpha.2 is in Feb.
Do you know @tiborsimko what is the plan for 0.95.0, should we try to contribute our monitoring changes to it?

Or @garciagenrique you probably know of what is the plan for REANA version adoption in the VRE?

@volodymyrss

volodymyrss commented Sep 15, 2025

Copy link
Copy Markdown
Collaborator Author

I remembered why we moved to alpha version of REANA.

It's partly because we wanted to use included DB, but I saw this https://github.com/reanahub/reana/blob/0.9.4/helm/reana/templates/reana-db.yaml#L45 which seems to set debug values only in non-debug environment - so there seems to be maybe a bug? Of course we could use external db but it seems strange.

Second reason is that we are actually developing reana chart, so it's weird to start from old version.

But then, current alpha version stopped working, so this needs some investigation.

edit:

I think alpha version is not compatible with Indigo IAM, because recent versions of invenio_oauthclient seem to assume fetching userinfo both from endpoint and from token, specifically in the way keycloack does it. IAM fails with token userinfo decoding because it can not get the token signature right.

I am sure it is possible to adjust invenio_oauthclient and reana_server (which needs some extra configuration in this case).

In principle until 0.95.0 is stable, we could use 0.9.4 with a patch for the DB credentials in debug mode.
But 0.9.4 uses python3.8 which is already EoL.

Overall, it seems that to finish our project, we need a bit deeper changes to involvement reana and invenio_oauthclient, and count on new reana to be released.

An advice from @tiborsimko would be welcome, but I can also look myself deeper and propose further reana PRs.

@volodymyrss volodymyrss force-pushed the first-version-vre-chart branch from b6e35a9 to 32decf0 Compare September 15, 2025 11:54
@volodymyrss

Copy link
Copy Markdown
Collaborator Author

We discussed we need to talk about storage usage. To avoid duplication of data.

We are also thinking about using RSE per VRE instance.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the first integrated version of the VRE (Virtual Research Environment) Helm chart, consolidating JupyterHub, REANA, and observability components into a unified deployment solution.

Key changes include:

  • Complete VRE Helm chart with JupyterHub, REANA, NFS provisioner, and optional monitoring stack (Grafana, Prometheus, Loki)
  • Bootstrap job for automated REANA admin user creation and database initialization
  • Development tooling including justfile, Skaffold configuration, and pre-commit hooks with Helm linting
  • CI/CD workflows for automated chart releases to GitHub Pages

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
vre/values.yaml Main configuration file defining all chart values for JupyterHub, REANA, NFS provisioner, and observability tools
vre/values.schema.json JSON schema for validating chart values
vre/values-custom-example.yaml Example configuration template for customizing deployment-specific settings
vre/templates/bootstrap.yaml Kubernetes Job template for bootstrapping REANA with admin user and database setup
vre/templates/roles.yaml RBAC resources (ServiceAccount, Role, RoleBinding) for bootstrap job permissions
vre/templates/reana-ingress.yaml Custom ingress configuration for REANA service routing
vre/templates/_helpers.tpl Helm template helper functions for generating resource names
vre/Chart.yaml Chart metadata and dependency declarations for sub-charts
vre/README.md Auto-generated chart documentation with values table
README.md Repository documentation with installation, development, and troubleshooting guides
skaffold.yaml Skaffold configuration for local development and deployment
justfile Task automation recipes for version management, deployment, and linting
Makefile Alternative make-based task definitions for cluster setup
dev/kind-config.yaml Kind cluster configuration for local testing
.pre-commit-config.yaml Pre-commit hooks for codespell, helm-docs, helmlint, and kubeconform validation
.github/workflows/release.yaml GitHub Actions workflow for releasing charts to GitHub Pages
.github/workflows/pre-commit.yaml GitHub Actions workflow for running pre-commit checks on PRs
.github/cr.yaml Configuration for chart-releaser tool
.gitignore Git ignore patterns for chart locks and custom values
vre/.gitignore VRE-specific ignore patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vre/values.yaml Outdated
Comment on lines +341 to +343
reana_workflow_controller:
imagePullPolicy: IfNotPresent
image: docker.io/volodymyrsavchenko/reana-workflow-controller:latest

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reana_workflow_controller configuration is duplicated in this file. It appears on lines 282-287 and again on lines 341-343 with different image specifications. This duplication could lead to confusion about which configuration will be applied.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread vre/templates/roles.yaml Outdated
Comment thread vre/values.yaml
Comment on lines +266 to +267
user:
password:

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Empty values for required database credentials. While these may be intended to be set via secrets, consider adding placeholder comments like # set through secret for clarity, similar to the pattern used for JupyterHub OAuth credentials (lines 37-38).

Suggested change
user:
password:
user: # set through secret
password: # set through secret

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Comment thread vre/values.schema.json
Comment thread vre/values.yaml Outdated
Comment thread vre/values.yaml
# - name: cvmfs-vre
# persistentVolumeClaim:
# claimName: cvmfs-vre-pvc
# - name: eospilot-eulake # mounts the EOS RSE needed for the Rucio JupiterLab extension

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "JupiterLab" should be "JupyterLab".

Suggested change
# - name: eospilot-eulake # mounts the EOS RSE needed for the Rucio JupiterLab extension
# - name: eospilot-eulake # mounts the EOS RSE needed for the Rucio JupyterLab extension

Copilot uses AI. Check for mistakes.
Comment thread vre/values.yaml
# mountPath: /cvmfs
# # CVMFS automount volumes must be mounted with HostToContainer mount propagation.
# mountPropagation: HostToContainer
# - name: eospilot-eulake # mounts the EOS RSE needed for the Rucio JupiterLab extension

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "JupiterLab" should be "JupyterLab".

Copilot uses AI. Check for mistakes.
Comment thread vre/templates/bootstrap.yaml
Comment thread vre/templates/bootstrap.yaml
Comment thread README.md Outdated
@degauden

degauden commented Dec 8, 2025

Copy link
Copy Markdown

Some remarks about the test deployment that I have done on https://reana-vre.obsuks5.unige.ch:

  • I did the deployment in the test namespace
    $ helm install my-vre vre/escape-vre -n test --create-namespace --devel
    the --devel option is needed since there is no production chart yet.
  • The REANA_ACCESS_TOKEN is in the log of the install. But it can be retrieved afterwards with
    $ export REANA_ACCESS_TOKEN=$(kubectl get secret escape-vre-admin-access-token -o json | jq -r '.data | map_values(@base64d) | .ADMIN_ACCESS_TOKEN')
  • Some extra arguments are needed
    • --set nfs-server-provisioner.persistence.storageClass=vspherecsi-resize --set nfs-server-provisioner.persistence.size=20Gi : for the NFS provisioning
    • --set reana.reana_hostname=reana-vre.obsuks5.unige.ch for the hostname
    • --set jupyterhub.hub.config.RucioAuthenticator.oauth_callback_url=https://jhub-vre.obsuks5.unige.ch/hub/oauth_callback for the Rucio callback url
    • the name of the release cannot by a custom my-vre, but has to be escape-vre
    • the scerets from INDIGO IAM have to be passed with --set reana.secrets.login.iam.consumer_key=XXXXXXXXXXXXXX --set reana.secrets.login.iam.consumer_secret=YYYYYYYYYYYYYYYY

@degauden

degauden commented Dec 8, 2025

Copy link
Copy Markdown

Finally the install command looks like:

$ helm upgrade --install escape-vre vre/escape-vre -n test --create-namespace --devel \
 --set nfs-server-provisioner.persistence.storageClass=vspherecsi-resize \
 --set nfs-server-provisioner.persistence.size=20Gi --set reana.reana_hostname=reana-vre.obsuks5.unige.ch \
 --set jupyterhub.hub.config.RucioAuthenticator.oauth_callback_url=https://jhub-vre.obsuks5.unige.ch/hub/oauth_callback\
 --set reana.secrets.login.iam.consumer_key=XXXXX --set reana.secrets.login.iam.consumer_secret=YYYYYYYYYYYYYY

Remarks:

  • The user has to be authorized manually. Moreover, the email notification to the admin is not working, and thus some communication needs to be done between the user and the admin.
  • To list the users:
    $ kubectl exec -i -t deployment/escape-vre-server -- flask reana-admin\
     user-list --admin-access-token $REANA_ACCESS_TOKEN
    (please mind the escape-vre- prefix
  • To authorize (the user had to try to connect beforehand):
$ kubectl exec -i -t deployment/escape-vre-server -- flask reana-admin token-grant \
--email user@example.com --admin-access-token $REANA_ACCESS_TOKEN

One last thing: the redirect URIs to be used in INDIGO IAM have to be:
https://jhub-vre.obsuks5.unige.ch/hub/oauth_callback
https://reana-vre.obsuks5.unige.ch/api/oauth/authorized/keycloak/ (please mind the trailing "/")
https://reana-vre.obsuks5.unige.ch/hub/oauth_callback

Copilot AI commented Jan 5, 2026

Copy link
Copy Markdown

@volodymyrss I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you.

@volodymyrss

Copy link
Copy Markdown
Collaborator Author

Finally the install command looks like:

$ helm upgrade --install escape-vre vre/escape-vre -n test --create-namespace --devel \
 --set nfs-server-provisioner.persistence.storageClass=vspherecsi-resize \
 --set nfs-server-provisioner.persistence.size=20Gi --set reana.reana_hostname=reana-vre.obsuks5.unige.ch \
 --set jupyterhub.hub.config.RucioAuthenticator.oauth_callback_url=https://jhub-vre.obsuks5.unige.ch/hub/oauth_callback\
 --set reana.secrets.login.iam.consumer_key=XXXXX --set reana.secrets.login.iam.consumer_secret=YYYYYYYYYYYYYY

Remarks:

* The user has to be authorized manually. Moreover, the email notification to the admin is not working, and thus some communication needs to be done between the user and the admin.

* To list the users:
  ```shell
  $ kubectl exec -i -t deployment/escape-vre-server -- flask reana-admin\
   user-list --admin-access-token $REANA_ACCESS_TOKEN
  ```
  
  
      
        
      
  
        
      
  
      
    
  (please mind the `escape-vre-` prefix

* To authorize (the user had to try to connect  beforehand):
$ kubectl exec -i -t deployment/escape-vre-server -- flask reana-admin token-grant \
--email user@example.com --admin-access-token $REANA_ACCESS_TOKEN

One last thing: the redirect URIs to be used in INDIGO IAM have to be: https://jhub-vre.obsuks5.unige.ch/hub/oauth_callback https://reana-vre.obsuks5.unige.ch/api/oauth/authorized/keycloak/ (please mind the trailing "/") https://reana-vre.obsuks5.unige.ch/hub/oauth_callback

Thanks a lot @degauden , I add this to the readme as a case deployment, specializing generic instructions.

@Soap2G

Soap2G commented Feb 11, 2026

Copy link
Copy Markdown

Hi @volodymyrss , what's the status of this PR?
Do you have everything that you need in there (for now?
Would it be ready for a review?

@volodymyrss

Copy link
Copy Markdown
Collaborator Author

Hi @volodymyrss , what's the status of this PR? Do you have everything that you need in there (for now? Would it be ready for a review?

Since I removed draft status it has been!

@Soap2G Soap2G left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @volodymyrss!

These updates look great, thank you very much!
I think a rebase would help a lot, could we try to aggregate commits and also use the conventional commits layout?

On top of that I'm approving, I only have a few minor questions (the review has been long enough already):

  1. Default admin password is adminpassword - users MUST change this; also I saw test IAM credentials in values (testkey/testsecret). Is there a way to make them dummy without being hardcoded? I'm also fine in leaving them there for the moment, if it's too much work.
  2. blockWithIptables: false has a TODO: revert comment. Should we do that?
  3. I can see a dependency from volodymyrsavchenko/reana-workflow-controller; is there any update on an upstream version?

@volodymyrss

Copy link
Copy Markdown
Collaborator Author

Hi @volodymyrss!

These updates look great, thank you very much! I think a rebase would help a lot, could we try to aggregate commits and also use the conventional commits layout?

Ok, I will make couple of cosmetic changes and squash

On top of that I'm approving, I only have a few minor questions (the review has been long enough already):

1. Default admin password is `adminpassword` - users MUST change this; also I saw test IAM credentials in values (`testkey/testsecret`). Is there a way to make them dummy without being hardcoded? I'm also fine in leaving them there for the moment, if it's too much work.

There are different approaches to this, but ultimately dummy values have to come from somewhere, right? And in that way, they'd be hardcoded. They may be in values like now, or in the template default. I find it's move obvious when they are in values, so they are less likely to be forgotten.

Or I can make them empty, and make install fail with a clear message if they are not set. Perhaps this is best.

2. `blockWithIptables: false` has a `TODO: revert` comment. Should we do that?

3. I can see a dependency from `volodymyrsavchenko/reana-workflow-controller`; is there any update on an upstream version?

That was our experiments when we hoped to update reana with ETAP-specific changes. I will drop it.

@volodymyrss volodymyrss force-pushed the first-version-vre-chart branch from 167d601 to 05e56ca Compare February 23, 2026 15:03
@volodymyrss volodymyrss force-pushed the first-version-vre-chart branch from 05e56ca to b50f105 Compare February 23, 2026 15:16
@volodymyrss

Copy link
Copy Markdown
Collaborator Author
  • addressed TODOs
  • made default values for credentials empty, and added chart validation which crashes install with error if they are not set
  • squashed

@volodymyrss volodymyrss merged commit d2dc3fb into main Feb 23, 2026
3 checks passed
@volodymyrss

Copy link
Copy Markdown
Collaborator Author

Thanks all! That should do in the first approximation. It's also live in https://etap.obsuks7.unige.ch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants