VCF Automation – Build Tools for VMware Aria – Useful Maven Command Reference
This series has focused on getting up and running with the Build Tools and creating basic projects. In this post, I will demonstrate all the available maven commands and some additional parameters that can be used. This page can also be used as a useful Maven command reference.
Page Contents
Creating Projects
The following sections provide all the commands for creating the various project types. In all of the examples, you can substitute groupId and artifactId with your own values. The archetypeVersion is the desired version of the Build Tools (if these are new projects, use the latest available).
TypeScript Project
A TypeScript-based project can manage all VCF Automation Orchestrator content, including Workflows, Actions, Resources and Configurations. The following command can be used to create a TypeScript-based project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.o11n.archetypes -DarchetypeArtifactId=package-typescript-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=vro-ts
JavaScript Project
A JavaScript-based project can be used to manage VCF Automation Orchestrator Actions. It’s not possible to manage other content such as Workflows, Resources or Configurations. The following command can be used to create a JavaScript-based project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.o11n.archetypes -DarchetypeArtifactId=package-actions-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=vro-actions
XML Project
An XML-based project can manage VCF Automation Orchestrator Workflows, Resources and Configurations in the platform’s native XML format. It is also possible to manage Actions but not recommended as they will be wrapped in XML (use the JavaScript-based project for these instead). The following command can be used to create an XML-based project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.o11n.archetypes -DarchetypeArtifactId=package-xml-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=vro-xml -DworkflowsPath=Simplygeek
The workflowsPath parameter will be the top-level workflow path within Orchestrator where all workflows will reside (note that additional folders can easily be added later).
Mixed Project
This is not a real project but a Maven multi-module project that contains both a JavaScript-based and an XML-based project as submodules. According to the Built Tools documentation, this project is designed for initial onboarding. I do not recommend using this project type at all, as it’s easier to create the two projects separately. The following command can be used to create a mixed project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.o11n.archetypes -DarchetypeArtifactId=package-mixed-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=vro-mixed -DworkflowsPath=Simplygeek
ABX Project
An ABX project can manage VCF Automation ABX Actions. ABX Actions are alternative orchestration code to those provided by VCF Automation Orchestrator. Each ABX Action is considered its own project, which makes them a little more complicated to manage. The following command can be used to create an ABX project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes -DarchetypeArtifactId=package-polyglot-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=abx -Druntime=nodejs -Dtype=abx
The runtime parameter can be one of nodejs, python or powershell.
vRA 8.x Project
A vRA 8.x project can manage VCF Automation content such as Templates (blueprints), Custom Forms, Content Sources and Policies. This project type is required to manage content that is not ABX or VCF Automation Orchestrator. The following command can be used to create a vRA 8.x project.
mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.vmware.pscoe.vra-ng.archetypes -DarchetypeArtifactId=package-vra-ng-archetype -DarchetypeVersion=4.2.1 -DgroupId=com.simplygeek -DartifactId=vra-content
Push Content
The Build Tools provide the command vrealize:push
to push content from the local environment to VCF Automation. The following command can be used to push content.
mvn package vrealize:push -Pprofile_name
The profile_name should be substituted with the name of a profile for your VCF Automation environment as defined in the Maven settings.xml file.
The following additional parameters can also be used:
Parameter | Description |
---|---|
includeDependencies=<true/false> | If you have multiple projects to manage content that has dependencies defined between those projects, you can use this to control if those should be included in the push. Values should be true or false. |
skipInstallNodeDeps=<true/false> | When content is pushed, the required node dependencies will be installed first. This can add considerable time to the push process (from approx 30 seconds to 5 minutes). When developing and pushing frequently, turning this off can save a lot of time. Values should be true or false. |
skipTests=<true/false> | This can be used to skip running any unit tests that have been defined. Values should be true or false. |
license.skip | If you are not concerned about license headers or files being present, which could cause the push to fail, then specify this parameter to ignore missing license information. No values need to be passed. |
license.skipAddThirdParty=<true/false> | Same as license.skip but supports the values true or false. |
vro.packageImportConfigurationAttributeValues=<true/false> | This is specific to VCF Automation Orchestrator content only with an XML-based project that contains Configurations. Whether or not to import Configuration Attribute values. Values should be true or false. |
vro.packageImportConfigSecureStringAttributeValues=<true/false> | Same as vro.packageImportConfigurationAttributeValues but for SecureString attributes. Values should be true or false. |
vrealize.ssl.ignore.certificate | Ignore SSL certificate errors by passing this parameter. No values need to be passed. |
Additional parameters are passed using the -D
flag.
Pull Content
The Build Tools provide two commands for pulling content from VCF Automation to the local environment. The command vro:pull
can be used to pull VCF Automation Orchestrator content. The command vra-ng:pull
can be used to pull VCF Automation content. Note that pulling ABX content is not supported. The following are example commands for pulling content.
mvn vro:pull -Pprofile_name mvn vra-ng:pull -Pprofile_name
The profile_name should be substituted with the name of a profile for your VCF Automation environment as defined in the Maven settings.xml file.
The following additional parameters can also be used:
Parameter | Description |
---|---|
packageName=<package name> | Can be used to pull the content of another package into your project. |
Additional parameters are passed using the -D
flag.
Clean Orchestrator Packages
The Build Tools provide the command vrealize:clean
to clean up Orchestrator packages from the server. When deleting Orchestrator content locally, this is not realized on the server side and over time, many stale items will remain and need to be cleaned up manually.
The vrealize:clean
command can help solve this problem and can be used as part of a release process.
One of the following additional parameters must also be used:
Parameter | Description |
---|---|
cleanUpLastVersion=<true/false> | Clean up the last version of the deployed package from the server. Mutually exclusive with cleanUpOldVersions. Values should be true or false. |
cleanUpOldVersions=<true/false> | Clean up old package versions from the server. Mutually exclusive with cleanUpLastVersion. Values should be true or false. |
includeDependencies=<true/false> | Whether dependencies should also be cleaned up. Values should be true or false. |
Use the following command to clean up the current package version from the server:
mvn vrealize:clean -DcleanUpLastVersion=true -DcleanUpOldVersions=false -DincludeDependencies=false -Pprofile_name
Use the following command to clean up the current package version from the server and its dependencies:
mvn vrealize:clean -DcleanUpLastVersion=true -DcleanUpOldVersions=false -DincludeDependencies=true -Pprofile_name
Use the following command to clean up old package versions and dependencies from the server:
mvn vrealize:clean -DcleanUpLastVersion=false -DcleanUpOldVersions=true -DincludeDependencies=true -Pprofile_name
The profile_name should be substituted with the name of a profile for your VCF Automation environment as defined in the Maven settings.xml file.
I hope this post has been helpful and acts us a useful reference to the Build Tools commands available. If you have any additional commands or parameters that I missed, then please comment and share!