Skip to content

License

guideconfiguration-license

Give the license key of your company to the Backend, and keep it valid.

For an installation made with an installer, see Install in cloud with installer.

One license key serves the whole installation: all users who connect to the BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary share its limits, so you do not manage licenses for each user. MiLaboratories gives the key to your company. The Backend reads the key at start and checks it with the license service of MiLaboratories. For what the license gives and how the check works, see License and License check.

The Backend needs HTTPS access to licensing-api.milaboratories.com, and so do the jobsjob — One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster. Glossary of tools that check their own license, for example MiXCR. For the mirror and proxy limits, see License check. For all hosts that Platforma connects to, see External services; to send the traffic through the corporate proxy, see Proxy and custom CA.

Give the license to the Backend

The Terraform modulesTerraform modules — The Terraform code that MiLaboratories provides to install Platforma. The cloud-specific Terraform modules make the cluster and its cloud parts in AWS or Google Cloud; the cloud-agnostic Terraform modules install Platforma into the cluster. Glossary and the chart do not create the Secret with the license. Before the install:

  1. Create the Secret in the namespace of the Backend. The default name of the Secret is platforma-license, and the default key is MI_LICENSE:

    Terminal window
    kubectl create secret generic platforma-license \
    --namespace <namespace> \
    --from-literal=MI_LICENSE=<license-key>
  2. Name the Secret in the settings of the Backend: in the input backend_service of the module platforma-tf-services, or in the values of the chart platforma-backend. With the default name and key, you do not have to set anything:

    terraform.tfvars
    backend_service = {
    secrets = {
    license = { name = "platforma-license", key = "MI_LICENSE" }
    }
    }
    values.yaml
    secrets:
    license: { name: platforma-license, key: MI_LICENSE }

The settings hold only a reference to the Secret, never the key itself, and the license comes only from this Secret. The chart stops when a license option (--license, --license-file) is in extraArgs, or a license variable (PL_LICENSE, MI_LICENSE, PL_LICENSE_FILE, MI_LICENSE_FILE) is in one of the env lists, also in env.secretVariables. The module gives extra_args and env to the chart, so the same applies to them. At each install and upgrade, the chart checks that the Secret exists and has the key.

The license Secret is also the default Secret for jobs, so the jobs of tools that check their own license, for example MiXCR, get the key from it. For the Secret of jobs, see Jobs and resources.

Check the license

At start, the Backend writes the result of the license check to its log:

  • License is OK: the Backend accepts the license and runs computations.
  • A line that starts with License verification failed: the license service refused the key. Users can 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 Desktop AppDesktop App — The program that each user installs on their own computer to work with Platforma. It is a client of the Backend. Glossary shows the license problem.
Terminal window
kubectl logs --namespace <namespace> deployment/<release> | grep -i license

<release> is the name of the Helm release of the Backend: the Deployment has the same name.

To see the details of the license that the license service gives, run --show-license-info in the pod. The pod already has the key in PL_LICENSE. The command asks the license service, prints the license and exits; it does not change the running Backend:

Terminal window
kubectl exec --namespace <namespace> deployment/<release> -- /app/platforma --show-license-info

When the license is not valid

A license is not valid when it has expired, when it was revoked, or when the key is wrong. The Backend has two ways to react, and you choose one:

  • Start without computations (default). The Backend starts, users can sign in and open their projects, and the Desktop App shows the license status. The Backend does not run any computations. This mode lets users and the operatoroperator — The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician. Glossary see the problem in the Desktop App.
  • Stop (--fail-fast-on-invalid-license). The Backend does not start, and it stops when the license becomes invalid while it runs. Choose this mode when the monitoring of the cluster must show a failed start. In KubernetesKubernetes — A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster. Glossary, the pod then restarts again and again (CrashLoopBackOff) until the license is valid.

In the default mode, when the license becomes invalid while the Backend runs, the Backend stops, and Kubernetes or the service manager starts it again without computations. This is one restart, not a crash loop. When the license is valid again, the Backend stops and starts again with computations. With --fail-fast-on-invalid-license, the Backend stops and does not start again until the license is valid. In Single Server mode, set the service manager to start the Backend again after each stop, for example Restart=always in a systemd unit. New jobs do not start while the license is not valid. Jobs that already run usually run to the end; a MiXCR job can stop or run to the end, depending on the moment.

The flag is not covered by the chart values or the module inputs. Set it like this:

terraform.tfvars
backend_service = {
extra_args = ["--fail-fast-on-invalid-license"]
}
values.yaml
extraArgs:
- --fail-fast-on-invalid-license

Renew or change the license

When the license is renewed, MiLaboratories usually extends the same key at the license service, so you do not change anything in the installation: the Backend gets the new end date at its next check.

When your company gets a new key, put it where the Backend reads it, then restart the Backend: it reads the key only at start. For what the restart does, see Restart of the Backend. Users do not sign in again, because their sessions do not depend on the license.

Replace the key in the Secret, then restart the Backend:

Terminal window
kubectl create secret generic platforma-license \
--namespace <namespace> \
--from-literal=MI_LICENSE=<new-license-key> \
--dry-run=client -o yaml | kubectl apply -f -
kubectl rollout restart --namespace <namespace> deployment/<release>

Usage records

In a Kubernetes cluster, the Backend sends usage records when the license allows it, by default to https://mon.pl-open.science. You cannot turn them off with a setting. Platforma does not depend on them: when the records cannot be sent, the work continues. You choose where the records go, with one setting, the address of the monitoring service:

  • The default address. The records go to MiLaboratories. MiLaboratories recommends this, because the records help to support your company and to make BlocksBlock — A small application for one step of an analysis, for example the import of reads or clustering. It can combine several tools. Glossary better.
  • A proxy of the company. To see what goes out, give the address of a proxy that logs the records and forwards them to MiLaboratories.
  • An address that does not accept the records. The records do not leave the company: this turns them off in practice.

The Backend posts each record to <URL>/v1/exec_run_record. For a proxy, use an https:// address: with http://, the records go over the network without encryption. The setting is not covered by the chart values or the module inputs. In Single Server mode, the Backend does not send usage records, so this setting is not necessary there:

terraform.tfvars
backend_service = {
extra_args = ["--telemetry-endpoint=https://<records-proxy>"]
}
values.yaml
extraArgs:
- --telemetry-endpoint=https://<records-proxy>

Next