Studios: Kubernetes
This guide describes how to deploy Studios for Seqera Platform Enterprise on Kubernetes.
Prerequisites
Other than the basic requirements already listed in the Studios installation overview, you will need:
- A Kubernetes cluster
- kubectl installed locally
Tool configuration
This procedure describes how to configure Studios for Seqera Enterprise deployments in Kubernetes. If you were using Studios prior to GA (v25.1) please review the configmap.yaml file and make sure you are using the latest version which includes a new variable TOWER_DATA_STUDIO_TEMPLATES_<TEMPLATE_NAME>_TOOL. This variable needs to be added to the default/Seqera-provided Studio templates:
TOWER_DATA_STUDIO_TEMPLATES_<TEMPLATE_KEY>_TOOL: '<TOOL_NAME>'
The TEMPLATE_KEY can be any string, but the TOOL_NAME has to be the template name (jupyter/vscode/rstudio/xpra).
You can also check the current template configuration using https://towerurl/api/studios/templates?workspaceId=<WORKSPACE_ID>. The response should include the TOOL configuration and template name (jupyter/vscode/rstudio/xpra) - not custom.
Procedure
-
Download the Kubernetes manifests for the Studios service:
-
Change your Kubernetes context to the namespace where your Platform instance runs:
kubectl config set-context --current --namespace=<namespace> -
Edit the
server.ymlfile and set theCONNECT_REDIS_ADDRESSenvironment variable to the hostname or IP address of the Redis server configured for Platform. -
Create an initial OIDC registration token, which can be any secure random string. For example, using openssl:
oidc_registration_token=$(openssl rand -base64 32 | tr -d /=+ | cut -c -32) -
Edit the
proxy.ymlfile and set the following variables:CONNECT_REDIS_ADDRESS: The hostname or IP address of the Redis server configured for Seqera.CONNECT_PROXY_URL: A URL for the connect proxy subdomain (e.g.,https://connect.example.com).PLATFORM_URL: The base URL for your installation (e.g.,https://platform.example.com/orhttps://example.com/).CONNECT_OIDC_CLIENT_REGISTRATION_TOKEN: The same value as theoidc_registration_tokenvalue created previously.
-
Edit the
ingress.<YOUR-INGRESS-FILE>.ymlfile appropriate for your Kubernetes environment:- Uncomment the
hostsection at the bottom of the file. - Replace
<YOUR-TOWER-HOST-NAME>with the base domain of your installation.
noteIn the case you're using AWS EKS, this assumes that you have an existing Seqera ingress already configured with the following fields:
alb.ingress.kubernetes.io/certificate-arn: The ARN of a wildcard TLS certificate that secures the Platform URL and connect proxy URL. For example, ifTOWER_SERVER_URL=https://example.comandCONNECT_PROXY_URL=https://connect.example.com, the certificate must secureexample.com, and*.example.comat the same time; otherwise, you may need to create a second ingress resource specifically for Studios.
- Uncomment the
-
Generate an RSA public/private key pair. A key size of at least 2048 bits is recommended. In the following example, the
opensslcommand is used to generate the key pair:openssl genrsa -out private.pem 2048
openssl rsa -pubout -in private.pem -out public.pem -
Download the data-studios-rsa.pem file and replace its contents with the content of your private and public key files created in the previous step, in the same order (private key on top, public key directly beneath it).
-
Apply a base64 encoding to the PEM file:
base64_pem=$(cat data-studios-rsa.pem | base64 -w0) -
Create a secret file named
secret.yml:apiVersion: v1
kind: Secret
metadata:
name: platform-oidc-certs
namespace: platform-stage
data:
oidc.pem: <BASE64_ENCODED_PEM_FILE> -
Create the secret:
kubectl apply -f secret.yml -
Edit the
tower-svc.ymlfile and uncomment thevolumes.cert-volume,volumeMounts.cert-volume, andenv.TOWER_OIDC_PEM_PATHfields. -
Edit the ConfigMap named
platform-backend-cfgin theconfigmap.ymlby changing the following environment variables:TOWER_DATA_STUDIO_CONNECT_URL: The URL of the Studios connect proxy, such ashttps://connect.example.com/.TOWER_OIDC_REGISTRATION_INITIAL_ACCESS_TOKEN: The same value as theoidc_registration_tokenvalue created previously.
-
Edit the ConfigMap named
tower-ymlin theconfigmap.ymland include the following snippet:data:
tower.yml: |-
tower:
data-studio:
allowed-workspaces: nullAlternatively, you can specify a comma-separated list of workspace IDs to enable Studios only on those workspaces.
tower:
data-studio:
allowed-workspaces: [12345,67890] -
Apply the updated configuration:
kubectl apply -f configmap.yml -
Apply the configuration change to Platform:
kubectl apply -f tower-svc.yml -
Restart the cron service of your deployment to load the updated configuration. For example:
kubectl rollout restart deployment/cron -
Restart the Platform backend service of your deployment to load the updated configuration. For example:
kubectl rollout restart deployment/backend -
Apply the updated ingress file and the Studios manifests:
kubectl apply -f ingress.<YOUR-INGRESS-FILE>.yml proxy.yml server.yml -
To confirm that Studios is available, log into Seqera and navigate to an organizational workspace that has Studios enabled. The Studios tab should be displayed in the sidebar.