Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Everything the local dev stack uses. `mage dev:up <profiles>` wires these pieces
| `compose/stack.yaml` | Dependency containers: redis, postgres, pulsar, plus keycloak (`auth` profile) and prometheus (`prometheus` profile) |
| `compose/full.yaml` | Fully containerized Armada stack, used by `mage dev:full` and CI |
| `compose/postgres-init.sql` | Creates the scheduler and lookout databases when the postgres container first initialises |
| `procfiles/` | Goreman procfiles: `no-auth`, `auth`, `fake-executor`, each with a `-dap` (Delve debug) variant |
| `procfiles/` | Goreman procfiles: `no-auth`, `auth`, `fake-executor`, `auth-fake-executor`, each with a `-dap` (Delve debug) variant |
| `scripts/` | `init.sh` (migrations + priority classes) and helpers for port conflicts, dlv readiness, and pre-building components |
| `kind/` | Kind cluster config for running a real executor locally |
| `keycloak/` | Keycloak realm import for the `auth` profile |
Expand Down
8 changes: 8 additions & 0 deletions _local/procfiles/auth-fake-executor-dap.Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-server ./cmd/server/main.go && dlv dap --listen=:2345
scheduler: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-scheduler ./cmd/scheduler/main.go && dlv dap --listen=:2346
scheduleringester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-scheduleringester ./cmd/scheduleringester/main.go && dlv dap --listen=:2347
eventingester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-eventingester ./cmd/eventingester/main.go && dlv dap --listen=:2348
fakeexecutor: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-fakeexecutor ./cmd/fakeexecutor/main.go && dlv dap --listen=:2353
lookout: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-lookout ./cmd/lookout/main.go && dlv dap --listen=:2350
lookoutingester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-lookoutingester ./cmd/lookoutingester/main.go && dlv dap --listen=:2351
binoculars: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-binoculars ./cmd/binoculars/main.go && dlv dap --listen=:2352
9 changes: 9 additions & 0 deletions _local/procfiles/auth-fake-executor.Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-server ./cmd/server/main.go && ./dist/armada-server --config ./_local/server/config-auth.yaml
scheduler: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-scheduler ./cmd/scheduler/main.go && ./dist/armada-scheduler run --config ./_local/scheduler/config-auth.yaml
scheduleringester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-scheduleringester ./cmd/scheduleringester/main.go && ./dist/armada-scheduleringester --config ./_local/scheduleringester/config.yaml
eventingester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-eventingester ./cmd/eventingester/main.go && ./dist/armada-eventingester --config ./_local/eventingester/config.yaml
fakeexecutor: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-fakeexecutor ./cmd/fakeexecutor/main.go && ./dist/armada-fakeexecutor --config ./_local/fakeexecutor/config.yaml
lookout: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-lookout ./cmd/lookout/main.go && ./dist/armada-lookout --config ./_local/lookout/config-auth.yaml
lookoutingester: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-lookoutingester ./cmd/lookoutingester/main.go && ./dist/armada-lookoutingester --config ./_local/lookoutingester/config.yaml
binoculars: ${GO_BIN:-go} build -gcflags="all=-N -l" -o ./dist/armada-binoculars ./cmd/binoculars/main.go && ./dist/armada-binoculars --config ./_local/binoculars/config-auth.yaml
lookoutui: sh -c 'cd internal/lookoutui && yarn install && yarn run openapi && PROXY_TARGET=http://localhost:8089 yarn dev'
3 changes: 2 additions & 1 deletion docs/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Two smaller targets support these: `mage dev:deps` runs only the dependency cont

The `no-auth` and `auth` profiles run a real executor, which needs a Kubernetes cluster. Create one with `mage kind`, which writes its kubeconfig to `.kube/external/config`, and start the stack with `KUBECONFIG=.kube/external/config mage dev:up no-auth`. Without `KUBECONFIG` set, the executor falls back to your default kubeconfig and connects to whatever cluster that selects. Use the `fake-executor` profile if you do not want a cluster at all.

The profile argument is required and is a comma-separated list of tokens: `no-auth`, `auth`, `fake-executor`, and `hot-cold` pick the procfile, and any other token (for example `prometheus`) is passed to docker compose as a `--profile` flag. The optional `-dap` flag starts every component under a headless [Delve](https://github.com/go-delve/delve) DAP server so your editor can attach a debugger, e.g. `mage dev:up auth,prometheus -dap`.
The profile argument is required and is a comma-separated list of tokens: `no-auth`, `auth`, `fake-executor`, `auth-fake-executor`, and `hot-cold` pick the procfile, and any other token (for example `prometheus`) is passed to docker compose as a `--profile` flag. Use `auth-fake-executor` to run the OIDC-enabled server without a Kubernetes cluster. The optional `-dap` flag starts every component under a headless [Delve](https://github.com/go-delve/delve) DAP server so your editor can attach a debugger, e.g. `mage dev:up auth,prometheus -dap`.

If `mage dev:up no-auth` reports `Unknown target`, your mage binary is too old for optional flags (`mage checkDeps` verifies this). Upgrade it, or use `go run github.com/magefile/mage@v1.17.2 <target>`, which also works without installing mage at all.

Expand Down Expand Up @@ -140,6 +140,7 @@ All Procfiles are located in `_local/procfiles/`:
| `no-auth.Procfile` | Standard setup without authentication |
| `auth.Procfile` | Standard setup with OIDC authentication |
| `fake-executor.Procfile` | Uses fake executor for testing without Kubernetes |
| `auth-fake-executor.Procfile` | OIDC authentication with the fake executor, no Kubernetes |
| `hot-cold.Procfile` | Runs the parallel hot/cold Lookout stack |

Each profile also has a `-dap` variant, described under [Debugging](#debugging). Restart individual processes with `goreman restart <component>` (e.g., `goreman restart server`).
Expand Down
19 changes: 10 additions & 9 deletions magefiles/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ const (
// Up brings up dependencies and runs Armada components via goreman with the chosen profile.
//
// profiles is a comma-separated list of tokens:
// - "no-auth" - the default profile
// - "auth" - enables OIDC (Keycloak); sets goreman profile to "auth" and uses the auth compose profile
// - "fake-executor" - no Kubernetes needed; sets goreman profile to "fake-executor"
// - "hot-cold" - runs the hot-cold scheduler setup
// - anything else - forwarded as a docker-compose --profile flag for extra services
// - "no-auth" - the default profile
// - "auth" - enables OIDC (Keycloak); sets goreman profile to "auth" and uses the auth compose profile
// - "fake-executor" - no Kubernetes needed; sets goreman profile to "fake-executor"
// - "auth-fake-executor" - auth server/scheduler/lookout/binoculars plus the fake executor (no Kubernetes)
// - "hot-cold" - runs the hot-cold scheduler setup
// - anything else - forwarded as a docker-compose --profile flag for extra services
//
// The optional -dap flag selects the "-dap" procfile variant, which starts each component
// under dlv in headless DAP mode so an editor debugger can attach.
Expand Down Expand Up @@ -62,9 +63,9 @@ func (Dev) Up(profiles string, dap *bool) error {
continue
}
switch token {
case "auth", "fake-executor", "hot-cold":
case "auth", "fake-executor", "hot-cold", "auth-fake-executor":
Comment thread
greptile-apps[bot] marked this conversation as resolved.
if profile != "no-auth" {
fmt.Printf("warning: ignoring %q - profile already set to %q; only one of auth/fake-executor/hot-cold may be used\n", token, profile)
fmt.Printf("warning: ignoring %q - profile already set to %q; only one of auth/fake-executor/hot-cold/auth-fake-executor may be used\n", token, profile)
} else {
profile = token
}
Expand All @@ -84,7 +85,7 @@ func (Dev) Up(profiles string, dap *bool) error {
return fmt.Errorf("unknown profile %q: %s not found", profile+debugSuffix, procfile)
}

if profile == "auth" {
if profile == "auth" || profile == "auth-fake-executor" {
composeProfiles = append([]string{"auth"}, composeProfiles...)
}

Expand All @@ -99,7 +100,7 @@ func (Dev) Up(profiles string, dap *bool) error {
if err := sh.RunV(initArgs[0], initArgs[1:]...); err != nil {
return err
}
if profile == "auth" {
if profile == "auth" || profile == "auth-fake-executor" {
if err := waitForKeycloak(2 * time.Minute); err != nil {
return err
}
Expand Down
Loading