Skip to content

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 - ./src folder.

Supported Content

  • alerts
  • content-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= # (1)! \
    -DgroupId=com.company.bu # (2)! \
    -DartifactId=project.type # (3)!
  1. This parameter is optional. Default value is 2.38.1. Note that archetype contents change so usually an up-to-date version is preferred.
  2. The groupId in Maven is a distinctive identifier specifically used for a project. It acts as a namespace, ensuring that project names don't clash with each other. It is recommended to choose a groupId that reflects your organization or project.
  3. The artifactId is a unique identifier for a specific project or module within a project. It represents the name of the artifact that is generated by the project. It is recommended to choose a artifactId that reflects the project type.

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 ./src folder are imported. The content.yaml is not taken into consideration.
Export Rules for content types
  • Only objects explicitly defined in the content.yaml are 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>
  1. The location of settings.xml for MacOS is ~/.m2 and C:\Users\username\.m2 for Windows

  2. vrli.vrops* parameters are used for retrieving or updating data related to VCF Operations enabled alerts.

  3. vrli.provider - specifyies 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 Project

Overview

Maven goal for compiling the code into a deployment ready package.

Usage

mvn clean package

The output of the command will result in com.company.bu.project.type-1.0.0-SNAPSHOT.vrli file generated in the target folder of the project.

Bundle Project

Overview

Maven goal for producing an installation bundle containing the solution package, all its dependencies and scripts for deploying to target environment.

Usage

mvn clean package -Pbundle-with-installer

For more information refer to Installer documentation.

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

Overview

Maven goal for packaging and deploying all local content from ./src folder to the remote server.

Usage

mvn clean package vrealize:push -Ptarget-env
Include Dependencies

By default, the vrealize:push goal will deploy all dependencies of the current project to the target environment. You can control that by the -DincludeDependencies flag. The value is true by default, so you skip the dependencies by executing the following:

mvn package vrealize:push -Ptarget-env -DincludeDependencies=false

Note

Dependencies will not be deployed if the server has a newer version of the same package deployed. For example, if the current project depends on com.vmware.pscoe.example-2.4.0 and on the server there is com.vmware.pscoe.example-2.4.2, the package will not be downgraded. You can force that by adding the `-Dvra.importOldVersions flag:

mvn package vrealize:push -Ptarget-env -Dvra.importOldVersions
The command above will forcefully deploy the exact versions of the dependent packages, downgrading anything it finds on the server.

Ignore Certificates

This section describes how to bypass a security feature in development/testing environment. Do not use those flags when targeting production servers. Instead, make sure the certificates have the correct CN, use FQDN to access the servers and add the certificates to Java's key store (i.e. cacerts).

You can ignore certificate errors the certificate is not trusted and the CN does not match the actual hostname by appending the following parameters to the target profile in your maven 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>
  1. The location of settings.xml for MacOS is ~/.m2 and C:\Users\username\.m2 for Windows

You can ignore certificate error, i.e. the certificate is not trusted, by adding the flag -Dvrealize.ssl.ignore.certificate:

mvn package {projectGoal}:push -Ptarget-env -Dvrealize.ssl.ignore.certificate

You can ignore certificate hostname error, i.e. the CN does not match the actual hostname, by adding the flag -Dvrealize.ssl.ignore.certificate:

mvn package {projectGoal}:push -Ptarget-env -Dvrealize.ssl.ignore.hostname

Clean Up Content

Clean up is not supported for the current project type.

Project Type Support for vrealize clean

Archetype Supported Comment
vro Yes -
vcd Partial It does not support dryRunning
abx No Not implemented
vrops No Not implemented
vra-ng Partial Does not support dryRunning
vrli No vRLI does not provide native package support
cs No Code Stream Services does not provide native support for packages

Troubleshooting

  • If maven error does not contain enough information re-run it with -X debug flag.
    mvn -X <rest of the command>
    
  • Sometimes maven might cache old artifacts. Force fetching new artifacts with -U. Alternatively remove /.m2/repository folder.
    mvn -U <rest of the command>