Creating a Runbook
Create a custom runbook in Fleet Application Management by using the visual designer.
- Open the navigation menu and click Observability & Management. Under Fleet Application Management, click Actions and Controls.
- On the Runbooks tab, click Create runbook.
- On the Basic information page, enter a unique name and description for the runbook. Avoid entering confidential information.
- For Lifecycle operation, select a lifecycle operation for a fleet—for example, patch or discovery.
- For Runbook type, select whether the runbook is for a specific product or a product stack. Then, select the product stack or product.
- Select the type of OS on which the runbook runs and enter the estimated time in hours to complete the runbook execution.
- Select the Set as default runbook checkbox to let Fleet Application Management use this runbook as the default runbook for performing lifecycle operations.
- Click Next.
-
On the Streamline (Design runbook) page, select one of the following options:
- Design: Use the visual designer by dragging the components and configuring them. Skip to step 10.
- Source: Upload the runbook code in a YAML or JSON file. Skip to step 11.
-
If you selected Design for runbook creation, perform the following steps:
Important
To add a task, you must first add a parallel or rolling resource container. A task must be inside a container. To learn about using the visual designer, see Designing a Runbook with Visual Designer.-
From the Components tab of the actions pane, select a parallel resource container or a rolling resource container and drag it on the canvas. Add as many containers as you need.
- For parallel execution of runbook tasks across resources, select a parallel container. A parallel resource container is a placeholder for one or more tasks within it, or another parallel task container that runs several tasks on a target resource in parallel. For each task that's added to a parallel resource container, the list of tasks is run one after another on a specific resource but simultaneously across a list of resources.
- For sequential execution of runbook tasks, select a rolling resource container. A rolling resource container is a placeholder for one or more tasks where the list of tasks is run one after another on a specific resource. After the tasks are run successfully in the resource, the next task is run on another resource.
Tip
You can reorder components by using the drag handle icon () at the left corner of a component and dragging it to a different location on the runbook's work area. After you place a component onto the canvas, its code is automatically generated and added to the runbook's source. -
Select a new task and drag it to a resource container that you added. Enter details in the Create task panel. For instructions, see steps 4 to 17 in Creating a task using the Console. You can also add a predefined task by dragging it to a resource container.
- The tasks you create within the runbook are local to the runbook and can't be reused by other runbooks.
- The tasks library provides a list of reusable tasks that exist, or that you created. You can use the drag handle icon ( ) at the left corner of a task to drag it into the resource container. Tip
You can first create runbook tasks as needed and then add them to one or more runbooks later.
- To update the properties of a task, click the edit icon next to the task and then update the field values in the Edit task panel.
- After adding the required components, select a component that you want to configure, and then click the settings icon () to configure it by using the Properties tab.
- Enter a unique step name preferably based on its purpose. Avoid entering confidential information.
-
Under Container properties or Task properties, select one of the following actions from the On failure list to configure how automation can handle errors in the runbook's workflow:
Note
By default, when a runbook component reports an error, the Fleet Application Management automation stops the runbook's workflow entirely. This is because the default value for the On Failure property for all components is Abort.
- Abort: Stop the runbook's workflow entirely when the component execution fails. This action is set by default.
- Continue: Continue to the next step in the runbook workflow when the component execution fails.
- Rollback: Undo the change and return to the level at which the runbook component was initially.
- To build conditional statements for each runbook component by using the Condition option, see Configuring Conditional Statements using the Console.
- Configure Run on to allow a task to run conditionally only on certain components applicable to the product (as defined in the product metadata) on the resource. For instructions on how to add conditions, see Configuring Conditional Statements using the Console.
- Switch on the Pause execution toggle to halt or delay the running of tasks for a specific time until certain conditions are met. For example, you can choose to pause the running of a task for 60 minutes, indefinitely, or until you resume the task.
- To get notified when the task status changes, switch on the Notification toggle, and then select the activity of the task for which you want to be notified—for example, on pause, on task failure, or when the task succeeds.
- Configure the properties of the tasks that you add. For field description of task properties, see steps 4 to 17 in Creating a Task using the Console.
-
From the Components tab of the actions pane, select a parallel resource container or a rolling resource container and drag it on the canvas. Add as many containers as you need.
- If you selected Source for runbook creation in step 9, select whether you're using JSON or YAML and then click Upload runbook code to add the appropriate file.
- Click Next.
- On the Review page, verify the runbook information that you provided.
-
To save the runbook initially until you're sure of all the components, click Save as draft.
This draft version of the runbook isn't active, can't be used, and is marked as a draft.
-
To make the runbook usable after you're sure about all its tasks and streamline (sequence of execution), click Publish.
The published runbook can be used for discovery, application of patches, or rollback, and it has an active status.
Use the oci fleet-apps-management fleet-apps-management-runbooks runbook create command and required parameters to create a custom runbook:
oci fleet-apps-management fleet-apps-management-runbooks runbook create [OPTIONS]
For a complete list of flags and variable options for Fleet Application Management CLI commands, see the CLI for Fleet Application Management.
Run the CreateRunbook operation to create a custom runbook.