Triggering Lifecycle Manager Actions
  • 05 Dec 2024
  • Dark
    Light
  • PDF

Triggering Lifecycle Manager Actions

  • Dark
    Light
  • PDF

Article summary

Although they most commonly trigger workflow execution, automations can be used in conjunction with many other platform assets, including Lifecycle Manager (LCM) actions.

On this page, learn:

  • Why LCM actions benefit from automation.
  • How to automate LCM actions.

Prerequisite Reading

Ensure you are familiar with the following concepts before proceeding:

Why Automate LCM Actions?

LCM update actions are used to affect changes to instance properties; therefore, a case for automation can be made whenever a predictable circumstance, such as a scheduled time or an API request, requires that changes be made to these properties.

Example – Automation Use Case

Organization A has decided to manage its network intrusion detection system (NIDS) via LCM. It has created the following resource model and an accompanying instance to represent the NIDS:

{
    "$id": "docs-nids",
    "description": "Schema defining the possible values within instances of resource model 'docs-nids'",
    "type": "object",
    "required": ["hostname","ipv4"],
    "additionalProperties": true,
    "properties": {
        "hostname": {
            "type": "string"
        },
        "ipv4": {
            "type": "string",
            "format": "ipv4"
        },
        "definitionsLastUpdated": {
            "type": "string",
            "format": "date-time"
        }
    }
}

Updates to the NIDS library of attack definitions are published daily by the software developer. Organization A has developed an update action that checks the developer's website for these definitions and, if present, downloads them to the NIDS, updating the definitionsLastUpdated property in turn. Due to the repetitive nature of this action, Organization A has decided to assign it to an automation, from which it will be executed by schedule trigger.

ⓘ Note:

Automations also support LCM delete actions. For example, a delete action could be used to remove unwanted resource instances in response to an IAP system event.

Creating a Lifecycle Automation

To begin automating LCM actions, you must first create a Lifecycle automation. These, like all automations, are created from the Operations Manager home page:

  1. Click the Create + button located at the top of the side navigation menu. The Create Automation modal will open.

  2. Select Lifecycle from the automation type drop-down menu.

  3. Enter a name and description for the automation into the relevant fields.

  4. Click the Create button located at the bottom-left corner of the modal. You will be redirected to your newly created automation.

    Figure 1: Create Automation Modal
    Create Automation Modal

  5. Select the LCM resource to be automated from the Resource drop-down menu.

  6. Click the Save Changes button located at the bottom-left corner of the Automation Properties panel.

Figure 2: Lifecycle Automation
Lifecycle Automation


ⓘ Note:

Lifecycle automations are denoted on the side navigation menu by the Run ► icon.

Figure 3: Operations Manager Side Navigation Menu
Operations Manager Side Navigation Menu

Adding Triggers to a Lifecycle Automation

Lifecycle triggers generally follow the same conventions as workflow triggers, with a few notable exceptions.

Action and Target Selection

Each trigger type is used to run the actions of the selected resource against that same resource's instances or instance groups. You must choose what action will be executed via the Action drop-down menu on the Create Trigger panel.

Figure 4: Action Drop-down Menu
Action Drop-down Menu

Similarly, you must designate a target instance or instance group for the trigger. The different trigger types have varying levels of flexibility in how they handle targeting:

  • Schedule and event triggers must have their target pre-determined as part of their configuration. This target will not change unless the trigger is later edited, or something to that effect..
  • Manual and API triggers can select their target at runtime. To do this, toggle the Choose target at runtime switch on the Create Trigger panel. When enabled:
    • Manual triggers will prompt you to supply your target information via the Run Automation panel.
    • API triggers must query the desired target directly via the targetType and targetIdentifier parameters; see the note below for more information.

Figure 5: Choose Target at Runtime
Choose Target at Runtime

ⓘ Note:

API triggers using runtime targeting are dependent on the following query parameters to function:

Query parameter Data type Description
targetType String The type of target. Valid values are instance and group.
targetIdentifier String The target instance or group's identifier. Identifiers can be discovered by making a GET request to the getResourceInstancesHttp or getInstanceGroupsHttp endpoints, respectively.

Example request
POST {iap_server}/operations-manager/triggers/endpoint/{route_name}?targetType=instance&targetIdentifier=665a42a06103515d676bae41

For more information, refer to the Itential API Reference site.

Input Forms (Manual and Schedule Triggers)

By default, lifecycle automations derive user input forms from the model of their associated resource. If you do not wish to use an LCM-derived input form, pre-constructed forms can be selected as normal.

Figure 6: Action Form from Lifecycle Manager
Action Form from Lifecycle Manager

Trigger Cards

Lifecycle trigger cards contain the following additional properties:

Property Description
Action The LCM action that the trigger executes.
Target Type The type of target that the action is executed against. Possible values are Instance, Group, and Provided at runtime.

Figure 7: Lifecycle Trigger Card
Lifecycle Trigger Card


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.