Thursday, November 13, 2014

Log in securely to a vCAC server using command Line Interface (vcac-cli)

With vcac-cli you can do the same stuff what would be doing from vCAC Console, you may request machine from catalog, re-provision a machine, view request and more.  There are 3 different modes,

  1. Interactive Mode

  1. Command Line Mode :
The command line mode lets you incorporate vcac-cli commands in other scripts and programs.

  1. CLI Script Mode
The CLI Script mode is similar to the command line mode, except that you can invoke multiple commands in sequence.

There are 2 prerequisites to install vCAC-CLI

  • Your machine must have Java SE Development Kit (JDK) 7 installed and running.
  • Your PATH environment variable must include the location of the correct version of Java.

Steps:

  1. Open a browser and enter the vCAC appliance name or IP.
  2. Download the command-line interface (vcac-cli) distribution package.
  3. After extracting, you would get 3 folders, i.e., BIN, ETC and REPO.
  4. Open the BIN and there would be 3 files. (spring-shell keeps the history of commands run)
  5. Right click on vcac-cli (batch file) and click on run as Administrator, that should log you in to vCAC cli utility.

To open a secure connection to your respective vCAC server, follow below steps:

Syntax -  " login --sessionid, --url, --user, --password, --tenant "

I used the below command to connect to my default tenant (vsphere.local), even if you omit the --tenant it will log in to the default Tenant.

 login --sessionid 01 --url https://lab-vcac-server.ps.local --user administrator@vsphere.local  --tenant vsphere.local

It will prompt for the password, enter the password for the entered user and make sure you get the "login successful" message.

Now you are connected to your vCAC server and you may perform all steps which could do from console.

Sample commands:

Type "rest get --service authentication --uri tenants" to get the list of tenants

To see the running services, just type "services"


I hope this post was informative. 

Tuesday, November 11, 2014

Add vCloud Director 5.5 as an Endpoint to vCAC 6.1

vCloud Director can be added as an Endpoint to vCloud Automation Center and the vApps can be provisioned through vCAC to the Organization vDC. Addition to vApp provisioning  you may also add customer workflows or customer properties during different stages of vApp provisioning.  vApp is a container for its component machines and is not a machine itself, so vApp is not counted as a machine in reports or licensing. Before adding vCloud Director as endpoint, make sure that you at least have one organization, vApps and vApp templates.

Note: If you create a vCloud Director endpoint, then do not create an another endpoint (vSphere) for its underlying vSphere resources. As the vCloud Director gets the resources (CPU, Memory and Storage) from underlying vSphere.

Data Collection: vCAC uses vSphere proxy Agent to communicate to vSphere resource, so it doesn’t require separate agent for vCloud.

Procedure:

  1. Login to vCAC as IaaS Administrator.
  2. Select Infrastructure > Endpoints > Endpoints.
  3. Select New Endpoint > Cloud > vApp (vCloud Director).
  4. Give an appropriate name for vCloud Endpoint and description. The vCD address should start with "https" fqdn or ip.
  1. Add Credentials: Add the user which had Administrator role in the respective Organization. You can add endpoints for each additional organization in the vCloud Director instance to integrate with vCloud Automation Center.
  1. Type the name of the Organization (it is case sensitive).
  1. Click on OK. (Add custom property -optional).

 Note:  To allow access to all organization vDCs in the vCloud Director instance, use system administrator credentials for a vCloud Director and leave the Organization text box empty.

Confirm the Data Collection Status:

  1. Hover the mouse on vCloud Endpoint name and click on "Data Collection".
  1. Click on "Start" and wait till you get the "succeeded" message. This confirms the agent is communicating with the Endpoint.


This concludes adding vCloud Director as Endpoint to vCAC. Next create Reservation on Fabric Group and associate it with a Business Group, those resources would be used for vApps provisioned.