Getting started
The Runs Service implements the RunService gRPC interface using Building Services with the App Framework. It is responsible for managing workflow runs, actions, attempts, and cluster events. By default, it uses Database Configuration for easy local development, but it also supports PostgreSQL Configuration for production environments.
Prerequisites
Before installing, ensure your environment meets the following requirements:
- Go: 1.26.3 or later
- System Tools:
git,make, andbuild-base - OS: Linux support (primary)
Install
Clone the repository and build the service binary:
git clone https://github.com/flyteorg/flyte.git
cd flyte/runs
go build -o runs-service cmd/main.go
Hello world
The fastest way to start the service is using the default Database Configuration configuration. This requires no external database setup.
# Start the service using the default config
./runs-service --config config.yaml
The service will automatically:
- Create a local SQLite database file (
runs.db). - Run necessary database migrations.
- Start an HTTP/2 server on port
8090.
Verify
Once the service is running, verify its health using curl:
curl http://localhost:8090/healthz
Expected Output:
OK
You can also run the unit tests to ensure the environment is correctly configured:
make test
Other install options
Docker Compose
If you prefer running with a managed PostgreSQL Configuration instance, use the provided Docker configuration:
docker compose up -d
Makefile
You can use the provided Makefile for standard Go operations:
make build
make run
Next steps
- Explore the Interacting with the Actions Service for Run and Task management.
- Check out the Flyte Documentation for high-level architecture.
- Learn how to configure PostgreSQL Configuration for production in
config-postgres.yaml.
Troubleshooting
Port already in use
If the service fails to start because port 8090 is taken, edit config.yaml to change the port:
runs:
server:
port: 8091
Database connection issues
- SQLite: Ensure the directory where
runs-serviceis executed is writable so theruns.dbfile can be created. - PostgreSQL: If using
config-postgres.yaml, verify your instance is reachable:pg_isready -h localhost -p 5433