vRealize contentIn my last blogpost I wrote about managing your Puppet code using a Source Control repository. This post is an extension on that one where I will talk about managing your vRealize content with VMware vRealize Suite Lifecycle Manager (vRSLCM) plus bring it under source control using Gitlab CE.

vRSLCM version 1.2 is introducing new content management capabilities. The new set of features allow customers to build and run infrastructure content as applications. Through pre-build content pipelines, IT teams can adopt the same DevOps approach as dev teams commonly leverage (such as CI/CD), and be able to work collaboratively with dev teams to achieve higher speed, quality and consistency across dev, test and production environments.

vRealize content

  • Pre-build content pipelines – Automate the end-to-end content management workflow, including automated content capture, test and release, for vRA blueprints and vRO workflows. Automated tests ensure correct configuration before deployment.
  • Source control integration and versioning – In-built support for check-in and check-out of content (with dependencies) to source control. Multiple teams can collaborate with a common repository of version controlled content.
  • Content dependency support – Content with dependency can be managed, developed and released independently while still maintaining consistent link to other content. It provides visibility into complex content architecture and flexibility to tackle individual components.

So, enough about the theory. Let’s dive into the solution!

Requirements:

  • Gitlab CE server installed and configured (HTTPS enabled!)
  • VMware vRealize Suite Lifecycle Manager 1.2 installed and configured with Content Management enabled
  • VMware vRealize Automation 7.x Enterprise environment with one or more Software Components

1. Viewing the Content Pipelines

Browse to your vRSLCM appliance page and login with the local admin account ([email protected]). Select ‘Content Management‘ to open the menu.
vRealize content

Select ‘Content Pipelines‘. These are the pre-build content pipelines you can use to capture, test and release vRealize content.

vRealize content

2. Managing the content settings

To use the pre-build pipelines you have to enable them. Go to ‘Content Settings‘ and enable the pipelines you want to use.
vRealize content

Select ‘Source Control Access‘ to add a Gitlab server. Select GITLAB as Source Control Type and enter your IP address or FQDN. Make sure your Gitlab server is setup for HTTPS!
vRealize content

In addition to this you have to create an Access Token to be able to communicate with your Gitlab server. Browse to your Gitlab server page and login with an account that has permissions to create groups and projects. Make sure you have a project created to be used for vRealize content. Otherwise create one.
vRealize content

Then go to ‘User Settings‘ and select ‘Access Tokens‘. Give in a Name, Expiration date, enable api and read_user access. Click ‘Create personal access token‘.
vRealize content

Copy the Access Token to your clipboard.
vRealize content

Go back to the vRSLCM page, ‘Content Settings‘, ‘Source Control Access‘, edit your Gitlab server and enter the ‘Access Key‘.
vRealize content

3. Creating Endpoints

For capturing and releasing content, endpoints have to be available.

3.1 Source Control endpoint

Select ‘Endpoints‘ and click ‘+New Endpoint‘. Select ‘Source Control‘ and click ‘Proceed‘.
vRealize content

Click ‘Next‘. Select your Gitlab server and enter the repository details. Click ‘Next‘.
vRealize content

Enable ‘Code Review‘ and click ‘Next‘.
vRealize content

Click ‘Submit‘.
vRealize content

3.2 Orchestration endpoint

Next, add a vRealize Orchestrator (vRO) endpoint. Select ‘Endpoints‘ and click ‘+New Endpoint‘. Select ‘Orchestration‘ and click ‘Proceed‘. Click ‘Next‘. Enter the vRO server details. Click ‘Test Connection‘. If successful, click ‘Next‘.
vRealize content

Enable all options. Click ‘Next‘.
vRealize content

Click ‘Submit‘.
vRealize content

3.3 Automation endpoint

Next, add a vRealize Automation (vRA) endpoint. Select ‘Endpoints‘ and click ‘+New Endpoint‘. Select ‘Automation‘ and click ‘Proceed‘. Click ‘Next‘. Enter the vRA server details. Select your vRealize Orchestrator endpoint. Click ‘Test Connection‘. If successful, click ‘Next‘.vRealize content

Enable all options. Click ‘Next‘.
vRealize content

Click ‘Submit‘.
vRealize content

With all endpoints available you now can capture and deploy vRealize content.
vRealize content

4. Capturing and checking in vRealize content

Browse to your vRealize Automation page and login with an account with design privileges. Go to the ‘Design‘ tab, select ‘Software Components‘. Make sure you have a Software Component you can use. Otherwise create one. In this example I will use a Python36 installation script.
vRealize content

The installation script is missing code and therefore isn’t production ready. In the next section I will explain how to capture this Software Component, do a check in of the code in Gitlab to share it with your development team who can then change and maintain it from a central source control.

Go back to the vRSLCM page and select ‘Content‘. Click ‘+Add Content‘.
vRealize content

Capture is automatically enabled. Enable ‘Check in‘ to add the captured content to your Gitlab repository. Click ‘Proceed‘.
vRealize content

Select the vRealize Automation endpoint. Enable ‘Get the latest content‘. Select ‘Automation-Software‘ as Content Type. In the content list select your Software Component. Enter a tag (optional) and Comments. Click ‘Next‘.
vRealize content

Select your Gitlab endpoint. Click ‘Next‘.
vRealize content

Click ‘Submit‘.
vRealize content

To see what’s happening, go to ‘Content Pipelines‘ and select ‘Executions‘.
vRealize content

When all pipeline executions are ready and successful go back to your Gitlab server page and open the vRealize content repository. You’ll see a Merge Request.
vRealize content

Select the request and click ‘Merge‘ to add the vRA Software Component to your Master branch.
vRealize content

The vRA Software Component, captured from vRSLCM, is now added to a repository directory called ‘Automation-Software‘.
vRealize content

 

5. Updating and deploying source controlled vRealize content

Browse the ‘Automation-Software‘ directory and select your Software Component yaml file. In my case Software.Python36.yaml Click ‘Edit‘.
vRealize content

Now you, or your developer team, can add/remove code and maintain the Software Component within Gitlab. After changing it click ‘Commit changes‘.
vRealize content

Go back to the vRSLCM page. Select ‘Content‘, find your captured Software Component and select it from the list. Click ‘Capture‘ to import the changes from Gitlab into vRSLCM.
vRealize content

Select your Gitlab endpoint. Enter a tag (optional). Enable ‘Mark this version as production ready‘ and enter Comments. Click ‘Capture‘.
vRealize content

If everything went good, a second version of your Software Component will be available to test or release. Click ‘Deploy‘.
vRealize content

Enable your vRA endpoint and enable ‘Stop release deployment after first failure‘. Enter the Release Comment and click ‘Proceed‘.
vRealize content

After a successful deployment go back to your vRealize Automation page. Go to the ‘Design‘ tab, select ‘Software Components‘ and find your Software Component. In my case, Python36. Select it. When you open the Install script details, the code changes made in Gitlab are committed.
vRealize content

6. Final words

In this blogpost I showed you that vRealize Suite Lifecycle Manager allows you to manage the release automation of content such as vRealize Automation Blueprints, Software Components, vRealize Orchestrator Workflows across multiple environments such as development, staging, production. It allows native source control management integration and dependency management between a cross-referenced content enabling a DevOps approach to build and run infrastructure content as applications.