Fistron docs

fistron.io

Install the control plane in your Kubernetes

On-premises, the whole of Fistron runs in your infrastructure: the control plane (API and web UI), the agent and, if you want one, a local model. One Helm chart installs them; PostgreSQL and the identity provider are yours. Without internet access, follow Install without internet access instead: it uses the same chart from the offline bundle. To run images you build yourself from Fistron’s source on your own base image, see Build Fistron’s images yourself: the chart takes them from your registry.

Before you start

No cluster, PostgreSQL or identity provider yet? See All on one host: the installer brings them.

Install in one command

With kubectl’s context on your cluster, Helm 3.8 or later and curl:

curl -fsSL https://get.fistron.io | sh -s -- on-premises --licence organisation.paseto
  1. The installer checks, before it changes anything: your licence (Team and above, or a pilot, not expired; without self-hosted it says so and goes on), the cluster’s Kubernetes version, the ingress class, the nodes’ free disk, Fistron’s registry, your CA (--ca, Your own CA) and your identity provider’s discovery document. It says each problem in plain words, with how to fix it, all of them at once, and stops.
  2. It asks only what it cannot find: the address people open, your identity provider’s client, PostgreSQL’s two URLs (typed without being shown). The organisation’s short name comes from your licence.
  3. It writes the Secrets in the namespace fistron (--namespace). The session secret, the bootstrap admin’s password and the key that encrypts the organisation’s keys are generated once and kept on the next run.
  4. It checks PostgreSQL from the cluster with the control plane’s own image (fistron-control-plane preflight): both URLs connect, PostgreSQL 16 or later, the owner may create, the application role is fistron_app. It creates nothing in your database.
  5. It installs the chart with your answers in ~/.config/fistron/install/fistron-values.yaml, kept for upgrades. Then it creates the organisation and installs its licence.
  6. It prints the address, the bootstrap admin’s password (once), how to back up the key, the questions it asked and the time it took.

To answer without questions, for example in automation, give a file of key=value lines with --answers answers.env --yes. The keys are url, organisation, issuer, client_id, client_secret, database_url and migrations_url (with Keycloak installed with Fistron, keycloak=yes, keycloak_url and keycloak_database_url). Flags do the same: --url, --issuer, --client-id, --client-secret-file, --database-url-file, --migrations-url-file, --ingress-class, --tls-secret. More of the chart’s values, over the installer’s: --values my-values.yaml. Without --version it installs the chart Fistron’s channel stable names; --version <chart version> (for example 0.1.0-dev.38) installs that one.

An upgrade is one command on the same machine, where the installer kept your answers (install-upgrade.md):

curl -fsSL https://get.fistron.io | sh -s -- update on-premises

It backs up the database first, upgrades to the chart the channel stable names (or --version), checks the version and goes back to the release before when the new one does not come up. fistron-install status shows the chart running and the channel’s. From another machine, run the installation command again with your answers (--answers, the database URLs too, or --database-url-file and --migrations-url-file) and a newer --version.

All on one host

On one Linux host with nothing on it, --all-in-one installs what the control plane needs, then the control plane:

curl -fsSL https://get.fistron.io | sh -s -- on-premises --all-in-one --licence organisation.paseto
Part What it installs Instead, give
Kubernetes k3s from its project’s stable channel; RKE2 with --distribution rke2; a version with --distribution-version (for example v1.34.5+k3s1) a cluster: leave out --all-in-one
Storage k3s’s local-path; on RKE2, the local-path provisioner
PostgreSQL CloudNativePG’s operator and one instance in the namespace (fistron-postgres): the database fistron, its owner and the role fistron_app, Keycloak’s database the two database URLs (--database-url-file, --migrations-url-file)
Identity provider Keycloak, as with --with-keycloak, at https://<name>-id.<domain> unless --keycloak-url --issuer and its client
Certificates a CA of this installation and a certificate for each address --tls-secret (and --keycloak-tls-secret)

On one node

The chart runs two replicas of the control plane with a PodDisruptionBudget, so that an upgrade or a node’s drain keeps it up. On a single node the budget would block the node’s drain, so the installer sees one node and runs one replica, without the budget: it says so in a note. When the cluster grows, run it again and it gives the chart’s two replicas back. Without the installer, set in your --values file:

controlPlane:
  replicas: 1   # one replica has no PodDisruptionBudget

Your own CA

Python, which the control plane runs on, checks certificates strictly: a chain that curl and the browser accept can still fail at sign-in with CA cert does not include key usage extension. Your CA needs basicConstraints = CA:TRUE and keyUsage = keyCertSign; a server’s certificate a subjectAltName with its DNS name, an authorityKeyIdentifier and extendedKeyUsage = serverAuth.

Give the installer your CA’s certificate:

curl -fsSL https://get.fistron.io | sh -s -- on-premises --licence organisation.paseto --ca ca.crt

The same option installs the agent in Kubernetes when your CA signs the control plane’s address: agent --kubernetes --ca ca.crt.

To check a chain by hand, as the control plane checks it:

openssl verify -x509_strict -CAfile ca.crt server.crt

Without the installer, put the CA in a ConfigMap and give it to the chart through --values:

kubectl -n fistron create configmap internal-ca --from-file=ca.crt=ca.crt
controlPlane:
  oidc:
    caConfigMap: {name: internal-ca}
agent:
  caConfigMap: {name: internal-ca}

The identity provider in the same cluster

The control plane’s NetworkPolicy lets it reach the identity provider on port 443 only. When the identity provider runs behind the ingress controller of the same cluster, the connection is to the ingress controller’s pod, on its container’s port (RKE2’s Traefik: 8443), and the sign-in ends with the identity provider is not reachable. With Keycloak installed by the installer (--with-keycloak, --all-in-one) the installer adds the port itself, and agent --kubernetes adds it for an agent whose control plane the same cluster serves. Otherwise add it:

controlPlane:
  networkPolicy:
    oidc:
      ports: [443, 8443]

The steps below are what the installer does, for those who must do them by hand.

1. Prepare the secrets

Every secret comes from an existing Secret, never from the values. Your licence signs in to Fistron’s registry, for Helm and for the cluster’s pulls:

helm registry login registry.fistron.io --username licence --password-stdin < organisation.paseto
kubectl create namespace fistron
kubectl -n fistron create secret docker-registry fistron-registry \
  --docker-server=registry.fistron.io --docker-username=licence \
  --docker-password="$(cat organisation.paseto)"
kubectl -n fistron create secret generic fistron-db \
  --from-literal=app-uri='postgresql://fistron_app:...@postgres.example.internal:5432/fistron' \
  --from-literal=owner-uri='postgresql://fistron_owner:...@postgres.example.internal:5432/fistron'
kubectl -n fistron create secret generic fistron-control-plane \
  --from-literal=session-secret="$(openssl rand -hex 32)" \
  --from-literal=bootstrap-admin-password="$(openssl rand -base64 24)" \
  --from-literal=secrets-key="$(openssl rand -base64 32)" \
  --from-literal=client-secret='<the OIDC client secret>'

secrets-key seals the keys of the organisation’s model endpoints (Configure models (LLM endpoints)); keep a copy, it cannot be recovered.

2. Write the values

# values-fistron.yaml
global:
  imageRegistry: registry.fistron.io
  imagePullSecrets: [{name: fistron-registry}]
database:
  url: {secretName: fistron-db, key: app-uri}
  migrationsUrl: {secretName: fistron-db, key: owner-uri}
controlPlane:
  publicUrl: https://fistron.example.com
  singleTenant: example              # on-premises: one organisation
  session:
    secret: {secretName: fistron-control-plane, key: session-secret}
  modelKeys:
    secret: {secretName: fistron-control-plane, key: secrets-key}
  oidc:
    issuer: https://idp.example.com/realms/example
    clientId: fistron
    clientSecret: {secretName: fistron-control-plane, key: client-secret}
    groupsClaim: groups
  bootstrapAdmin:                    # optional: for the first setup only
    tenant: example
    password: {secretName: fistron-control-plane, key: bootstrap-admin-password}
  ingress:
    enabled: true
    className: nginx
    tls: {secretName: fistron-tls}

The chart’s values.yaml describes every value, and its schema refuses a value it does not know. Things you may want:

Value For
controlPlane.oidc.caConfigMap an identity provider signed by your own CA
controlPlane.packageKey an Ed25519 key that signs the compliance audit packages
controlPlane.metrics.serviceMonitor Prometheus metrics
controlPlane.networkPolicy.ingressFrom only your ingress controller may reach the API
database.networkPolicy.to only your PostgreSQL may be reached
podSecurityContext where the namespace assigns the user (for example OpenShift), set runAsUser, runAsGroup and fsGroup to null

3. Install

helm install fistron oci://registry.fistron.io/charts/fistron --version <version> \
  -n fistron -f values-fistron.yaml --wait

The database migrations run first, as a hook job; then the control plane starts with two replicas, a PodDisruptionBudget and a NetworkPolicy per component. A retention job runs every night.

4. Create the organisation and install its licence

The operator’s commands run as the schema’s owner, in a pod of their own that you delete afterwards (the serving pods never hold the owner’s credentials). It wears the retention job’s labels, so the chart’s NetworkPolicy lets it reach PostgreSQL:

kubectl -n fistron run fistron-admin --restart=Never \
  --image=registry.fistron.io/fistron-io/fistron-control-plane:<app version> \
  --labels=app.kubernetes.io/name=fistron,app.kubernetes.io/instance=fistron,app.kubernetes.io/component=retention \
  --overrides='{"spec":{"securityContext":{"runAsNonRoot":true,"runAsUser":10001,"seccompProfile":{"type":"RuntimeDefault"}},
    "imagePullSecrets":[{"name":"fistron-registry"}],
    "containers":[{"name":"fistron-admin","image":"registry.fistron.io/fistron-io/fistron-control-plane:<app version>",
    "command":["python3","-c","import time; time.sleep(3600)"],
    "securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"capabilities":{"drop":["ALL"]}},
    "env":[{"name":"FISTRON_CP_MIGRATIONS_DATABASE_URL","valueFrom":{"secretKeyRef":{"name":"fistron-db","key":"owner-uri"}}}],
    "volumeMounts":[{"name":"tmp","mountPath":"/tmp"}]}],"volumes":[{"name":"tmp","emptyDir":{}}]}}'
kubectl -n fistron wait --for=condition=Ready pod/fistron-admin

kubectl -n fistron exec fistron-admin -- fistron-control-plane tenant create example --name "Example"
kubectl -n fistron exec -i fistron-admin -- \
  fistron-control-plane tenant licence example --file /dev/stdin < example.paseto
kubectl -n fistron delete pod fistron-admin

<app version> is the application’s version of the chart (0.4.0 for the chart 0.4.0, 0.1.0.dev19 for 0.1.0-dev.19).

The licence is verified offline by the closed core; an invalid or expired licence is not installed.

With GitOps, or a plain helm install: for an installation of one organisation (singleTenant), the licence can come from a Secret instead of this step’s commands. The migrations’ hook creates the organisation when it is not there and installs the licence when it differs from the one installed; its log says what it did:

kubectl -n fistron create secret generic fistron-licence --from-file=licence.paseto=example.paseto
controlPlane:
  singleTenant: example
  licence:
    secretName: fistron-licence
    key: licence.paseto

A licence that does not verify leaves the installed one, and the release goes on. A renewed licence: Renew the licence.

5. Sign in and set the organisation up

  1. Open https://fistron.example.com and sign in with your identity provider (or as the bootstrap admin).
  2. Map your groups to roles, check the licence and create the projects: Set up your organisation.
  3. Once your own admins can sign in through the identity provider, one of them switches the bootstrap admin off under Organisation › People (admin-organisation.md). Removing bootstrapAdmin from the values (and helm upgrade) removes it for good.

6. Add the agent and a local model

The same chart runs the agent: create a registration token on the Agents page, put it in a Secret and enable the component.

agent:
  enabled: true
  controlPlaneUrl: https://fistron.example.com
  registration: {secretName: fistron-agent-registration}
  caConfigMap: {name: internal-ca}           # if your CA signs the control plane
  config: |
    [acquisition.gitlab]
    base_url = "https://gitlab.example.com"
    token_env = "FISTRON_GITLAB_TOKEN"
    projects = ["qe/shop"]
  env:
    - name: FISTRON_GITLAB_TOKEN
      valueFrom:
        secretKeyRef: {name: platform-tokens, key: gitlab}
  networkPolicy:
    egress:
      - to: [{ipBlock: {cidr: 10.20.0.0/16}}]  # your GitLab, model endpoint or proxy
        ports: [{port: 443, protocol: TCP}]

Files the configuration names (a probe’s SSH key and known_hosts, a product server’s CA, for the Verification log): a Secret of yours, mounted read-only at /config/files as the Podman agent’s --file mounts them, so that key = "/config/files/probe":

kubectl -n fistron create secret generic agent-files \
  --from-file=probe --from-file=known_hosts --from-file=server-ca.pem
agent:
  extraVolumes:
    - {name: files, secret: {secretName: agent-files, defaultMode: 0400}}
  extraVolumeMounts:
    - {name: files, mountPath: /config/files, readOnly: true}

With a GPU and a validated model, llm.enabled serves the model inside the cluster at http://<release>-llm:8000/v1; put that address into the agent’s configuration as an endpoint (Configure models (LLM endpoints)). The model’s weights are loaded onto the component’s volume beforehand.

helm upgrade with the new values, then check the agent on Agents (admin-agent.md) and delete the registration Secret.

Renew the licence

The renewal Fistron sends you, or a licence of another plan, goes in the way the installation was made. Each way verifies it offline with the closed core: a licence that is not valid, or has ended, is not installed, and the one installed stays. A Pilot in a paid licence’s place deletes the organisation’s documents when it ends, so it is installed only when you confirm it.

Check

Next