A first look at vRealize Content Management
In 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.
- 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!
- 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 (admin@localhost). Select ‘Content Management‘ to open the menu.
Select ‘Content Pipelines‘. These are the pre-build content pipelines you can use to capture, test and release 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.
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!
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.
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‘.
Copy the Access Token to your clipboard.
Go back to the vRSLCM page, ‘Content Settings‘, ‘Source Control Access‘, edit your Gitlab server and enter the ‘Access Key‘.
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‘.
Click ‘Next‘. Select your Gitlab server and enter the repository details. Click ‘Next‘.
Enable ‘Code Review‘ and click ‘Next‘.
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‘.
Enable all options. Click ‘Next‘.
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‘.
Enable all options. Click ‘Next‘.
With all endpoints available you now can capture and deploy 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.
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‘.
Capture is automatically enabled. Enable ‘Check in‘ to add the captured content to your Gitlab repository. Click ‘Proceed‘.
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‘.
Select your Gitlab endpoint. Click ‘Next‘.
To see what’s happening, go to ‘Content Pipelines‘ and select ‘Executions‘.
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.
Select the request and click ‘Merge‘ to add the vRA Software Component to your Master branch.
The vRA Software Component, captured from vRSLCM, is now added to a repository directory called ‘Automation-Software‘.
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‘.
Now you, or your developer team, can add/remove code and maintain the Software Component within Gitlab. After changing it click ‘Commit changes‘.
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.
Select your Gitlab endpoint. Enter a tag (optional). Enable ‘Mark this version as production ready‘ and enter Comments. Click ‘Capture‘.
If everything went good, a second version of your Software Component will be available to test or release. Click ‘Deploy‘.
Enable your vRA endpoint and enable ‘Stop release deployment after first failure‘. Enter the Release Comment and click ‘Proceed‘.
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.
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.
Great post Dimitri thanks! We will continue to add many new capabilities in this product and getting the message out there with blog posts like this is awesome.
Nice post. However, I don’t have the luck to make it work in my environment. I successfully add 3 endpoints, vRA, vRO, and Gitlab. However, while I try to capture software component from vRA and release it to Gitlab. Pipeline failed at the release stage.
I tried couple times with other software component. The capture is surely working but the release kept failing with the same error message. Hope to have your advice. Thanks!
FAILED Workflow execution status: failed : exception : Failed to deploy [Apache Service] to sysage-gitlab with error [[Failed to check-in] Error: Uri is required] (Workflow:GitlabCheckIn / Check-in (item0)#44) (Dynamic Script Module name : executeVcoWorkflowAndWait#24) (Workflow:Run Content Workflow / Throw Error (item3)#1) (Workflow:Blackstone RP Deploy Content / Continue on failure (item29)#1)
Hi Shawnho, were you able to resolve this? I’m running into the exact same error at the same step.