Fistron docs

fistron.io

Use the hosted control plane with your own agent

In the hybrid way Fistron runs the control plane for you at app.fistron.io, and you run its agent inside your network. The agent reads your Git platform, CI and clusters with its own tokens and connects to the control plane outbound only, so nothing needs to reach into your network (How Fistron is built and secured).

Before you start

1. Sign in and create the registration token

  1. Open https://app.fistron.io and sign in with the first admin account; change the temporary password.
  2. Check the licence and create your projects (Set up your organisation).
  3. Open Agents and create a registration token for the agent, with the projects it serves (admin-agent.md). Copy it: it is shown once.

2. Write the agent’s configuration

The agent has its own fistron.toml. With your consent in it, everything else (the repositories it may read, its CI, its model endpoints, the data class) is set later in the control plane’s GUI and changed there without touching this machine (Set an agent’s configuration in the control plane); what the file has is sent once as the first version:

[agent]
control_plane_config = true          # the rest is set in the GUI (leave it out to keep it all here)

[acquisition.github]
token_env = "FISTRON_GITHUB_TOKEN"   # the variable's name, never the token
repositories = ["acme/payments"]     # owner/name; nothing else is read

[llm.endpoints.internal]              # optional: without it, plain rules
base_url = "https://llm.example.internal/v1"
model = "example-model"
api_key_env = "FISTRON_LLM_KEY"
max_data_class = "confidential"

[llm.roles]
reasoner = "internal"

A repository is owner/name. A github: prefix or the repository’s address on github.com is read as owner/name (the agent’s Configuration page says so before saving); another platform’s prefix, such as gitlab:, is refused.

See Connect GitHub and GitLab and Configure models (LLM endpoints) for every setting.

3a. Install the agent as a container with systemd

On a virtual machine or server without Kubernetes, one command installs the agent as a rootless Podman container that systemd keeps running. With sudo, it prepares the host first, then goes on as the user the agent runs as:

curl -fsSL https://get.fistron.io | sudo FISTRON_REGISTRATION_TOKEN=fcr_... sh -s -- agent --user fistron

Preparing the host:

Run again, nothing in place changes. The token and the variables you give stay in the environment when it goes on as the user, never on a command line. Files you name (--config, --ca, --env-file) must be readable by that user. sudo sh -s -- host --user fistron prepares the host alone.

Already as the user the agent runs as (not root), with Podman and its session in place, the same without sudo:

curl -fsSL https://get.fistron.io | FISTRON_REGISTRATION_TOKEN=fcr_... sh -s -- agent

It checks Podman, asks the control plane where the agent’s image is and signs in to Fistron’s registry with your organisation’s licence (the control plane hands it over; you copy nothing), pulls the newest minor version of the image with the closed core (registry.fistron.io/fistron-core:<major>.<minor>), verifies its signature with cosign (without one on the host, it downloads cosign’s release from GitHub and checks it against the SHA-256 it holds; when the signature cannot be verified, nothing is installed), writes the agent’s fistron.toml with your consent to the control plane’s configuration (step 2 in the GUI) and the unit, starts it and waits until the agent has registered. The token is kept as a Podman secret, never in a file.

It also installs fistron-install: fistron-install status shows the agent’s state and version; updates are in Upgrade Fistron.

By hand

To write the unit yourself, run the image with the closed core, ghcr.io/fistron-io/fistron-core:<version>, as a rootless Podman container that systemd keeps running:

As the user the agent runs as (not root), with the image’s read access (a token with read:packages given with your pilot or licence):

podman login ghcr.io                     # the user and token of your image access
mkdir -p ~/fistron/workspace ~/fistron/credentials ~/.config/containers/systemd
cp fistron.toml ~/fistron/
printf '%s' "$FISTRON_GITHUB_TOKEN" | podman secret create fistron-github-token -
printf '%s' "fcr_..."              | podman secret create fistron-agent-registration -
cat > ~/.config/containers/systemd/fistron-agent.container <<'EOF'
[Container]
Image=ghcr.io/fistron-io/fistron-core:<version>
ReadOnly=true
UserNS=keep-id
DropCapability=ALL
Volume=%h/fistron/workspace:/workspace:Z
Volume=%h/fistron/credentials:/credentials:Z
Volume=%h/fistron/fistron.toml:/etc/fistron/fistron.toml:ro,Z
Environment=FISTRON_AGENT_CREDENTIALS=/credentials/agent.json
Secret=fistron-github-token,type=env,target=FISTRON_GITHUB_TOKEN
Secret=fistron-agent-registration,type=env,target=FISTRON_AGENT_REGISTRATION_TOKEN
Exec=sh -c 'fistron agent register --url https://app.fistron.io --if-missing && exec fistron agent run --workspace /workspace --config /etc/fistron/fistron.toml --create-workspace'

[Service]
Restart=always
TimeoutStopSec=600

[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user start fistron-agent
loginctl enable-linger "$USER"

The agent registers on its first start and keeps its credential in ~/fistron/credentials, outside the workspace; later starts need no token. The token is spent then. Its secret can stay; to remove it, remove its Secret= line from the unit first, or the next start fails. Add Environment=HTTPS_PROXY=... and NO_PROXY=... for a proxy.

Every variable your fistron.toml names (token_env, user_env, api_key_env) is a secret of its own and a Secret= line, for example the model’s key and a Jenkins user:

printf '%s' "$FISTRON_LLM_KEY" | podman secret create fistron-llm-key -
# in fistron-agent.container, under [Container]:
#   Secret=fistron-llm-key,type=env,target=FISTRON_LLM_KEY
#   Secret=fistron-jenkins-user,type=env,target=FISTRON_JENKINS_USER
#   Secret=fistron-jenkins-token,type=env,target=FISTRON_JENKINS_TOKEN

A private CA (an internal Jenkins or model endpoint): mount its certificate, Volume=%h/fistron/ca.pem:/etc/fistron/ca.pem:ro,Z, and name it as ca_file = "/etc/fistron/ca.pem" in the section that needs it.

Check it and follow its log:

systemctl --user status fistron-agent
journalctl --user -u fistron-agent -f

A new version: change Image= and run systemctl --user daemon-reload && systemctl --user restart fistron-agent; the credential stays. With AutoUpdate=registry in [Container] and an image tag of a minor version (<major>.<minor>), Podman’s auto-update timer takes its patch releases (systemctl --user enable --now podman-auto-update.timer).

On many machines, or when Salt (also through Uyuni) or Ansible manages them, install the agent with that tool instead, with Docker or Podman: Install agents with your configuration management.

3b. Install the agent with the Helm chart

In Kubernetes, one command installs Fistron’s chart with only the agent, in kubectl’s current context (Helm 3.8 or later):

curl -fsSL https://get.fistron.io | FISTRON_REGISTRATION_TOKEN=fcr_... sh -s -- agent --kubernetes

It checks the cluster (its version, a storage class for the agent’s volume), asks the control plane for the registry’s credentials, writes the registration token and the registry’s pull Secret in the namespace fistron (--namespace), installs the chart with the values in ~/.config/fistron/install/fistron-agent-values.yaml and waits until the agent runs. --url names your control plane (default https://app.fistron.io), --storage-class another storage class, --values more values of the chart (the agent’s own config, its env), --ca ca.crt your CA when it signs the control plane’s address (kept in the ConfigMap fistron-ca, given to the agent as agent.caConfigMap). An upgrade of the agent’s chart is the same command without the token (fistron-install agent --kubernetes, with --namespace when it is not fistron): the agent registered already, its address, registry and settings are the ones kept.

By hand

The same, step by step:

kubectl create namespace fistron
kubectl -n fistron create secret generic fistron-agent-registration --from-literal=token='fcr_...'
kubectl -n fistron create secret generic platform-tokens --from-literal=github='...'
# values-agent.yaml
controlPlane:
  enabled: false
agent:
  enabled: true
  controlPlaneUrl: https://app.fistron.io
  registration: {secretName: fistron-agent-registration}
  config: |
    [acquisition.github]
    repositories = ["acme/payments"]
    token_env = "FISTRON_GITHUB_TOKEN"
  env:
    - name: FISTRON_GITHUB_TOKEN
      valueFrom:
        secretKeyRef: {name: platform-tokens, key: github}
  networkPolicy:
    egress: []   # add your Git platform, model endpoint or proxy here
helm install fistron oci://registry.fistron.io/charts/fistron --version <version> \
  -n fistron -f values-agent.yaml --wait
kubectl -n fistron delete secret fistron-agent-registration   # spent after the first start

The agent runs as one replica with a persistent volume for its workspace and credentials. Its NetworkPolicy allows only the control plane and what you add under agent.networkPolicy.egress. Scheduled work comes from the control plane’s schedules, not from CronJobs.

4. Check

  1. In the control plane, open Agents: the agent’s State is answers, with its version and the operations it runs.
  2. In a project it serves, open Work, click Start an operation and run a small one; it moves from queued to succeeded.

Keep it current

Fistron upgrades app.fistron.io. Keep the agent within one minor version of it: change the image’s version (or helm upgrade) when a release says so (Upgrade Fistron).

Troubleshooting

You see Cause and fix
State silent The agent cannot reach app.fistron.io: check its proxy variables, its firewall egress and the logs (journalctl --user -u fistron-agent or kubectl logs).
The agent stops with exit code 1 Its credential was revoked or expired: create a new registration token and register again.
HTTP 426 in its log The agent is more than one minor version from the control plane: upgrade it.
A licensed operation is refused The agent runs the image without the closed core: use fistron-core.