A common challenge for cloud operation teams is handling resource uniformity of deployed VM’s across the environment. To handle this, teams usually use ‘t-shirt’ size VM’s that customers can request. To handle this in vRealize Automation, cloud teams would use multiple blueprints to accommodate for this. The downside of taking this approach is known as blueprint sprawl. This occurs when you have a blueprint for each size of a single deployment. Add in multiple operating systems and the amount of blueprints to manage becomes very large. Some have overcome this by creating workflows in vRealize Orchestrator that deploy a catalog item based on the custom build selection menu in the blueprint but this might be to complex for some users. With vRealize Automation 7.3 this functionality comes out of the box! This feature is called parameterized blueprints and it allows you to create component profiles for different sizes and images. The user can then pick these during the request of a catalog item once the blueprint is designed to use this feature. This functionality is similar to the vRealize Orchestrator solution but much less complex. In this blog post I will show you how to work with this new feature.
Before we start
Parameterized blueprints is a feature of vRealize Automation 7.3 so make sure you have that version installed. In my lab I used a simple vRA deployment with one vRA appliance and one IaaS node. Make sure the user you use is tenant and IaaS administrator.
Think about how many t-shirt sizes you require and how many different OS images you might need. In this example I will be using 4 different VM sizes. I have created two templates in vSphere with two different operating systems to choose from. Make sure that after you setup the VM templates in vSphere a data collection is run from vRA.
1 vCPU, 1 GB RAM, 10 GB Storage
2 vCPU, 2 GB RAM, 20 GB Storage
2 vCPU, 4 GB RAM, 30 GB Storage
4 vCPU, 8 GB RAM, 40 GB Storage
Component profiles for size
Lets get started with the profile for the different sizes we want our users to be able to choose from. Login to your vRA tenant (remember that you need to be tenant and IaaS admin).
Now go to Administration->Property Dictionary->Component Profiles.
Click on Size and then the tab Value Sets.
Click on New and fill in the display name, description and values (leave the default for name).
Now click save and repeat for the other profiles. When all profiles are added you will have something similar to this.
This completes the steps to set up the different size profiles, next we will setup our two images to choose from.
Component profiles for image
The settings for the images are in the same location. Assuming you are still logged in, go to Administration->Property Dictionary->Component Profiles.
Click on Image and then the tab Value Sets.
Click on New and fill in the required information. The values you need to provide might seem familiar as these are the same as you would fill in when designing a blueprint and adding a vSphere VM. The idea here is the same, you pick the way the VM should be deployed. In this case we want to provide customers with a choice in operating system based on templates already available in the environment. Therefore we use the clone operation and choose the template to clone from.
Now click save and repeat for the other profile. When all profiles are added you will have something similar to this.
We are now ready with the initial configuration of the component profiles. Now we have to set up our vSphere VM blueprint to incorporate these profiles.
Modify a blueprint to use component profiles
First, log in with a user that has the Infrastructure Architect access rights. If you do not have a blueprint available to modify, just create a new basic blueprint with a vSphere VM in it and follow along with the steps.
Go to the Design tab and click the blueprint you want to modify. Select the vSphere VM and then the tab Profiles.
Click Add, select both profiles and click OK.
Now select the Image profile and click on Edit Value Sets.
This opens up a new selection window where you can select which images you want to have available for the customers to select. Also make sure you set the default value to the correct item. In my case I want customers to default to CentOS 6.
Click OK and now select the Size profile and click Edit Value Sets. Select the different size options you want to have available in this blueprint and also check the correct default option.
Click OK and finish editing the blueprint. This single blueprint gives you eight different scenarios to deploy. Without using these component profiles you would need eight different blueprints.
If you created a new blueprint this is the time to publish and entitle it.
Set approval policy for Extra Large profile
Now that we have the component profiles in place and the blueprint configured and entitled we have the option to set an approval policy. This is not something new, because it was already possible to set approval policies on for instance the amount of CPU or RAM. Now, with component profiles you can use the values we setup earlier as approval check. We will set up an approval for when a customer requests the Extra Large VM size.
Go to the Administration tab and select Approval Policies. Click new and select the “Service Catalog – Catalog Item Request – Virtual Machine” policy type and click OK.
Give the policy a meaningful name and set the status to Active. On the pre-approval tab click the plus sign. Fill in the details such as name and approvers and select Required based on conditions.
In the clause drop down menu choose Component Profile->vSphere Machine Size and make sure to set it to ‘Component Profile – vSphere Machine Size – Equals – ValueSet.ExtraLarge’ (the last part is the ‘name’ and NOT the ‘display name’ of the value set) and click OK.
Now that we have the approval policy set up we need to add it to the entitlement. While still on the Administration tab, go to Catalog Management->Entitlements. Select the entitlement and go to the Items & Approvals tab. Under Entitled Items click the down arrow and modify policy for the catalog item you need the approval for.
Click show all and select the created approval policy and click OK.
The approval policy is now active and it will kick in if a customer requests the VM and selects the Extra Large profile.
Test the catalog item
Now lets take a look at how this works from a customer perspective. Log in with a user that can request the created catalog item. When you request the item select the VM in that request.
Take a look at the drop down menus for both the Image and Size. Note that when you hover the mouse over the items you can see the details about the sizing. Now, select Extra Large and click on submit.
Under the requests tab you should now see the item waiting for approval.
Of course if the approval is given this item will continue to be deployed with the CentOS 6 template and it would have 4 vCPU’s, 8 GB of RAM and 40 GB of storage.
That concludes our look at parameterized blueprints with component profiles or for short, “t-shirt sized” VM’s with vRA. This new feature that comes with vRealize Automation 7.3 is actually one of the most requested features. And now that it is finally here I think a lot of customers will embrace it. Some might already have a custom method in place and they might not rush to use this feature as they have invested in building their own way of doing this. On the other hand, customers just starting with vRA or smaller customers will embrace this addition to vRA. Working with parameterized blueprints and component profiles is fairly easy and makes working with blueprints more efficient and reduces the amount of blueprints to maintain. One other thing that might come in handy is the option to export and import component profiles using CloudClient. This lets you move component profiles between environments.
That’s is all for now, thank you for reading!
8 Replies to ““T-shirt sized” VM’s with vRA component profiles”
Did you control VM size after request completed? Because within VRA 7.5, disk size is not changes upon choice.
Completely forgot to respond to this I guess.
I think this gets done during provisioning, not sure though. If I have time I’ll have a look.
So I have looked in to this and this is how it works:
When using both image and size profiles on a blueprint there is a competition between the two actually. If you have a size profile that uses 10 GB and an image profile that uses a template that is 8 GB in size, on provision you would see 8 GB of storage on the VM. The 10 GB value is the maximum storage which the template can have. If the template (image profile) would be 12 GB in size the operation would fail because the size is restricted to 10 GB.
This is a bit weird on how it works, but thats what it is. So the size you setup does not indicate what the disk size will be but rather what the maximum size of the template used is.
Hope this helps (after all this time).
Great blog.. easy to follow. Thank you
so following this blog we get the approval policy to work however we get a strange error:
The value for the ‘source_machine’ field is fixed and cannot be overridden.
not sure what the issue is but any help would be great.
Hmm, I have not seen this myself before. It may be version related? If I get the change i’ll have a look.
I have gone through all the steps as described here in a vRA7.6 HF 1 setup and I was unable to reproduce the error. So, I am not sure what happend in your case.
how would we key off the T-shirt size value.set problematically for other workflows etc.?