VMware Cloud Community
mulliganesx
Enthusiast
Enthusiast

XaaS Action to Add Disks

Hello, I have a XaaS Template that is able to deploy virtual machines.  What is the correct approach for me to add additional logic so that I can add additional disks on deployment? 

Currently we deploy a VM, and add disks afterwards in vCenter.  I was looking at custom resource actions, but do not see a way for me to bind it to an existing template.  I also found a vRO workflow for "Add Disk" but within that workflow I do not see # of disks to add.  Thanks for any info

Reply
0 Kudos
9 Replies
daphnissov
Immortal
Immortal

Do you absolutely need to use XaaS to deploy virtual machines? Because you're attempting to create a new wheel by bypassing IaaS request forms that allow you to do this without manual work.

Reply
0 Kudos
mulliganesx
Enthusiast
Enthusiast

I do.  We have XaaS populating VMs into different arrays/clusters/blueprint/networks types based on client, and template usage (XaaS can call one of several blueprint types based on selection).  I was looking to embed this as part of the XaaS request form.
Reply
0 Kudos
daphnissov
Immortal
Immortal

We have XaaS populating VMs into different arrays/clusters/blueprint/networks types based on client, and template usage (XaaS can call one of several blueprint types based on selection).

This is all possible using regular IaaS custom forms and component profiles today and I have personally done this for many customers on multiple occassions, all without having to resort to using XaaS to wrap IaaS blueprint requests. You do whatever you want, but you're signing up for a lot of additional technical debt by adding in disk adds/changes during day1 or day2 when you do it through XaaS.

Reply
0 Kudos
mulliganesx
Enthusiast
Enthusiast

This is the setup we were left with vmware consulting.  So if not ideal that is why I ended up here 🙂   

Are you recommending I set up a custom form, point to the vRO workflows that are being used by XaaS now..?  

Reply
0 Kudos
daphnissov
Immortal
Immortal

No, what I'm suggesting is you figure out how to redesign your blueprints to make use of traditional IaaS forms rather than using XaaS as a wrapper–an ugly, dirty trick from the days where vRA was very basic. With the advancements made in vRA today plus custom forms, not to mention the amazingly flexibility of some of the stuff from SovLabs, there are only very few cases where you cannot accomplish the deployment of VMs with this combination. Yes, it requires time. But it means you can take advantage of these out-of-the-box day2 actions rather than recreating the wheel. The alternative, of course, is that you design, develop, code, debug, test, and maintain custom vRO code to handle these disk adds yourself. It's a large amount of technical debt that you could sidestep by refactoring your blueprints. The choice is yours.

Reply
0 Kudos
mulliganesx
Enthusiast
Enthusiast

Okay great, thanks alot.   Question, which you may have already answered but I would like to confirm..

With my XaaS blueprint I select a vRO workflow that takes advantage of the dirty trick logic.  So with the custom forms I can accomplish deploying VMs with the same logic I have in my vRO workflow (without using the vRO workflow)..  Is that correct?  

Sovlabs sounds great, but company will not purchase.

Reply
0 Kudos
daphnissov
Immortal
Immortal

So with the custom forms I can accomplish deploying VMs with the same logic I have in my vRO workflow (without using the vRO workflow)..  Is that correct? 

Without knowing the logic you've built into that vRO workflow(s), I cannot say.

Sovlabs sounds great, but company will not purchase.

I will say that without some of their modules (which are pretty cheap, btw), especially Property Toolkit, you're likely to still be saddled with some of that technical vRO debt because any custom logic may still require your intensive care and feeding. I'll also tell you just from personal experience with other customers that with a combination of custom forms and Property Toolkit, I've been able to hand over one blueprint that delivers over 100 possible outcomes based on dynamic user selection. And all of that without writing so much as one line of JS or building a single workflow.

Reply
0 Kudos
mulliganesx
Enthusiast
Enthusiast

Got it.  To give more detail to that logic of what I am using ..  at a high level, I have a combination of switch, if else statements where vRO dictates where or how the VM is configured. 

Ex:  1.  Selecting Application A versus Application B,C,D will put it on a different storage reservation policy.  2.  Selecting Development/QA as a dropdown option will be it on a different VLAN than production.   3.  Selecting Web Server type will apply a blueprint with software components tied to web server optimizations.  Selecting another server type will use a different blueprint with optimizations. 

Reply
0 Kudos
daphnissov
Immortal
Immortal

1 and 2 could be done in the form itself (although I'd probably use Property Toolkit for that personally). 3 is more challenging because software components are tied to a specific IaaS blueprint and cannot be invoked with custom properties alone. There are ways around this that I've used before. Here's just one suggestion I've used:

  1. Create just a single software component for your "optimizations" that takes a number of properties as input variables.
  2. Based on these variables, portions of the script fire which accomplish the specific tasks (i.e., web optimiziations for web; db optimizations for db; etc.)
  3. Create an IaaS blueprint with this sole software component.
  4. In the custom form, the drop-down becomes a field which maps to this software component property
  5. If web is set then software components only invokes web-related portions of the script (variable eval), etc.

Like everything in automation land, there are multiple ways to skin the cat. The trick is doing it in a way which is simple, elegant, scalable, and manageable.

Reply
0 Kudos