Transactions and Orchestration
rauto provides three increasingly powerful execution layers:
txtx-workfloworchestrate
These are not replacements for one another. They scale from single-target transaction blocks to multi-target, multi-stage orchestration.
tx: single-target transaction block
Section titled “tx: single-target transaction block”rauto tx is best for a compact, rollback-aware unit of change on a single target.
Command mode
Section titled “Command mode”rauto tx \ --name vlan-change \ --command "vlan 120" \ --command "name campus-users" \ --rollback-command "no vlan 120" \ --rollback-command "default name" \ --rollback-on-failure \ --mode Config \ --connection core-01Best for:
- a small number of steps
- explicit rollback commands
- cases where a full workflow JSON would be unnecessary
Command-flow mode
Section titled “Command-flow mode”tx can also run a command flow as the transaction step itself:
rauto tx \ --run-kind command-flow \ --flow-template cisco_like_copy \ --flow-vars ./flow-vars.json \ --rollback-flow-file ./rollback-flow.toml \ --connection core-01Best for:
- changes where the step itself is interactive
- cases where both forward and rollback paths are more than static commands
Additional source-backed tx controls include:
--rollback-commands-filefor one rollback command per line--rollback-commands-jsonfor a JSON string array of rollback commands--rollback-trigger-step-indexfor whole-resource rollback trigger selection--resource-rollback-commandfor explicit whole-resource rollback behavior--jsonfor machine-readable execution output
This matters in enterprise use because teams often evolve from a few explicit rollback commands into externally reviewed rollback artifacts.
tx-workflow: structured transaction workflow
Section titled “tx-workflow: structured transaction workflow”When a change grows beyond “a short list of steps” and starts needing multiple blocks or different rollback policies, tx-workflow is usually the better choice.
rauto tx-workflow ./workflow.json --viewrauto tx-workflow ./workflow.json --dry-runrauto tx-workflow ./workflow.json --connection core-01A typical workflow shape
Section titled “A typical workflow shape”{ "name": "campus-core-vlan", "fail_fast": true, "blocks": [ { "name": "create-vlan", "rollback_policy": "per_step" }, { "name": "create-svi", "rollback_policy": { "whole_resource": { "rollback": { "kind": "command", "mode": "Config", "command": "default interface vlan 120" } } } } ]}Best for:
- splitting a change into named blocks
- using different rollback strategies per block
- maintaining the process as a reusable JSON artifact
The current README also emphasizes that tx-workflow is not limited to raw files forever. Workflows can evolve into reusable execution templates and Web-delivered payloads after the structure stabilizes.
orchestrate: multi-device, multi-stage orchestration
Section titled “orchestrate: multi-device, multi-stage orchestration”Once the target expands from one device to a fleet, move to rauto orchestrate.
rauto orchestrate ./orchestration.json --viewrauto orchestrate ./orchestration.json --dry-runrauto orchestrate ./orchestration.json --record-level fullA typical orchestration shape
Section titled “A typical orchestration shape”{ "name": "campus-vlan-rollout", "fail_fast": true, "rollback_on_stage_failure": true, "stages": [ { "name": "core", "strategy": "serial" }, { "name": "access", "strategy": "serial" } ]}Orchestration introduces these core concepts:
stagefor major rollout phasesjobfor executable units inside a stagetargets/target_groupsfor execution scopestrategyfor serial vs parallel behaviormax_parallelfor concurrency capsactionfor the actual execution type, such astx_blockortx_workflow
The README additionally documents:
rollback_completed_stages_on_failurefor compensating successful targets from already-completed earlier stages when a later stage fails- inline
targetswith per-target vars inventory_fileand inline inventory structures for group-based targeting- action source modes for both
tx_blockandtx_workflow
Action source modes in orchestration
Section titled “Action source modes in orchestration”For tx_block jobs, the current README documents two main source patterns:
- command mode (
template/commands+vars) - tx block template mode (
tx_block_template_name/tx_block_template_content+tx_block_template_vars)
For tx_workflow jobs, the current README documents four mutually exclusive source modes:
workflow_file- inline
workflow workflow_template_nameworkflow_template_contentwithworkflow_vars
This is a major enterprise-facing capability because it allows orchestration to consume either local files, reviewed inline payloads, or centrally governed reusable templates.
How to choose between them
Section titled “How to choose between them”| Scenario | Recommended layer |
|---|---|
| Single target, few steps, needs rollback | tx |
| Single target, block-based, more complex flow | tx-workflow |
| Multiple devices, multiple stages, concurrency control | orchestrate |
Why --dry-run and --view matter
Section titled “Why --dry-run and --view matter”For all three layers, validate first with:
--viewto inspect the structured plan--dry-runto print the plan without executing it--jsonto produce raw JSON or structured output for integration
This is a strong habit to keep for production change control.
Relation to inventory and saved connections
Section titled “Relation to inventory and saved connections”During multi-device execution, orchestrate usually works together with:
- saved connections
- groups
- inventory defaults and group defaults
- runtime variables
The repository examples show both styles:
- direct
targetslists for smaller plans target_groupsplusinventory_filefor larger staged delivery
This is also why rauto becomes more useful as an execution foundation rather than just a simple command sender.
Example families to study
Section titled “Example families to study”The repository ships examples that are worth treating as documentation artifacts, not just test assets:
core-vlan-workflow.jsonfabric-change-workflow.jsoncampus-vlan-orchestration.jsoncampus-inventory.jsonfabric-advanced-orchestration.jsonfabric-advanced-inventory.jsonlinux-image-rollout-orchestration.jsonlinux-image-export-and-transfer-workflow.jsonlinux-image-export-and-transfer-with-password-scp-workflow.jsonlinux-image-load-and-restart-workflow.json
For a cataloged view of these, continue with Example Library.
If you want to understand how those underlying data sources are stored and merged, continue with Runtime Data and Configuration.