VCF Operations for Logs
Overview¶
| Field | Value |
|---|---|
| Name | vrli |
| Archetype Group ID | com.vmware.pscoe.vrli.archetypes |
| Archetype Artifact ID | package-vrli-archetype |
| Package extension | vrli |
| Product compatibility | VCF Operations for Logs (9.x) Aria Operations for Logs (8.x) |
VCF Operations for Logs projects are called vrli projects in Build Tools for VMware Aria. The project type is a representation of VCF Operations for Logs content into human friendly JSON format. The project consist of content descriptor and content container.
- Content Descriptor defines what part of the VCF Operations for Logs server content will be part of this project -
content.yaml. - Content Container holds the actual content representation -
./srcfolder.
Supported Content¶
alertscontent-packs
Create New VCF Operations for Logs Project¶
Build Tools for VMware Aria provides ready to use VCF Operations for Logs project templates (maven archetypes).
To create a new VCF Operations for Logs project from archetype use the following command:
mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=com.vmware.pscoe.vrli.archetypes \
-DarchetypeArtifactId=package-vrli-archetype \
-DarchetypeVersion=4.24.1 \
-DgroupId=com.company.department \
-DartifactId=vrli-project
mvn archetype:generate `
-DinteractiveMode=false `
-DarchetypeGroupId=com.vmware.pscoe.vrli.archetypes `
-DarchetypeArtifactId=package-vrli-archetype `
-DarchetypeVersion=4.24.1 `
-DgroupId=com.company.department `
-DartifactId=vrli-project
mvn archetype:generate ^
-DinteractiveMode=false ^
-DarchetypeGroupId=com.vmware.pscoe.vrli.archetypes ^
-DarchetypeArtifactId=package-vrli-archetype ^
-DarchetypeVersion=4.24.1 ^
-DgroupId=com.company.department ^
-DartifactId=vrli-project
Expand for Description of Defined Properties for the Command
Following is a list of the properties that you define in the command for generating a project from the archetype with details about their expected and default values.
- The
interactiveModeflag specifies whether you want to run the command in interactive mode. - The
archetypeGroupIdproperty defines the group ID of the archetype (project template) that you want to use for the project. For VCF Operations for Logs projects, make sure to set the value tocom.vmware.pscoe.vrli.archetypes. - The
archetypeArtifactIdproperty defines the artifact ID of the archetype (project template) that you want to use for the project. For VCF Operations for Logs projects, make sure to set the value topackage-vrli-archetype. -
The
archetypeVersionproperty is optional and defines the version of the archetype (project template) that you want to use for the project. This version matches the version of Build Tools for VMware Aria.Note
Note that if you do not specify a value for the
archetypeVersionproperty, the command uses the default value of2.38.1. However, since the archetype content changes, you are advised to use an up-to-date version. -
The
groupIdproperty defines the distinct identifier of the group to which your project belongs. You should use this property to define the base name of the company or the group that creates the project. It acts as a namespace that ensures that project names don't clash with each other. It is recommended to choose agroupIdthat reflects your organization or main project. - The
artifactIdproperty defines the unique identifier for your project or module (within the company or project group). It represents the name of the artifact that is generated by the project. It is recommended to use anartifactIdvalue that reflects the specific project (and project type in multi-module projects).
Content Structure¶
The result of this command will produce the following project file structure:
operations
├── README.md
├── content.yaml
├── pom.xml
├── release.sh
└── src
└── main
└── resources
└── alerts
└── Cluster is disbalanced.json
└── content-packs
└── VCF Operations.json
Content¶
Content Descriptor¶
Content Descriptor is implemented by content.yaml file with the following structure:
alerts:
content-packs:
Note
VCF Operations for Logs Project supports only content types outlined into Content Descriptor.
To capture the state of your VCF Operations for Logs environment simply fill in the names of the content objects and follow the Pull Content section.
Note
All object types are list of string values.
Content Filtering¶
Contents are managed by different rules.
Import Rules for content types¶
- All local objects available in
./srcfolder are imported. Thecontent.yamlis not taken into consideration.
Export Rules for content types¶
- Only objects explicitly defined in the
content.yamlare exported.
Example¶
Content
alerts:
- VC stats query time-out occurred
content-packs:
- VCF Operations
Environment Connection Parameters¶
The following need to be added to the profile that you intend to use:
<!-- (1)! -->
<profile>
<!-- ..... OTHER DIRECTIVES ..... -->
<vrli.host>flt-logs01.corp.internal</vrli.host>
<vrli.port>9543</vrli.port>
<vrli.username>admin</vrli.username>
<vrli.password>VMware1!VMware1!</vrli.password>
<vrli.provider>Local</vrli.provider>
<vrli.vropsHost>flt-ops01a.corp.internal</vrli.vropsHost>
<vrli.vropsPort>443</vrli.vropsPort>
<vrli.vropsUser>admin</vrli.vropsUser>
<vrli.vropsPassword>VMware1!VMware1!</vrli.vropsPassword>
<vrli.vropsAuthSource>local</vrli.vropsAuthSource>
</profile>
- The location of the
settings.xmlfile for MacOS is~/.m2andC:\Users\username\\.m2for Windows.
-
vrli.vrops*parameters are used for retrieving or updating data related to VCF Operations enabled alerts. -
vrli.provider- specifies the authentication provider used to connect to the vRLI / VCF Operations for Logs server. Currently supported providers are Local, active directory and VIDM.
Use the profile by passing it with -P, e.g.:
mvn vrli:pull -Ptarget-env
Operations¶
Build the Project¶
This section describes the operation for building the project.
Overview¶
A Maven goal for compiling the code into a deployment-ready package.
Usage¶
To build the project, use the following command.
mvn clean package
The output of the command will result in com.company.department.project.type-1.0.0-SNAPSHOT.vrli file generated in the target folder of the project.
Bundle the Project¶
This section describes the operation for bundling the project.
Overview¶
A Maven goal for producing an installation bundle that contains the solution package, all its dependencies, and scripts for deploying them to a target environment.
Usage¶
To bundle the project, use the following command.
mvn clean package -Pbundle-with-installer
For more information about using the bundle, see the documentation of the Installer CLI tool.
Pull Content¶
Overview¶
When working on a VCF Operations for Logs project, you mainly make changes on a live server using the VCF Operations for Logs UI and then you need to capture those changes in the maven project on your filesystem to be able to store the content, track changes, collaborate, etc.
Usage¶
To support this use case, the a custom maven goal vrli:pull is used. The following command will pull the content outlined into Content Descriptor file to the current project from a specified server and expand its content in the local filesystem overriding any local content:
mvn vrli:pull -Ptarget-env
Note
The command will fail if the content.yaml is empty or it cannot find some of the described content on the target VCF Operations for Logs server.
Wildcard Support¶
The content descriptor supports wildcard. This means that if a wildcard is present in the asset name, all assets matching the wildcard expression will be exported to the local file system. The example above shows how to use wildcard in the asset names. E.g.
alerts:
- "*HA*"
content-packs:
- VMware *
Push Content¶
This section describes the operation for pushing project content to the target environment.
Overview¶
A Maven goal for packaging and deploying all local content from ./src directory to the remote server.
Usage¶
To push the project content to the target environment (defined in the Maven build profile that you specify in the -P${PROFILE} argument), use the following command.
mvn clean package vrealize:push -Ptarget-env
Include Dependencies¶
By default, the vrealize:push goal deploys all dependencies of the current project to the target environment. You can control this behavior by adding the -DincludeDependencies flag with the value false (to overwrite the default value true).
To skip deploying the project dependencies, run the following command.
mvn package vrealize:push -Ptarget-env -DincludeDependencies=false
Ignore Certificates¶
This section describes the flags that allow you to bypass the security feature for verifying the certificate and certificate hostname of the remote server in a development/testing environment.
Warning
Do not use the flags described in this section when targeting production servers.
Instead, make sure that the certificates have the correct CN, use FQDN to access the servers, and add the certificates to the Java key store (i.e. cacerts).
You can ignore certificate errors for all operations by adding the following parameters to the target profile in your Maven settings.xml file.
- For the the certificate is not trusted error, use the
vrealize.ssl.ignore.certificateparameter. - For the the CN does not match the actual hostname error, use the
vrealize.ssl.ignore.hostnameparameter.
<!-- Parameters for ignoring certificates in settings.xml file --> <!-- # (1)! -->
...
<profiles>
...
<profile>
<id>target-env</id>
<properties>
...
<vrealize.ssl.ignore.hostname>true</vrealize.ssl.ignore.hostname>
<vrealize.ssl.ignore.certificate>true</vrealize.ssl.ignore.certificate>
</properties>
</profile>
</profiles>
- The location of the
settings.xmlfile for MacOS is~/.m2andC:\Users\username\\.m2for Windows.
You can ignore certificate errors for specific operations by adding the following flags to your command.
-
To ignore the the certificate is not trusted error, add the
-Dvrealize.ssl.ignore.certificateflag to your command.mvn package vrealize:push -Ptarget-env -Dvrealize.ssl.ignore.certificate -
To ignore the the CN does not match the actual hostname error, add the flag
-Dvrealize.ssl.ignore.certificate:mvn package vrealize:push -Ptarget-env -Dvrealize.ssl.ignore.hostname
Clean Up Content¶
The cleaning up of project content from a target environment is not supported for the VCF Operations for Logs project. For details, see the Project Type Support for Content Clean Up.
Project Type Support for Content Clean Up¶
The following table provides details about the support of the cleaning up of project content via the vrealize:clean command per project type (archetype).
| Archetype | Supported | Comment |
|---|---|---|
| vro | Yes | - |
| vcd | Partial | Does not support dry run mode. |
| abx | No | Not implemented. |
| vrops | No | Not implemented. |
| vra-ng | Partial | Does not support dry run mode. |
| vrli | No | Product does not provide native package support. |
| cs | No | Product (Code Stream Services) does not provide native package support. |
| vcfa-all-apps | Partial | Does not support dry run mode. |
Operation Troubleshooting¶
Following is a list of tips on how to resolve issues that you might face when performing any of the supported operations.
-
If a Maven error does not contain enough information, re-run the command with the
-Xdebug flag.mvn -X <rest of the command> -
Sometimes Maven might cache old artifacts. To force the fetching of new artifacts, run the command with the
-Uflag. Alternatively, remove < home >/.m2/repository directory.mvn -U <rest of the command>