VMware Cloud Community
michael_stefani
Enthusiast
Enthusiast

7.3 XAAS and multiple VMs

To start with we're using XAAS for everything.  In 6.2 I would allow users to give me a cluster name and how many nodes they wanted.  A workflow would then iterate through and prefix them app1-clustername, app2-clustername, etc and then request them as individual VMs with a unique hostname attribute to each one.  In 7.3 the addition of the deployment container kind of kills my approach as a cluster using my old method would have multiple deployments. 

Is there any way when creating multiple VMs to reference which VMs is being deployed during an event subscription?  I was thinking if I could determine this is VM 1 of 6 in the deployment I could prefix the the names accordingly.  Is there any passed attributes that I could use in an event subscription to determine which VM in the deployment is running?  If not any ideas as to how I could adjust names accordingly (app1 - appx)?  I don't think there's any way to pass a unique attribute per VM when calling them via JSON.

Tags (1)
0 Kudos
9 Replies
daphnissov
Immortal
Immortal

Can you describe your naming standard and how it gets applied to VMs? Can you also describe what your typical deployment consists of?

0 Kudos
michael_stefani
Enthusiast
Enthusiast

Unfortunately these VMs fall outside of our normal naming convention.  They're Oracle clusters and our Oracle team requires us to follow their naming convention (appX-clustername).  In our existing vRA6 environment we were able to make this work by accepting a cluster name and a number of nodes as input from a user as part of an XAAS catalog item.  Lets say "testcluster" as the cluster name and 3 nodes as the user input.  The XAAS workflow iterates through the number of nodes they want.  Iteration #1 sets the hostname attribute to app1-testcluster and requests a VM.  Iteration 2 sets the name to app2-testcluster and requests a VM, etc. 

I know I could use this same method in vRA7, but if I go this route I'm going to end up with a deployment for each node of the cluster.  Would really love to be able to use custom names but still have them under one deployment. 

0 Kudos
daphnissov
Immortal
Immortal

Some follow-up questions:

  1. How are node numbers determined? Automatic, or user-defined?
  2. Are there differences in nodes, or are they all the same?
  3. Is this just IaaS or are you installing and configuring Oracle at deployment time?
0 Kudos
michael_stefani
Enthusiast
Enthusiast

1)     Number of nodes is determined by user input.  Minimum 2 nodes maximum 10 nodes.

2)     Nodes are identicle with the exception of the custom host name

3)     At the MachineProvisioned stub we kick off a script to install some components but it's the same script that's executed for all nodes

0 Kudos
daphnissov
Immortal
Immortal

Forgot one more:  How is the compute cluster determined? At request time by the user, or baked into the catalog item?

0 Kudos
michael_stefani
Enthusiast
Enthusiast

So only two clusters licensed for Oracle.  We adjust the reservation policy in the workflow before the request is submitted depending on which environment is selected from a dropdown (dev, qa, prod, etc.). 

0 Kudos
daphnissov
Immortal
Immortal

Ok, so I can do this pretty straightforward using SovLabs Custom Naming.

1.) Create new custom properties for the cluster names and a drop-down list for the applications. For applications, I'm just doing a three-character code but this could be anything.

pastedImage_8.png

I created "Stefani.ClusterName" on my one and only (since this is a home lab) compute cluster. And I'm using an existing property I already had to specify the application name.

pastedImage_9.png

The name we are going for based on what you want is (AppCode)(##)-(ClusterName).

2.) Add naming sequence

pastedImage_0.png

pastedImage_10.png

I created a new sequence label that will factor into a new naming standard based on this schema. I'm using decimal, opting to reuse those sequence numbers, max length of 2 characters since you only want max of 10, start with 1, pad left digits with zeros if needed, and for the Unique Key I'm saying to let those numbers be unique if the Application code and Cluster Names are unique.

3.) Create a new Naming Standard

pastedImage_12.png

pastedImage_11.png

Calling this "StefaniOracle" and using the new sequence I just created. The template is {{SovLabs.Naming.Application}}{{sequence.stefaniSequence}}-{{Stefani.ClusterName}}. So essentially if a user picks the app code to be ORA and they're deploying to the R610 cluster, the template says the name has to be ORA##-R610.

Once submitted, a new property group is automatically created based on this standard and sequence.

pastedImage_13.png

3.) Attach said property group to my blueprint and fire off a request after selecting an application in the drop-down and asking for two cluster nodes.

pastedImage_14.png

pastedImage_15.png

pastedImage_16.png

4.) See the results

pastedImage_17.png

0 Kudos
michael_stefani
Enthusiast
Enthusiast

Thanks for the info, is that naming sequence a feature of the SOVLabs plug-in?  I can't say I've ever seen anything like that before in vRA?

Mike

0 Kudos
daphnissov
Immortal
Immortal

Yes, it's a feature of the plug-in and not built into vRA. I only mention it because it would seem to solve your problem and allow you to use deployments in vRA 7 rather than complex and manual XaaS flows.

0 Kudos