Use > Sequenced Designs > Resource Offerings > Resource offerings tabs > Lifecycle actions for resource offerings

Lifecycle actions for resource offerings

A resource offering lifecycle is a collection of actions defined for a resource offering. The Lifecycle area allows you to specify the actions that are needed to provision, update, and deprovision resource offerings. Use the action selection wizard to add a lifecycle action to a resource offering from one of the available process engines.

Lifecycle actions

A lifecycle action is a function that is either run automatically at a specified lifecycle stage or phase, or that is exposed to the subscriber. Most lifecycle actions correspond to OO flows, which contain the logic for executing the function. CSA also includes actions that run internal to CSA. Many CSA internal actions relate to provider and pool selection and resource accounting. Actions include input parameters that provide configuration information to the function.

Lifecycle stages

A lifecycle stage represents a step within the CSA service lifecycle. There are three categories of lifecycle stages: Provisioning, Operational, and De-provisioning.

The Provisioning lifecycle stages are:

  • Initializing — Initializing is the first stage that is processed during provisioning. Use the Initializing stage for actions that perform any type of initialization that is required before proceeding to the Reserving stage, such as actions that perform input validation or create change request records.
  • Reserving—Reserving is the second stage that is processed during provisioning, after the Initializing stage. When a resource offering is associated to a service component, any configured provider selection and pool selection actions run during the Reserving stage. If resource accounting is enabled, actions to reserve resources from a pool run during the Reserving stage. In general, any resources needed during provisioning, such as storage or networking, can be reserved during the Reserving stage.
  • Deploying—Deploying is the final stage that is processed during provisioning, after the Initializing and Reserving stages, and is the most common stage in which provisioning actions are defined. Define actions in the Initializing and Reserving stages to prepare the environment for provisioning. Define actions in the Deploying stage to perform actual provisioning. For example, you can define actions that deploy a VM or an application in the Deploying stage.

The Operational lifecycle stages are:

  • Modifying—The Modifying stage is processed when a subscription modification request is received from a subscriber and that modification results in a change to property values on a service component. Modifying actions run on any impacted service components and their associated resource offerings at this time. Define actions that are needed to process this change in property values in the Modifying stage.
  • Upgrading—The Upgrading stage is processed when a request is received to upgrade a service instance to a newer version of a service offering and design. Define actions in the Upgrading stage for a service component or resource offering based on the manner in which the service component or resource offering will be used in a design in an upgrade path. For more information, see the online help.

    If a service component will be added to a design in an upgrade path, you do not need to define Upgrading actions. The standard Initializing, Reserving, and Deploying lifecycle will be followed for the service component. If a service component will replace a service component that existed in the previous version of the design, the previously-existing service component will have already been provisioned. In this scenario, define actions in the Upgrading stage that perform any additional provisioning required for the new service component.

    If a resource offering will be added to a service component that has been newly added to a design in an upgrade path, you do not need to define Upgrading actions. The standard Initializing, Reserving, and Deploying lifecycle will be followed for the resource offering. If a resource offering will be added to a service component that existed in the previous version of the design, define actions in the Upgrading stage that perform the complete provisioning of the resource offering, including all actions that are normally defined in the Initializing, Reserving, and Deploying stages. If a resource offering will replace a resource offering that existed in the previous version of the design, the previously-existing resource offering will have already been provisioned. In this scenario, define actions in the Upgrading stage that perform any additional provisioning required for the new resource offering.

    Note: A resource offering can also be associated to a service component that is replacing a service component that existed in the previous version of the design. If the resource offering did not exist in the service component that is being replaced, define actions in the Upgrading stage that perform the complete provisioning of the resource offering, including all actions that are normally defined in the Initializing, Reserving, and Deploying stages. If the resource offering existed in the service component that will be replaced, the previously-existing resource offering will have already been provisioned. In this scenario, define actions in the Upgrading stage that perform any additional provisioning required for the new resource offering.

The De-provisioning lifecycle stages are:

  • Un-deploying — Un-deploying is the first stage that is processed during de-provisioning and is the most common stage in which de-provisioning actions are defined. Use the Un-deploying stage to undo or to finalize the actions that took place during the Deploying stage. For example, if actions in the Deploying stage deploy a VM, define actions in the Un-deploying stage to un-deploy the VM.
  • Un-reserving — Un-reserving is the second stage that is processed during de-provisioning, after the Un-deploying stage. Use the Un-reserving stage to undo or to finalize the actions that took place during the Reserving stage. For example, if resource accounting is enabled, actions to return resources to the pool run during the Un-reserving stage.
  • Un-initializing — Un-initializing is the final stage that is processed during de-provisioning, after the Un-deploying and Un-reserving stages. Use the Un-initializing stage to undo or to finalize the actions that took place during the Initializing stage. For example, if actions in the Initializing stage create a change request, define actions in the Un-initializing stage to finalize that change request.

Lifecycle phases

A lifecycle phase is a further refinement of a lifecycle stage. When defining a lifecycle action at a lifecycle stage, you can also specify the phase for the action. The phases are:

  • Before— Actions configured in the Before phase on a service component run before all actions on child service components in a design and before all actions on any associated resource offerings. Actions configured in the Before phase on a resource offering run after all of the Before actions on the associated service component have completed.
  • During— Actions configured in the During phase on a service component run after all of the actions have completed on child service components in a design but before any of the During actions run on any associated resource offerings. Actions configured in the During phase on a resource offering run after all of the During actions on the associated service component have completed.
  • After— Actions configured in the After phase on a service component run after all actions have completed on child service components and after all of the During actions have completed on the service component and any associated resource offerings. Actions configured in the After phase on a resource offering run after all of the After actions on the associated service component have completed.
  • On Failure — Actions configured in the On Failure phase on a service component or resource offering run after an action failure occurs in any of the Before, During, or After phases for that service component or resource offering. On Failure actions are not run if the Organization has been configured to Pause Subscriptions on Provisioning Errors.

Tasks

  • Navigate to (the Lifecycle tab) — In the left pane of the Resource Offerings area, select the category or provider type associated with the resource offering you want to view. Select the resource offering and then select the Lifecycle tab.
  • Add Action — Click the Add Action or Add More Actions link in the stage and phase to which you want to add an action. Enter the information as described in Lifecycle Action Selection Wizard.
  • Edit Action — Click the gear icon on the action you want to edit and select Edit. Update the information as described in Lifecycle Action Selection Wizard.
  • Delete Action — Click the gear icon next to the action you want to delete and select Delete. You can also delete an action that is in a group.
  • Move Action — Select the gear icon on the action or group of actions you want to move to another stage or phase and select Move. In the Move dialog, select the Target Stage and Target Phase from the pull-down menus and then click Move. You can also click and drag to move an action or group of actions. To move an action or group of actions using the keyboard, press the tab key to provide focus on the action or group and then press Ctrl and the up or down keys to move the action or group within a phase.
  • Group Actions — Click to select multiple actions in a lifecycle phase and then click Group Actions to create a parallel execution group. Actions in a parallel execution group are executed at the same time.
  • Ungroup Actions — Click the gear icon next to an action in a group and then select Remove from Group.
  • View Lifecycle Stages — The Deploying Provisioning stage, the Modifying Operational stage, the Un-deploying De-provisioning stage, and any stage that has an action, are displayed by default. Select a filter from the All Selected Stages pull-down menu to display only Provisioning Stages, Operational Stages, or De-provisioning stages. Click Select Stages to view additional stages.
  • View Lifecycle Phases — The During and On Failure phases are displayed by default. Select Show All Phases to display the Before and After phases.