Every Onyxia instance may or may not have it's own catalog. There is three default catalogs :
This collection of charts help users to launch many IDE with various binary stacks (python , R) with or without GPU support. Docker images are built here and help us to give a homogeneous stack.
This collection of charts help users to launch many databases system. Most of them are based on bitnami/charts.
This collection of charts help users to start automation tools for their datascience activity.
You can always find the source of the catalog by clicking on the "contribute to the... " link.\
Using your own catalogs (helm charts repositories)
If you do not specify catalogs in your onyxia/values.yaml theses are the one that are used by default: See file.
To configure your onyxia instance to use your own custom helm repository as onyxia catalogs you need to use the onyxia configuration onyxia.api.catalogs.
Let's say we're NASA and we want to have an "Areospace services" catalog on our onyxia instance. Our onyxia configuctation would look a bit like this:
onyxia/values.yaml
onyxia:
web:
# ...
api:
# ...
catalogs: [
{
type: "helm",
id: "aerospace",
# The url of the Helm chart repository
location: "https://myorg.github.io/helm-charts-aerospace/",
# Display under the search bar as selection tab:
# https://github.com/InseeFrLab/onyxia/assets/6702424/a7247c7d-b0be-48db-893b-20c9352fdb94
name: {
en: "Aerospace services",
fr: "Services aÊrospatiaux"
# ... other languages your instance supports
},
# Optional. Defines the chart that should appear first
highlightedCharts: ["jupyter-artemis", "rstudio-dragonfly"],
# Optional. Defines the chart that should be excluded
excludedCharts: ["a-vendor-locking-chart"],
# Optional, If defined, displayed in the header of the catalog page:
# https://github.com/InseeFrLab/onyxia/assets/6702424/57e32f44-b889-41b2-b0c7-727c35b07650
# Is rendered as Markdown
description: {
en: "A catalog of services for aerospace engineers",
fr: "Un catalogue de services pour les ingÊnieurs aÊrospatiaux"
# ...
},
# Can be "PROD" or "TEST". If test the catalogs will be accessible if you type the url in the search bar
# but you won't have a tab to select it.
status": "PROD",
# Optional. If true the certificate verification for `${location}/index.yaml` will be skipped.
skipTlsVerify: false,
# Optional. certificate authority file to use for the TLS verification
caFile: "/path/to/ca.crt",
# Optional: Enables you to a specific group of users.
# You can match any claim in the JWT token.
# If the claim's value is an array, it match if one of the value is the one you specified.
# The match property can also be a regex.
restrictions: [
{
userAttribute: {
key: "groups",
matches: "nasa-engineers"
}
}
]
},
# { ... } another catalog
]
Customizing your helm charts for Onyxia
In Onyxia we use the values.schema.json file to know what options should be displayed to the user at the service configuration step and what default value Onyxia should inject.
[x-onyxia] overwriteDefaultWith
Let's consider a sample of the values.schema.json of the InseeFrLab/helm-charts-datascience's Jupyter chart:
But what if you want to dynamicaly generate the option? For this you can use the overwriteListEnumWith x-onyxia option.
For example if you need to let the user select one of the groups he belongs to you can write:
You probably want to be able to define a limit to the amount of resources a user can request when launching a service.
It's possible to do it at the catalog level but it's best to enable the person who is deploying Onyxia to define boundaries for his deployment regions.
This is the purpose of the x-onyxia param useRegionSliderConfig
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"resources": {
"description": "Your service will have at least the requested resources and never more than its limits. No limit for a resource and you can consume everything left on the host machine.",
"type": "object",
"properties": {
"limits": {
"description": "max resources",
"type": "object",
"properties": {
"nvidia.com/gpu": {
"description": "GPU to allocate to this instance. This is also requested",
"type": "string",
"default": "0", // Will be overwritten by "1"
"render": "slider",
"sliderMin": 0, // Will be overwritten by 1
"sliderMax": 3, // Will be overwritten by 4
"sliderStep": 1, // Will be overwritten by 1
"sliderUnit": "", // Will be overwritten by ""
"x-onyxia": {
"overwriteDefaultWith": "region.resources.gpu",
"useRegionSliderConfig": "gpu" // đ
}
},
"cpu": {
"description": "The maximum amount of cpu",
"title": "CPU",
"type": "string",
"default": "30000m",
"render": "slider",
"sliderMin": 50,
"sliderMax": 40000,
"sliderStep": 50,
"sliderUnit": "m",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "cpu",
"x-onyxia": {
"overwriteDefaultWith": "region.resources.cpuLimit",
"useRegionSliderConfig": "cpu"
}
},
"memory": {
"description": "The maximum amount of memory",
"title": "Memory",
"type": "string",
"default": "50Gi",
"render": "slider",
"sliderMin": 1,
"sliderMax": 200,
"sliderStep": 1,
"sliderUnit": "Gi",
"sliderExtremity": "up",
"sliderExtremitySemantic": "Maximum",
"sliderRangeId": "memory",
"x-onyxia": {
"overwriteDefaultWith": "region.resources.memoryLimit",
"useRegionSliderConfig": "memory"
}
}
}
}
}
}
}
}
You now have all the relevent information to submit PR on the existing catalogs or even to create your own.
Remember that a helm chart repository is nothing more than a GitHub repo with a special github Action setup to publish the charts on GitHub Pages.
If you are looking for a repo to start from have a look at this one, it has a directory where you can put the icons of your services.