Skip to main content

Setting up Rucio on Kubernetes

Helm charts

Helm charts help you define, install, and upgrade Kubernetes applications. In this repository, you can find Helm charts for the major different components of Rucio.

Tutorial

A tutorial for using Rucio with Kubernetes can be found here

Example of Kubernetes deployment

KM3NeT runs Rucio on Kubernetes via flux. The configuration deployed on their Rucio server can be found here. The documentation of how this (specific) instance can be set up can be found in the docs

Bootstrapping the database

By default, no database is initialized when a new Rucio installation is set up. An init container can be used to bootstrap the database on a Kubernetes cluster:

  1. Create a init-pod.yaml file as in the snippet below, replacing the <PASSWORD> with the secret needed to connect to the database:
apiVersion: v1
kind: Pod
metadata:
name: init
labels:
app: rucio
spec:
restartPolicy: Never
containers:
- name: init
image: rucio/rucio-init:latest
imagePullPolicy: Always
env:
- name: RUCIO_CFG_DATABASE_DEFAULT
value: postgresql://rucio:<PASSWORD>@postgres-postgresql/rucio
- name: RUCIO_CFG_DATABASE_SCHEMA
value: test
- name: RUCIO_CFG_BOOTSTRAP_USERPASS_IDENTITY
value: tutorial
- name: RUCIO_CFG_BOOTSTRAP_USERPASS_PWD
value: secret1R
- name: RUCIO_PRINT_CFG
value: "true"
  1. Start the init pod:
kubectl apply -f init-pod.yaml

For more information:

Upgrading the database

After the Rucio version has been upgraded, there might be database changes that have to be done. These can be done on the rucio-server pod of the cluster and are performed with the Alembic tool.

The alembic.ini template can be found here. Fill in the correct values before transferring the file to the rucio-server pod:

cat alembic.ini | kubectl exec -i rucio-server-<pod identifier> --container rucio-server -- tee /tmp/alembic.ini

Open a bash prompt on the pod

kubectl exec rucio-server-<pod identifier> --container rucio-server -it -- bash

Then perform the upgrade with the Alembic tool as described in the database documentation