Execution environments¶
An execution environment decides where a step's process runs and which tools it has. It does not decide which servers the step talks to — that is the inventory.
| Executor | Runs as | Isolation | Terraform | HA mode |
|---|---|---|---|---|
| Kubernetes | A Kubernetes Job per step, in the Liftway namespace | Pod with limits, non-root, read-only root filesystem | Yes | Yes |
| Local | A subprocess of the controller | None — the controller's own user and network | No | No |
| SSH | A worker on a host reached over SSH | Whatever that host provides | No | No |
A template without an execution environment uses the default runner image configured for the installation (normally the Liftway image itself). Choose one per template; the choice is copied into each run's snapshot.
Kubernetes¶
| Field | Notes |
|---|---|
| Image | Required, e.g. registry.example.com/automation/runner:2026.11.1 |
| Pull policy | IfNotPresent (default), Always or Never (for images loaded into kind/k3d) |
| Pull secret | Name of an existing kubernetes.io/dockerconfigjson Secret in the Liftway namespace |
Each step becomes a Job with:
backoffLimit: 0andrestartPolicy: Never— Kubernetes never retries a step;activeDeadlineSeconds= the template timeout + 60 seconds for image pull and Vault login;- UID/GID
10001,runAsNonRoot,allowPrivilegeEscalation: false, all capabilities dropped, seccompRuntimeDefault; - a read-only root filesystem with a 256 MiB in-memory
/tmp; - requests
100mCPU /128Mi, limits1CPU /512Mi; - no default service-account token; a separate projected token with audience
vaultis used for Vault login only; - the step specification mounted read-only from a ConfigMap; Terraform callback capabilities in a short-lived Secret.
Build a compatible image¶
Not every Ansible image works. A runner image must:
- contain
python -m runway.runnerfrom the same Liftway version and its Python dependencies; - contain
ansible-core,git,bashandopenssh-client(andterraformfor Terraform steps); - run as UID/GID 10001 with a read-only root filesystem and only
/tmpwritable.
The simplest way is to extend the Liftway image:
FROM registry.example.com/automation/runway:<full-commit-sha>
USER root
RUN ansible-galaxy collection install \
community.general:==9.5.0 ansible.posix:==1.6.2 \
-p /usr/share/ansible/collections \
&& apt-get update && apt-get install -y --no-install-recommends jq \
&& rm -rf /var/lib/apt/lists/*
USER 10001:10001
Pin collection versions and refer to the image by an immutable tag or digest so that reruns are reproducible. Collections listed in a project's collections/requirements.yml are installed per job instead — see Projects.
The default Liftway image is built on python:3.12-slim and ships Terraform 1.13.5, ansible-core from the locked requirements, git, bash, openssh-client and sshpass.
Local¶
Runs the step as a subprocess of the controller, in the controller's container in Kubernetes or as your user with make dev. Only a short allowlist of environment variables is passed on; controller secrets such as the database URL, admin password and Terraform key are not. It is still not a sandbox: use it for development and trusted code.
A controller configured with the local backend rejects Kubernetes environments, and a controller in HA mode rejects local ones.
SSH¶
| Field | Notes |
|---|---|
| Host, port | Host name or IP; port 22 by default |
| SSH user | Optional; falls back to the Machine SSH credential's username |
| Credential | A Machine SSH credential with exactly one private key, an optional passphrase and verified known hosts |
| Python path | Interpreter on the remote host that can import runway.ssh_worker (default python3) |
Install the same Liftway version, Ansible, Git and Bash on the SSH host. The controller connects with strict host-key checking, sends the step specification and runtime secrets over SSH standard input (never on the command line), and streams output back. Database and Vault login credentials of the controller are never forwarded.
Cancellation over SSH is cooperative: a dropped connection does not prove the remote process stopped, so a canceled SSH step finishes or reaches its timeout before it shows canceled.
Choosing¶
- Production: Kubernetes for everything. It is the only executor that HA mode and Terraform accept, and it gives each step a clean, limited pod.
- A jump host that must run the automation: SSH, with a dedicated host and user for Liftway.
- Development: Local.