Stage¶
A Stage groups a set of tasks together with an optional boot environment and profiles, forming a logical unit of work within a provisioning pipeline. Stages are the building blocks of Workflow objects, which chain multiple stages together to define complete machine lifecycle sequences.
Each Stage contains an ordered list of tasks in the Tasks field. Task entries support several prefixes that modify execution behavior: task: for explicit task references, action: for plugin actions (formatted as action:plugin:action), chroot: for chroot-based execution, bootenv: for inline boot environment changes, context: for execution context switches, and stage: for stage references. These prefixes allow stages to orchestrate complex multi-step operations without requiring separate stage definitions for each step.
When a Stage specifies a non-empty BootEnv, any machine entering that stage will automatically have its boot environment changed. The Reboot flag controls whether the machine should be PXE rebooted on transition into the stage. Stages also define RequiredParams, OptionalParams, and OutputParams to declare their parameter dependencies and outputs, enabling validation of the parameter chain before execution begins.
Stages carry their own Profiles and Params fields, allowing them to inject configuration into the parameter resolution chain. They may also provide rendered templates that are available while a Machine, Cluster, or Resource Broker is in that stage. Stages are contained within Workflow objects and reference BootEnv and Tasks objects.
Metadata¶
| Field | Description | Value |
|---|---|---|
workflow |
UX helper points back to the workflow using this stage. | |
phase |
UX helper to identify the phase of the work. | base, pre, mid, post |
action |
UX helper to identify to type of work. | classification, validation, flexiflow |
Fields¶
| Field | Definition |
|---|---|
| BootEnv | The BootEnv the machine should be in to run this stage. If the machine is not in this bootenv, the bootenv of the machine will be changed. required: true |
| Description | Description is a string for providing a simple description |
| Documentation | Documentation is a string for providing additional in depth information. |
| Meta | Meta contains the meta data of the object. The type of this field is a key / value map/dictionary. The key type is string. The value type is also string. The general content of the field is undefined and can be an arbritary store. There are some common known keys: color - The color the UX uses when displaying icon - The icon the UX uses when displaying * title - The UX uses this for additional display information. Often the source of the object. Specific Object types use additional meta data fields. These are described at: https://docs.rackn.io/stable/redirect/?ref=rs_object_metadata |
| Name | The name of the stage. required: true |
| OptionalParams | The list of extra optional parameters for this stage. They can be present as Machine.Params when the stage is applied to the machine. These are more other consumers of the stage to know what parameters could additionally be applied to the stage by the renderer based upon the Machine.Params |
| OutputParams | OutputParams are that parameters that are possibly set by the Task |
| Params | Params holds the values of parameters on the object. The field is a key / value store of the parameters. The key is the name of a parameter. The key is of type string. The value is the value of the parameter. The type of the value is defined by the parameter object. If the key doesn't reference a parameter, the type of the object can be anything. The system will enforce the named parameter's value's type. Go calls the "anything" parameters as "interface {}". Hence, the type of this field is a map[string]interface{}. |
| Profiles | Profiles is an array of profiles to apply to this object in order when looking for a parameter during rendering. |
| Reboot | Flag to indicate if a node should be PXE booted on this transition into this Stage. The nextbootpxe and reboot machine actions will be called if present and Reboot is true |
| RequiredParams | The list of extra required parameters for this stage. They should be present as Machine.Params when the stage is applied to the machine. required: true |
| RunnerWait | This flag is deprecated and will always be TRUE. |
| Tasks | The list of initial machine tasks that the stage should run |
| Templates | The templates that should be expanded into files for the stage. required: true |
| Templates/Contents | Contents that should be used when this template needs to be expanded. Either this or ID should be set. required: false |
| Templates/EndDelimiter | EndDelimiter is an optional end delimiter. required: false |
| Templates/ID | ID of the template that should be expanded. Either this or Contents should be set required: false |
| Templates/Link | Link optionally references another file to put at the path location. |
| Templates/Meta | Meta for the TemplateInfo. This can be used by the job running system and the bootenvs to handle OS, arch, and firmware differences. required: false |
| Templates/Name | Name of the template required: true |
| Templates/Path | A text/template that specifies how to create the final path the template should be written to. required: true |
| Templates/StartDelimiter | StartDelimiter is an optional start delimiter. required: false |