AIOps

 View Only

Workflows in Runbooks with Gateway Automations

By Sebastian Wegmann posted Tue June 30, 2020 06:17 AM

  

With the help of Multi Target Automations and some clever ideas how to use them, it is possible to develop more complex runbooks and runbook workflows than ever before. In this blog posting we will show the concept and some example implementations.

Gateway Automations

With our newly introduced Multi Target Automations (MTA) a lot of concepts are possible in CEM/RBA. On itself MTAs are useful to execute the same automation on a list of target endpoints. A common example is patching an application on multiple systems with one execution of a runbook.

Gateway Automation is a concept of an automation that dynamically calculates the target list for another automation in a following step of the runbook. Typically a Gateway Automation does three things:

  1. Parse the output of an automation from a previous runbook step.
  2. Compare the content of the output with a condition.
  3. Create a target list as output, which can be used directly as input of an MTA.

Due to Gateway Automations using the behaviour of Multi Target Automations, it is possible to execute the follow-u automation on any numbers of targets, including the option to not execute it at all. This allows you to introduce conditional executions and branches in the workflows of your runbooks.

Example: Condition Gateway

After explaining the concept let’s get down to business and do some real work here. We will start with the Condition Gateway concept. It is easiest to understand and we will get more sophisticated in the following examples.

Goal: Run an automation. Then parse the output and run a follow up automation only, if our condition is fulfilled.

The Shape of the Runbook

Step 1: In the first step we run the first automation. This automation runs on a system. It produces a special kind of output: If we need a follow up action, it will print the eye-catcher: “~~~ Follow up required ~~~”.

Step 2: Afterwards we run the Condition Automation. It uses AutomationOutput from Step 1 as an input parameter and may run anywhere. We suggest to run it directly on the RBA server or the jump server, using “localhost” as the fixed value for target. The Condition Automation parses the automation output and looks for the eye-catcher. If found, it will create one line of output with the hostname. If not, it will create one line of output with [].

Step 3: Finally in the last step a third automation is run. It uses the automation output of step 2 as the target parameter. Depending on the previous result, it will either run on the desired hostname or be skipped.

A diagram showing the workflow of the Condition Automation example
Condition Automation Diagram

Example: Success Gateway

The Success Gateway is a natural evolution of the Condition Gateway. The Condition Gateway offers two choices: Execute or do not execute. The Success Gateway uses the well defined output of Multi Target Automations to handle multiple scenarios. In our example we want to apply a software update. Successful indicates a success, unsuccessful indicates we need to employ a special procedure. Failure means we need manual intervention. In each case we want to execute the correct follow up action.

Goal: Execute a Multi Target Automation. Use the standardized successful, unsuccessful, and failure output to perform follow up actions accordingly.

The Runbook

Step 1: Execute a Multi Target Automation to perform the software update. The script will distinguish the scenarios according to our description.

Step 2: Run the Success Gateway and capture the endpoints where the script was successful, unsuccessful, or failed.

Step 3: This manual step contains the information from step 2, where the script failed. It contains instructions for the operator to remedy the problems on the system.

Step 4: A Multi Target Automation uses the output from step 1 as the target list, where the script was unsuccessful. It runs a special workaround procedure to apply the patch anyway.

Diagram of the workflow of the Success Gateway example
Success Gateway Diagram

Ready to use Presentation

You can also download an additional presentation, which explains the concept and has some examples in it:
2018-6-IBM-RBA-GW_Automations_Ovw.pdf







0 comments
21 views

Permalink