Speaker • 00:00
Hello and welcome to another Itential demo using Lifecycle Manager. In today’s demo, we will have a walkthrough of LCM, a new application available in IAP version 2023.1. LCM enables users to take advantage of the state that Itential keeps of the attributes of a service. With the help of asset modeling, LCM makes it easy for users to track changes to their assets throughout the lifecycle. Now let’s dive into LCM on IAP and create our first resource. Let’s create a resource. We will be naming this resource as VMware vSphere VM. Now, let’s define the resource model. We will be storing three values in this resource model.
Speaker • 01:07
The name of the virtual machine created, the VM ID, which is going to be used in making API calls and track the VM, and the power of the VM, whether the VM is turned on or off. Let’s save this resource model. So now our resource model is saved successfully, and we will be moving on to how to create actions in Lifecycle Manager. There are three types of actions, create, update, and delete. And for the purpose of this demo, we will be creating one action of each type. Let’s start with the create action. Let’s name this action as create VM, let’s add a workflow to this action.
Speaker • 02:00
Now we can see that the output values of the workflows do not map to the schema or the resource model. For this, we will use a post transformation. Let’s select the post transformation. As we can see all the errors are gone. Now let’s have a look at this post transformation in Automation Studio. Here the inputs for this JST are the outputs of the workflow ADR LCM create VM and we are extracting information from these job variables and transforming them into the resource schema of the instance. Similarly let’s go and create an update action.
Speaker • 03:09
Let’s name this action as VM shutdown. Let’s select a workflow. This action will shut down the VM on demand in case if there is a need to free up some infrastructure. Now let’s select a pre-transformation. The reason why we use a pre-transformation is to make use of the values or the stateful information that is already stored in the schema. In this case, we will be creating our new pre-transformation. Here, the input is the instance or the information that is being stored for this particular instance or this particular VM.
Speaker • 04:16
And we will be mapping the VM ID to the outgoing schema here, which will be the input to our workflow. Let’s save this transformation. We will also need to modify the values of the schema after our workflow execution is complete. This can be done with the help of a POST transformation. Let’s create a new POST transformation. Since we are shutting down the VM, we will be setting the value of the powerdown variable in this instance to false. Let’s create a new Boolean.
Speaker • 05:07
We will also be passing the VM ID and the name of the VM as is. Let’s save this transformation. And if you go to Lifecycle Manager again, we can see that our action does not have any form of errors anymore, and it is already saved. So this completes our update action. Similarly, we will be creating a delete action. Let’s create a new delete action. We’ll name this action as delete VM.
Speaker • 05:45
Now let’s select our workflow. We will be creating a pre-transformation here again, like we created in the update action. Similarly, to pass the VM ID to the workflow, let’s save this transformation and let’s go back to Lifecycle Manager. Here we are required to create a post-transformation in the same way that we created for the update and the create action. So let’s create this post-transformation. Since we are just deleting the VM, we will simply be passing all the values that we already have to the instance without any form of modification. Let’s save this transformation.
Speaker • 06:51
Let’s go back to lifecycle manager and we can see our post transformation has already been added here. Let’s save this action. This means that now we have one action for each type of action, which is we have one action that will create the VM, one which will shut the VM down, and then one which will finally delete the VM. Let’s move on to creating instances using these actions. Say for example, a new user wants a Red Hat Linux server. Let’s create an instance using our create action. Let’s name this instance as red-hat-test-server.
Speaker • 07:44
The create action, which will be used to create this server, requires certain inputs like the name and the specs of the VM, which we will be entering here. Once these information have been added, we will click save. And, as we can see here, a new instance is created and currently it is running. Once this has completed execution, we will be able to see that the instance has been successfully created and have a look at the properties. Upon returning a couple of minutes later, we can see that our VM has been successfully created. Let’s have a look at the properties. Over here, we have the name of the VM, the VM ID, which will be used in subsequent actions like update and delete, as well as we can see that the VM has been powered on.
Speaker • 08:46
Now let’s run a different action, which is called VM shutdown. So let’s run the shutdown action. Let’s go to the history here. And we can see that the shutdown action is currently running on the VM and it is complete. So let’s look at the properties again. And in this case, the powered on is now not checked anymore as the VM is turned off. Let’s now run our final action, which is to delete this instance.
Speaker • 09:23
Let’s go back to history and the VM has successfully been deleted and it does not show up here as an active instance. If we need to still fetch some history from it, we can go to show deleted and over here we have our final state as well as the last action on it. So this pretty much concludes the demo. Please refer to docs. itential.com if you need any further information related to Lifecycle Manager.