A Rust implementation of Stack Up - a simple deployment tool that performs given set of commands on multiple hosts in parallel. It reads Supfile, a YAML configuration file, which defines networks (groups of hosts), commands and targets.
cargo install --path .sup-rs [OPTIONS] NETWORK COMMAND [...]| Option | Description |
|---|---|
-f Supfile |
Custom path to Supfile |
-e, --env=[] |
Set environment variables |
--only REGEXP |
Filter hosts matching regexp |
--except REGEXP |
Filter out hosts matching regexp |
--debug, -D |
Enable debug/verbose mode |
--disable-prefix |
Disable hostname prefix |
--help, -h |
Show help/usage |
--version, -v |
Print version |
- Execute commands on multiple hosts in parallel
- Interactive SSH sessions
- File uploads using tar
- Serial execution (rolling updates)
- Once-only execution
- Local command execution
- Script execution
- Environment variables
- Host filtering
- Target aliases
The following environment variables are automatically available in your Supfile:
$SUP_HOST- Current host$SUP_NETWORK- Current network$SUP_USER- User who invoked sup command$SUP_TIME- Date/time of sup command invocation
See example_simple.yml for a basic example and example_full.yml for a comprehensive example with all features.
- Run an interactive bash session:
sup-rs -f example_simple.yml dev bash- Run a command on all hosts:
sup-rs -f example_simple.yml dev ping- Upload files:
sup-rs -f example_simple.yml dev upload- Run a rolling update (2 hosts at a time):
sup-rs -f example_full.yml prod rolling-update- Run on specific hosts only:
sup-rs -f example_full.yml prod ping --only "api.*"- Run with environment variables:
sup-rs -f example_full.yml prod deploy -e VERSION=v1.2.3,ENV=prodIf you encounter SSH connection issues:
- Ensure your SSH agent is running:
eval $(ssh-agent)- Add your SSH key:
ssh-add ~/.ssh/id_rsa- Test direct SSH connection:
ssh user@host- Clone the repository
- Run tests:
cargo test- Build:
cargo build --releaseLicensed under the MIT License.