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
rauto tx is best for a compact, rollback-aware unit of change on a single target.
Command mode
Best for:
- a small number of steps
- explicit rollback commands
- cases where a full workflow JSON would be unnecessary
Command-flow mode
tx can also run a command flow as the transaction step itself:
Best 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
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.
A typical workflow shape
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
Once the target expands from one device to a fleet, move to rauto orchestrate.
A typical orchestration shape
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
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
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
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
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.