Automating VCF – Deploy vRealize Suite Lifecycle Manager

In this part of the series, we will take a look at how to initiate the vRealize Suite Lifecycle Manager deployment workflow in SDDC Manager.

VMware Cloud Builder APIs Used

  • GET /v1/bundles
  • POST /v1/bundles
  • POST /v1/vrslcms
  • GET /v1/tasks/{id}

PowerVCF Cmdlets

  • Get-VCFBundle
  • Request-VCFBundle
  • New-VCFvRSLCM
  • Get-VCFTask

PowerShell Scripts

Procedure

Step 1 – Download and populate the Planning and Preparation Workbook for your target platform.

Step 2 – To generate the JSON spec using inputs from the Planning and Preparation Workbook run the following command:

.\createDeployVrslcmAvnSpec.ps1 -Workbook E:\pnpWorkbook.xlsx -Json E:\MyLab\sfo\sfo-vrslcmDeploy.json -sshPassword VMw@re1! -apiPassword VMw@re1!

The createDeployVrslcmAcnSpec.ps1 script will open the supplied Planning and Preparation Workbook, read the ‘Management Domain’ tab into a variable and then proceed to generate the JSON spec required by the Public API.

Step 3 – Authenticate to the SDDC Manager appliance by running the following command:

Connect-VCFManager -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password VMw@re1!

Step 4 – Obtain the bundle ID of for vRealize Suite Lifecycle Manager by running the following command:

$bundleDetails = Get-VCFBundle | Where {$_.description -Match "vRealize”}

In this step we use the Get-VCFBundle cmdlet to capture the bundle ID for vRealize Suite Lifecycle Manager. We will use this in the next step to download the bundle.

Step 5 – Obtain the vRealize Suite Lifecycle Manager bundle by running the following command:

Request-VCFBundle -id $bundleDetails.id

In this procedure we are using the Request-VCFBundle cmdlet to request the download of the vRealize Suite Lifecycle Manager bundle.

Step 6 – Poll the status of the bundle download, by running the following command:

Do { $status = Get-VCFBundle -id $bundleDetails.id } While ($status.downloadStatus -eq “IN_PROGRESS”)

Step 7 – Start the vRealize Suite Lifecycle Manager deployment workflow by running the following command:

$deployVrslcm = New-VCFvRSLCM -json E:\MyLab\sfo\sfo-vrslcmDeploy.json

Using the New-VCFvRSLCM cmdlet, we trigger the vRealize Suite Lifecycle Manager deployment workflow, here I’m capturing the output of the command into a variable to be used in the next step.

Step 8 – Poll the status of the vRealize Suite Lifecycle Manager deployment workflow, by running the following command:

Do { $status = Get-VCFTask -id $deployVrslcm.id } While ($status.status -eq “In Progress")

Here we are polling the status of the workflow, using the unique ID from the New-VCFvRSLCM cmdlet which we retrieve from the variable $deployVrslcm.id and pass to the Get-VCFTask cmdlet. We perform a Do / While loop where we are looking for status of “In Progress”, once the state changes from “In Progress” we break from the loop.

That completes the process of generating a vRealize Suite Lifecycle Manager JSON spec used by the public API and running the deployment workflow in SDDC Manager .

For other posts in this series see:

6 thoughts on “Automating VCF – Deploy vRealize Suite Lifecycle Manager

  1. Pingback: Automating VCF – Deploy Management Domain – My Cloudy World

  2. Pingback: Automating VCF – Commission Hosts – My Cloudy World

  3. Pingback: Automating VMware Cloud Foundation with APIs/PowerVCF/PowerShell – My Cloudy World

  4. Pingback: Automating VCF – Create Network Pool – My Cloudy World

  5. Pingback: Automating VCF – Deploy Workload Domain – My Cloudy World

  6. Pingback: Automating VCF – Deploy NSX-T Edge Cluster – My Cloudy World

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s