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=4.25.0 \
  -DgroupId=com.company.department \
  -DartifactId=vrli-project
mvn archetype:generate `
  -DinteractiveMode=false `
  -DarchetypeGroupId=com.vmware.pscoe.vrli.archetypes `
  -DarchetypeArtifactId=package-vrli-archetype `
  -DarchetypeVersion=4.25.0 `
  -DgroupId=com.company.department `
  -DartifactId=vrli-project
mvn archetype:generate ^
  -DinteractiveMode=false ^
  -DarchetypeGroupId=com.vmware.pscoe.vrli.archetypes ^
  -DarchetypeArtifactId=package-vrli-archetype ^
  -DarchetypeVersion=4.25.0 ^
  -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 interactiveMode flag specifies whether you want to run the command in interactive mode.
  • The archetypeGroupId property 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 to com.vmware.pscoe.vrli.archetypes.
  • The archetypeArtifactId property 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 to package-vrli-archetype.
  • The archetypeVersion property 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 archetypeVersion property, the command uses the default value of 2.38.1. However, since the archetype content changes, you are advised to use an up-to-date version.

  • The groupId property 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 a groupId that reflects your organization or main project.

  • The artifactId property 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 an artifactId value 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 ./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 the settings.xml file for MacOS is ~/.m2 and C:\Users\username\\.m2 for 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 into an installation bundle (ZIP file).

Overview

A Maven profile 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

The command produces a ZIP file (installation bundle) with a name that follows the pattern <project.groupId>.<project.artifactId>-<project.version>-bundle.zip, where the values for the placeholders are retrieved from the respective properties of the project pom.xml file.

Following is a sample listing of the structure of the installation bundle ZIP file for the VCF Operations for Logs project in which the project version is 0.1.0-SNAPSHOT.

Sample structure of an installation bundle
com.company.department.vrli-project-0.1.0-SNAPSHOT-bundle.zip
└── bin
    └── installer
    └── installer.bat
└── etc
    └── logback.xml
└── repo/
└── vrli 
    └── com.company.department.vrli-project-0.1.0-SNAPSHOT.vrli

Following is a list of the directories in the installation bundle with a short description of their contents.

  • The bin directory contains the installer script (CLI tool) for importing the solution components from the bundle in two formats, Bash (for Linux/Mac OS) and .bat (for Windows). For more information about using the CLI tool, see the documentation of the Installer.
  • The etc directory contains configuration files of the Java binaries for the installer script, such as the logging configurations in the logback.xml file. For more information about the logging configuration file, see Logging Configuration.
  • The repo directory contains the Java binaries for the installer script.
  • The vrli directory contains the project file(s) with the components that you can import to the remote server.

    Note

    Based on your configurations and dependencies, you can have multiple Maven modules in a single installation bundle. So in addition to the vrli directory for the VCF Operations for Logs project, you can have additional modules for projects of other types.

Bundle Additional Files

By default, the -Pbundle-with-installer Maven profile packages only the files and directories that are strictly necessary for importing the project components to the target system (as shown in the Sample structure of an installation bundle listing). However, it also allows you to package additional files or directories from your repository as part of the bundle ZIP and copy them to the root of the installation bundle.

You can use such additional files and directories to bundle supplementary version-controlled content (such as integration tests, files with sample inputs for Orchestrator workflows, properties files for the installer script, Ansible playbooks, etc.) in a single deliverable file.

You specify the additional content that you want to add to the bundle in the <properties> element of the pom.xml file of the project. You can use up to nine <installer.included.item*> elements (in which * stands for a number between 1 and 9) to specify the paths to the files and directories that you want to include.

For example, the following sample configuration of a pom.xml file includes a file with the name environment.properties as item1 and the contents of the integration-tests/ directory as item2.

Sample pom.xml file
<!-- Parameters for including additional files in installation bundles in the pom.xml file --> 
<project>
    ...
    <properties>
        <installer.included.item1>environment.properties</installer.included.item1>
        <installer.included.item2>integration-tests/**</installer.included.item2>
    </properties>
    ...
</project>

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.certificate parameter.
  • For the the CN does not match the actual hostname error, use the vrealize.ssl.ignore.hostname parameter.
<!-- 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>
  1. The location of the settings.xml file for MacOS is ~/.m2 and C:\Users\username\\.m2 for 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.certificate flag 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 -X debug 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 -U flag. Alternatively, remove < home >/.m2/repository directory.

    mvn -U <rest of the command>