How the modules split the work
Know which module or chart does each part of the installation, and what must exist before it runs.
The installation of Platforma in a KubernetesKubernetes — A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster. Glossary cluster is split by rights. A person with cluster admin rights prepares the cluster one time. Then the BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary installs and updates with rights in its namespace only. The modules and the charts do not build the infrastructure: they expect it, and the company builds it with its own tools and standards.
The modules are infrastructure-agnostic: they work in each Kubernetes cluster that meets the contract, in a cloud or in the infrastructure of your company.
The packages
MiLaboratories gives the Backend for Kubernetes in four packages that do not depend on the infrastructure, and you take a published version of each:
platforma-tf-services-cluster(Terraform module): the part of Platforma that is common to the whole cluster. It creates the namespaces of Platforma, installs KueueKueue — A Kubernetes add-on that holds jobs in a queue until the cluster has free CPU, memory and GPU for them. Glossary and AppWrapperAppWrapper — A Kubernetes add-on that wraps the pods of one job into a single unit, so that Kueue admits and starts them together. Glossary, and creates the jobjob — One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster. Glossary queues with their quotas and priorities. It needs cluster admin rights.platforma-tf-services(Terraform module): the Backend in one namespace. The roleadminin that namespace is enough.platforma-backend(Helm chart): the Backend itself.appwrapper(Helm chart): the AppWrapper controller and its CRD, in a build of MiLaboratories.
One version of platforma-tf-services-cluster pins the versions of Kueue and AppWrapper, and one
version of platforma-tf-services pins the version of the chart platforma-backend. For
mirrors of these versions, see
Registries and mirrors. For how to
change a version, see Upgrade Platforma.
The contract: inputs and outputs of the modules
For the modules, the contract is their inputs and outputs: what one step gives to the next one. The values describe the infrastructure that exists. They do not create it.
| Value | Module | What it holds | Where it comes from |
|---|---|---|---|
Input cluster_config |
platforma-tf-services-cluster |
The contract version, the namespaces of Platforma, the node pools (backend, ui, batch, optional gpu), the autoscaling, and cloud_values: the ServiceAccounts, the entry pointsentry point — The way in to the Backend from outside the cluster, a load balancer or an Ingress with a DNS name. It usually ends TLS and sends the traffic to the Backend pod. Glossary, the volumes, the primary storageprimary storage — The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files. Glossary, the registries, the CA bundleCA bundle — One PEM file with the certificate authorities that a program trusts. In Kubernetes, Platforma can give the Backend and all jobs one bundle with the public and the corporate certificate authorities. Glossary and the user of the pods |
The operatoroperator — The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician. Glossary writes it by hand as JSON, or a cloud module of MiLaboratories writes it |
Input components (optional) |
platforma-tf-services-cluster |
What the module installs (Kueue, AppWrapper, the queues), and the sources of the charts and images | The operator |
Output and input infrastructure |
Output of platforma-tf-services-cluster, input of platforma-tf-services |
All that the Backend must know about the cluster (see The hand-off file) | terraform output -json infrastructure, or the operator writes it by hand |
Input backend_service |
platforma-tf-services |
The values of the administrator, such as the sign-insign in — To show the Backend who you are, with a sign-in provider or a single-user token. The verb is "sign in"; the noun and the adjective are "sign-in". Glossary and the references to the Secrets. They are not part of the infrastructure | The operator |
The types, the defaults and the checks of each input are in inputs/variables.tf of each module.
The source repository of the modules has a sample cluster_config for a cluster that exists
already, with a sample root that applies it. For the full list of inputs, see
Terraform modules.
The roots
The roots are not a required structure. They are the reference setup: how MiLaboratories shapes the installation when it builds the infrastructure in a cloud. Any setup that gives the modules the same inputs is correct: one root, a pipeline of the company, or values written by hand.
In the reference setup, Terraform applies the modules in three roots, each with its own state, from left to right.
- Root
cloudmakes the network, the cluster, the node pools, the storage and the entry point. For AWS and Google Cloud, MiLaboratories publishes reference cloud-specific Terraform modulescloud-specific Terraform modules — The Terraform modules platforma-tf-cloud-base and platforma-tf-cloud-cluster. There is one pair for each cloud, AWS and Google Cloud. The roots cloud and cluster apply them. They make the network, the Kubernetes cluster, the storage, the cloud identities and the registry caches. They give the hand-off file cluster_config to the cloud-agnostic Terraform modules. Glossary for it. For a cluster that exists already, in a cloud or in the infrastructure of your company, the company does this part with its own tools. - Root
clusterrunsplatforma-tf-services-cluster. In AWS and Google Cloud, the cloud moduleplatforma-tf-cloud-clusterruns first and writescluster_config. For any other cluster, the operator writescluster_configby hand as JSON. The root writes the outputinfrastructureto the hand-off fileinfrastructure.json. - Root
servicesreadsinfrastructure.jsonand runsplatforma-tf-services, which installs the Backend.
Platforma also supports an installation without Terraform: the company installs the Helm
charts with helm, and gives the chart platforma-backend the values that infrastructure
would give.
The Helm charts
The modules install these charts:
kueue(Kueue) comes from the OCI repositoryregistry.k8s.io/kueue/charts.appwrapper(AppWrapper) comes from MiLaboratories, as a patched build.platforma-backend(the Backend) comes from MiLaboratories.
platforma-backend creates objects only in the namespace of its release: the Backend, its
volume claims, ServiceAccounts and Role, the job queues of the namespace, and the routes or
Ingresses. The chart expects all objects of the whole cluster to exist already. The chart does not
create Secrets: at install time, it checks that each Secret that the values name exists.
appwrapper installs AppWrapper 1.2.3 or later, in the build that MiLaboratories patches and
updates from time to time (for the reason, see
Kueue and AppWrapper). The chart goes one
time into each cluster, after Kueue. Its admission webhooks are off by default (value
webhooks.enabled): turn them on only when other users or tools also create AppWrappers in the
cluster.
For the order in which to remove the packages, see Uninstall Platforma.
Kubernetes hides the real infrastructure (machines, networks, load balancers, disks and autoscaling) behind its own resources, such as node pools, StorageClasses and Gateway classes, and gives guarantees for them. Platforma expects some of this infrastructure below Kubernetes, and some objects inside it.
Below Kubernetes: the infrastructure
Before platforma-tf-services-cluster runs, it expects these parts of the infrastructure:
- Kubernetes 1.35 or later, and cluster admin rights for the person or the pipeline that applies the module.
- The node pools (required). An autoscaler is optional: add it, with the ProvisioningRequest CRD when you set a class, only when the cluster adds nodes for jobs. A static cluster with a fixed list of nodes works without it: the quotas of the job queues follow these nodes. See Nodes, job queues and GPU.
- The StorageClasses: see Storage.
- The Gateway or the Ingress controller: see Entry point and TLS.
- The identities of the Backend and the jobs: see Identity, Secrets and outbound access.
- Kueue and AppWrapper, only when the module does not install them.
Inside Kubernetes: the objects
Before platforma-tf-services runs, it expects these objects:
- The namespace of the instance.
platforma-tf-services-clustercreates it. - The value
infrastructure: the output ofplatforma-tf-services-cluster, or a file that the operator wrote by hand. - The Secrets in the namespace: the license, the master secret and the sign-in, and the TLS Secret when an Ingress uses one. None of the modules creates Secrets, so that a secret value never goes through Terraform.
- The DNS records of the hosts of the entry points, when a controller in the cluster does not make them.
- The role
adminin the namespace. The built-in roleadmindoes not have rights on the objects of Kueue and AppWrapper.platforma-tf-services-clustertherefore adds these rights to it, so that the role in the namespace is enough.
The hand-off file
platforma-tf-services takes one object as input: infrastructure, all that the Backend must know
about the cluster. The owner of infrastructure is one of two:
- the output
infrastructureofplatforma-tf-services-cluster, or - the operator, who writes it by hand.
Its main parts are contract_version, namespaces, run_as, jobs (the queues, the largest job
and the ServiceAccount of the jobs), registries, backend (the placement and the ServiceAccount
of the Backend), network, ca_bundle, volumes and primary_storage.
It is plain data without credentials. terraform output -json infrastructure writes it to a JSON
file, and platforma-tf-services reads the file unchanged, so one step never reads the Terraform
state of another. The operator can also write the file by hand, without
platforma-tf-services-cluster: a value that is not set gets the default of
platforma-tf-services. The cluster must then already have all that
platforma-tf-services-cluster would make.
The contract version
The contract version is one number in cluster_config and in infrastructure. It names one set
of agreements between the infrastructure and the Backend: the minimum versions of Kubernetes,
Kueue, AppWrapper and the Gateway API, and the shape of the values. The current version is 1.
Each release of a module accepts a fixed list of contract versions, and a plan with another version stops. For what a new contract version means for an upgrade, see Upgrade Platforma.
Checks before a change
The modules check their inputs at plan time, before they change the cluster. The error names the value: unknown keys, wrong types, missing required values, secret values in place of references, and components that are not in the cluster. For the full list of inputs and their checks, see Terraform modules and Chart values.