Archive for October, 2014

New- vCloud Automation Center 6.1 Reference Architecture and High Availability Guides

vcacref

Scalability, availability and performance are three attributes that are critical to any IT management solution.  The default configurations for most enterprise software products are designed for rapid initial deployment and not intended to handle the needs of every customer.  In this regard, vCloud Automation Center is no different than other software products. 

These NEW deployment Guides provide you with guidance and best practices required to configure vCloud Automation Center 6.1 to meet your specific scalability and availability needs.

 These documents looks at the components in the standard configuration and documents how the default parameters can be configured and components scaled to meet the needs of configurations with 1,000, 10,000 and 50,000+ machines under management.  In addition high availability considerations are also discussed.  This information is designed to augment information provided in the Install and configuration manual.

Advertisements

, , , , , ,

1 Comment

Update ServiceNow CMDB As Part Of IaaS Machine Life Cycle

In a previous post I explained how to update a CMDB as part of IaaS machine lifecycle. The example I used was a generic MSSQL Server table. In this blog post I want to give a more concrete example, namely ServiceNow.

The use case, as I have built it, is using vCO and the REST API’s of ServiceNow and is doing the following: When the machine is requested and provisioned from vCAC portal by the user: A Configuration Item (CI) record is automatically and immediately created in ServiceNow CMDB with the machine attributes coming from vRealize Automation (VM name, IP, CPU Count etc…) The Configuration Item “State” property in ServiceNow CMDB is shown as “On” since the machine exist and is of course running. When the machine is destroyed from the vRealize Automation portal by the user: The same previously created CMDB CI record is not deleted but instead its “State” property is now updated to say “Retired” instead of the previously “On” state. This way, we still have a record of the deleted machine in the CMDB while the “State” property is telling us if the machine exist or not.

Steps needed:

1. In vCO add your ServiceNow host as a REST HTTP Host, for example:

vco7

2. Add 2 REST operations:

-A POST one for CreateVM in CMDB: /api/now/table/cmdb_ci_vm_instance?JSON=&sysparm_action=insert

-A PUT one for UpdateCIBysysid in CMDB: /api/now/v1/table/cmdb_ci_vm_instance/{sys_id}

The result in vCO inventory should look as follows:

vco8

3. Decide which properties you want to send from vRealize Automation to ServiceNow CMDB as CI attributes. In my workflow I am sending a combination of both OOTB properties like “VirtualMachine.Memory.Size” and custom ones I have attached to the IaaS bluepring like “cost” for example or “location”.

The first scriptable task in the vCO workflow needs to reflect what you want to send to ServiceNow for example:

var hostName = vmentity.getProperty(“VirtualMachineName”);

var vmProps = vmentity.getLink(vcacHost,”VirtualMachineProperties”);

for each (var prop in vmProps) {
var propertyName = prop.getProperty(“PropertyName”);
var propertyValue = prop.getProperty(“PropertyValue”);
if (propertyName == “VirtualMachine.CPU.Count”) {
var cpuTotalCount = propertyValue;
}
if (propertyName == “VirtualMachine.Memory.Size”) {
var memoryTotalSize = propertyValue;
}
if (propertyName == “VirtualMachine.Disk0.Size”) {
var diskTotalSize = propertyValue;
}
if (propertyName == “VirtualMachine.Admin.UUID”) {
var uuid = propertyValue;
}
if (propertyName == “VirtualMachine.Network0.Address”) {
var ip = propertyValue;
}
if (propertyName == “__Legacy.Workflow.User”) {
var owner = propertyValue;
}
if (propertyName == “VirtualMachine.Network0.DnsSuffix”) {
var dns = propertyValue;
}
if (propertyName == “cost”) {
var daily_cost = propertyValue;
}
if (propertyName == “VirtualMachine.Network0.MacAddress”) {
var mac = propertyValue;
}
if (propertyName == “location”) {
var location = propertyValue;
}
}

Note: “vmentity” is input parameter of type “vCAC:Entity” coming dynamically from vRealize Automation during provisioning. “vcacHost” on the other hand we set in advance to point to our vRealize Automation server (previously known as vCAC).

Clarifications:

1. Create VMware VM Instance CI – Uses this POST Rest call:

https://<your_snow_server>//api/now/table/cmdb_ci_vmware_instance?JSON=&sysparm_action=insert

2. Update VMwareVM Instance CI by sys_id- Uses this PUT Rest call:

https://<your_snow_server>/api/now/v1/table/cmdb_ci_vm_instance/{sys_id}

You will notice the POST and the PUT REST operations use different cmdb tables in SNOW (cmdb_ci_vm_instance and cmdb_ci_vmware_instance) but for me that didn’t create any issue, it worked well this way. In the POST/insert workflow I grab the sys_id from the CI to be stored in vRealize Automation as a custom property on the blueprint so that when I destroy the VM in vRealize Automation it knows which CI to update in SNOW with the status “Retired”. So make sure you have attached/defined a custom property called “sys_id” to the relevant vRealize Automation IaaS blueprint.

Now we need to associate these 2 workflows with a vCAC external Stub. More information about vCAC external stubs and how they can be associated with vCO workflows and triggered at runtime can be found here in Chris Alleaume’s excellentt blog: Chris’s Blog

Make sure you associate your “Create_VMware_VM_Instance_CI” workflow with MachineProvisioned stub and  “Update_VMwareVM_Instance_CI_by_sys_id_(1)” workflow with MachineDisposing stub as described in Chris’s blog.

So now in ServiceNow when a machine is requested and provisioned from the vRealize Automation Portal, a new CI is created with the “On” state:

vco10

And when the same machine is deleted from the vRealize Automation portal, the State is now set to “Retired”:

vc013

Job Done.

Here are the workflows attached:

http://tinyurl.com/mpz5bho

, , , , , , ,

6 Comments

Prompting the IaaS Portal User To Say “Yes/No” to VM Backup with EMC Avamar during Machine Request

In previous blog posts I have explained how to “intercept” vRealize Automation (previously known as vCAC) IaaS machine provisioning at its different machine provisioning steps to integrate with 3rd party systems (E.G. F5). In this example I would like to show how to prompt the user for input (E.G. Yes/No) in the request form, and then based on the user selection, get vCenter Orchestrator (vCO) to add the provisioned machine to a pre-defined Avamar backup group.

First we need to identify how to integrate with EMC Avamar. In this example we have selected to SSH to the Avamar server and run some MCCLI commands. For example:

1. mccli client add

2. mccli group add-client

3. mccli group remove-client

So the vCO Workflow will look like this:

vco1

In vCO, the first step will be to get the value from the property in vRealize Automation relevant blueprint which is capturing the user input (Yes/No). We use a vCO scriptable task for this which includes the following code:

var clientName = virtualMachineEntity.getProperty(“VirtualMachineName”);
var vmProps = virtualMachineEntity.getLink(vcacHost,”VirtualMachineProperties”);

for each (var prop in vmProps) {
var propertyName = prop.getProperty(“PropertyName”);
var propertyValue = prop.getProperty(“PropertyValue”);
if (propertyName == “avamar”) {
if (propertyValue == “Yes”) {
avamar_input = true; }
}
}

Note: “virtualMachineEntity” is input parameter of type “vCAC:Entity” coming dynamically from vRealize Automation during provisioning. “vcacHost” on the other hand is a vCO attribute we set in advance to point to our vRealize Automation server (previously known as vCAC). “avamar_input” will be defined as a boolean Output Parameter of the first scriptable task since we are going to use its value in the “Decision” object whether or not to perform the backup based on the user selection.

As you can see from the code “avamar” will be the property we are going to use in vRealize Automation blueprint to prompt the user and then based on that selection we can then use a vCO “Decision” object to perform the backup action or not.

To make the property selection more presentable we can use vRealize Automation Property dictionary. First let’s add the “avamar” property to the relevant blueprint and make sure that “Prompt User” is set to “Yes”:

vco2

Then create a Property dictionary with the same name (“avamar”) of type “DropDownList” and make sure that “Required” is set to “Yes”:

vco3

Make sure you click on “Edit” and type the value you want the user to choose from (Yes/No):

vco4

Now back to your vCO workflow, here is a table of the Attributes one needs to set before running the workflow:

Name Type Value Description
vcacHost vCAC:VCACHost Insert you vCAC Server here Your vCAC Server
hostNameOrIP String Hostname or IP address of the SSH host Hostname or IP address of the SSH host
username String SSH Root User SSH Root User
password SecureString Root User Password Root User Password
path Path /etc/vco/app-server/vco_key Path to private key (most probably /etc/vco/app-server/vco_key)
avamarGroup String Insert your group name/td> backupGroup on Avamar system
vcDomain String Insert your VC FQDN vCenter Server FQDN
virtualDC String Insert the Virtual DC the VM is deployed in Virtual DC the VM is deployed in
vmFolder String Insert the VC Folder the VM resides in< VC Folder the VM resides in

Now we need to associate these 2 workflows with a vCAC external Stub. More information about vCAC external stubs and how they can be associated with vCO workflows and triggered at runtime can be found here in Chris Alleaume’s excellent blog: Chris’s Blog

Make sure you associate your “a Add Client to Avamar” workflow with MachineProvisioned stub and  “Remove Client from Avamar Group” workflow with MachineDisposing stub as described in Chris’s blog.

Job Done.

We are now ready to request a machine. Note how the user is given a choice for the backup (Yes/No) at request time:

vco5

Then in VCO based on the user selection we should see the backup taking place or not:

vco6

For your convenience the two vCO workflows mentioned above can be downloaded from here:

http://tinyurl.com/lhp6dsc

, , , , , ,

Leave a comment