Skip to content

Execution Modes

glidesh supports two execution modes that control how steps are coordinated across hosts.

All hosts execute the same step together. A barrier between steps ensures every host finishes step N before any host starts step N+1.

plan "rolling-deploy" {
target "web"
mode "sync"
step "Stop service" {
systemd "myapp" { state "stopped" }
}
step "Deploy binary" {
file "/opt/myapp/bin" { src "build/myapp" }
}
step "Start service" {
systemd "myapp" { state "started" }
}
}

Use sync mode when cross-host ordering matters — for example, database migrations before application deploys.

Each host runs the entire plan independently at its own pace. There are no barriers between steps across hosts.

plan "update-packages" {
target "all"
mode "async"
step "Update system" {
shell "apt-get update && apt-get upgrade -y"
}
}

Use async mode when steps are independent across hosts — typically faster for large fleets.

In the plan file:

plan "example" {
mode "async"
// ...
}

Or override on the CLI:

Terminal window
glidesh run -i inventory.kdl -p plan.kdl -m async

The CLI flag takes precedence over the plan file.

By default, glidesh runs up to 10 hosts concurrently. Adjust with --concurrency:

Terminal window
glidesh run -i inventory.kdl -p plan.kdl --concurrency 50

Each host gets its own async task, bounded by a semaphore. Within a single host, steps always run sequentially.