You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add devbox-based local development guide (#7294)
* docs: add devbox-based local development guide
Document how to run a full Flyte stack locally using `make devbox-build`,
`make devbox-run FLYTE_DEV=true`, and `make -C manager run`. Update
manager/README.md to reflect the current service set (no Queue/State
service), the PostgreSQL backend, and the actual API surface, and add a
matching "Running Flyte Locally" section to CONTRIBUTING.md.
Signed-off-by: Kevin Su <pingsutw@apache.org>
* nit
Signed-off-by: Kevin Su <pingsutw@apache.org>
* Update manager/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@gmail.com>
* Update manager/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@gmail.com>
* Update CONTRIBUTING.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@gmail.com>
* nit
Signed-off-by: Kevin Su <pingsutw@apache.org>
* nit
Signed-off-by: Kevin Su <pingsutw@apache.org>
---------
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Docker (for building and running the devbox image)
25
26
26
27
### Setting Up Your Environment
27
28
@@ -44,6 +45,87 @@ Before contributing, ensure you have:
44
45
make gen
45
46
```
46
47
48
+
## Running Flyte Locally
49
+
50
+
The fastest way to run a full Flyte stack on your machine is the bundled **devbox** — a k3d-based Kubernetes cluster with all dependencies (TaskAction CRD, Knative, PostgreSQL, etc.) pre-installed — combined with a locally-running `flyte-manager` binary.
51
+
52
+
### Start the Flyte Devbox
53
+
54
+
From the repo root:
55
+
56
+
```bash
57
+
# Build the devbox image (first time only, or after Dockerfile changes)
58
+
make devbox-build
59
+
60
+
# Start the devbox cluster in dev mode (required for running the manager locally)
61
+
make devbox-run FLYTE_DEV=true
62
+
63
+
# Stop the devbox when you're done
64
+
make devbox-stop
65
+
```
66
+
67
+
`FLYTE_DEV=true` is required when you intend to run the manager locally — it disables the in-cluster manager so your local process can take over. `make devbox-run` writes a kubeconfig pointing at the devbox cluster in global kubeconfig, so `kubectl` will target it automatically.
68
+
69
+
### Build and Run the Manager
70
+
71
+
With the devbox running, start the manager locally:
72
+
73
+
```bash
74
+
# From the repo root
75
+
make -C manager run
76
+
77
+
# Or from manager/
78
+
make run
79
+
80
+
# Or build and run the binary directly
81
+
cd manager
82
+
make build
83
+
./bin/flyte-manager --config config.yaml
84
+
```
85
+
86
+
The manager will:
87
+
1. Connect to PostgreSQL and run database migrations
88
+
2. Start all services in parallel goroutines
89
+
3. Connect to your Kubernetes cluster
90
+
4. Begin reconciling TaskAction CRs
91
+
92
+
### Configuration
93
+
94
+
Edit `manager/config.yaml`:
95
+
96
+
```yaml
97
+
manager:
98
+
# Single server port hosting all Connect services (Runs, Actions, DataProxy, Events, Cache, Secret, App).
99
+
server:
100
+
host: "0.0.0.0"
101
+
port: 8090
102
+
103
+
executor:
104
+
healthProbePort: 8081
105
+
106
+
kubernetes:
107
+
namespace: "flyte"
108
+
# Optional: specify custom kubeconfig path
109
+
# kubeconfig: "/path/to/kubeconfig"
110
+
111
+
runs:
112
+
storagePrefix: "s3://flyte-data"
113
+
database:
114
+
postgres:
115
+
host: "localhost"
116
+
port: 30001
117
+
dbname: "runs"
118
+
username: "postgres"
119
+
password: "postgres"
120
+
options: "sslmode=disable"
121
+
122
+
logger:
123
+
level: 4# Info level
124
+
show-source: true
125
+
```
126
+
127
+
See [`manager/README.md`](manager/README.md) for the full architecture, API endpoints, and troubleshooting tips.
6.**Executor** → Calls State Service Put() on each transition
147
-
7.**State Service** → Persists state updates to SQLite DB
148
-
8.**State Service** → Notifies watchers of state changes
48
+
1.**CreateRun** → Runs Service persists the run to PostgreSQL and calls `ActionsService.Enqueue(...)` to enqueue the root action
49
+
2.**Actions Service / Executor** → That enqueue flow results in the root TaskAction CR being created in Kubernetes, which the Executor then watches and reconciles
4.**Actions Service** → Watches TaskAction CRs via a shared informer and forwards status updates (phase, output URI, error state) to subscribers; sdk controller consumes these updates through `WatchForUpdates` to drive the run forward
52
+
5.**Runs Service** → Persists state changes to PostgreSQL and notifies its own watchers
0 commit comments