Chapter 41. Service Retirement

We saw in Chapter 40 how individual virtual machines or instances can be retired from their Lifecycle menu button, and we can also retire services in the same way. The service retirement process follows a similar workflow to the VM retirement process, but we have the flexibility to specify per-service retirement state machines if we wish.

Defining a Service Retirement Entry Point

When we create a service catalog item, we can optionally specify a retirement entry point (see Figure 41-1).

mcla 4101
Figure 41-1. Setting a service retirement entry point state machine

If we specify our own retirement entry point, then this state machine will be used to retire any services created from this catalog item. If we do not specify our own entry point here, then then the Default retirement state machine will be used.

Initiating Retirement

Service retirement is initiated from the Lifecycle menu on the service details frame (see Figure 41-2).

mcla 4102
Figure 41-2. Service retirement menu

Clicking on Retire this Service raises a request_service_retire event that begins a chain of relationships through the datastore:

  • request_service_retire

    • /System/Event/MiqEvent/POLICY/request_service_retire

    • /Service/Retirement/StateMachines/Methods/GetRetirementEntrypoint

GetRetirementEntrypoint ...

Get Mastering CloudForms Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.