Aria Operations, Integration SDK

VMware Aria Operations Integration SDK – Part 1 – Installation

The VMware Aria Operations Management Pack Builder is an independent appliance designed for crafting personalized management packs compatible with Aria Operations. This tool offers no-code approach to seamlessly integrate data from external APIs, empowering you to augment VMware and third-party resources by adding new Data, Relationships, and Events effortlessly.

However, there are sometimes data sources that cannot be queried adequately or at all using the Management Pack Builder. This is where the no-code solution reaches its limits. Fortunately, VMware by Broadcom provides the Aria Operations Integration SDK as a low-code solution, enabling the creation of Aria Operations Management Packs for practically all endpoints that offer any API or other means to access their data.

The entire documentation, the SDK, how-tos and code samples can be found here.

In this and upcoming blog posts, I will describe my introduction to the world of Management Packs created using the Aria Operations Integration SDK. In this first part, the focus will be on installing the base system and taking the initial baby steps with the SDK.

Let’s get started!

Base System Configuration

Starting point is:

I have chosen Ubuntu 22.04.4 Desktop as the base system.

The first requirement is Docker 20.10.0 or later, and these are the steps I followed:

sudo apt install gnome-terminal - just in case it is missing

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

# Test if Docker is working as expected
sudo docker run hello-world

If you would like to get rid of the sudo command required to run docker command:

# Following various how-tos
sudo usermod -aG docker $USER

# Log out and log back in so that your group membership is re-evaluated.
# In my case I still got the same error running docker without sudo,
# following steps solved the issue for me:

# Create the docker group.
sudo groupadd docker

# Add your user to the docker group.
sudo usermod -aG docker ${USER}

# You need to log out and log back in so that your
# group membership is re-evaluated or type the following command:
su -s ${USER}

# Verify that you can run docker commands without sudo.
docker run hello-world

# I also had to change some file permissions
sudo chmod 666 /var/run/docker.sock

Next step is to login to docker registry using docker login and the path to your registry. You need to setup your docker account first, of course.

docker login
# Container registry format

Check the Python version if you plan to write your Management Pack in Python:

tkopton@ubuntu01:~$ python3 --version
Python 3.10.12

Install pipx.

sudo apt install pipx
pipx ensurepath
# restart terminal.
# In my case the pipx ensurepath command throws an error.
# pipx: error: unrecognized arguments: --global
# sudo pipx --global ensurepath might fix the problem
(Optional) Java

Initially I had plans to write my Management Packs in Java but relatively quickly gave up on that idea. Java has changed massively since I have learned it so I decided to improve my Python skills instead.

If you would like to give Java a chance, these were my steps to install the required Java environment. I had to install some dependencies to get the actual JDK installed.

Java JDK is located here:

tkopton@ubuntu01:~/Downloads$ sudo dpkg -i zulu21.34.19-ca-jdk21.0.3-linux_amd64.deb

Selecting previously unselected package zulu-21.
(Reading database ... 205217 files and directories currently installed.)
Preparing to unpack zulu21.34.19-ca-jdk21.0.3-linux_amd64.deb ...
Unpacking zulu-21 (21.34+19-1) ...
dpkg: dependency problems prevent configuration of zulu-21:
zulu-21 depends on java-common; however:
Package java-common is not installed.

dpkg: error processing package zulu-21 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:

# Install java-common if you get the same error messageand
# re-run the JDK installation:
sudo apt-get install java-common

tkopton@ubuntu01:~/Downloads$ sudo dpkg -i zulu21.34.19-ca-jdk21.0.3-linux_amd64.deb
(Reading database ... 205886 files and directories currently installed.)
Preparing to unpack zulu21.34.19-ca-jdk21.0.3-linux_amd64.deb ...
Unpacking zulu-21 (21.34+19-1) over (21.34+19-1) ...
Setting up zulu-21 (21.34+19-1) ...
update-alternatives: using /usr/lib/jvm/zulu-21-amd64/bin/java to provide /usr/bin/java (java) in auto mode
Clone Integration Git Repo

To easily access samples etc. I have cloned the Integration SDK repo localy.

Make sure you have installed the git package.

sudo apt install gh

For my Aria Operations Management Pack projects I have created the folder intergration-sdk-projects in my home path and in the next step I have cloned the Integration SDK into this folder:

tkopton@ubuntu01:~/intergration-sdk-projects$ gh auth login
? What account do you want to log into?
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? No
? How would you like to authenticate GitHub CLI? Paste an authentication token
Tip: you can generate a Personal Access Token here
The minimum required scopes are 'repo', 'read:org'.
? Paste your authentication token: ****************************************
- gh config set -h git_protocol https
✓ Configured git protocol
✓ Logged in as tkopton

# Clone the repo:
gh repo clone vmware/vmware-aria-operations-integration-sdk
(Optional) Python and Java IDE

Of course, you can develop more or less comfortable code in VIM, Nano, or VS Code, but I wanted to take this opportunity to look at the current IDEs for Python and Java. For Python, I settled on the Community Edition of PyCharm.
PyCharm community edition:

sudo tar -xzvf pycharm-community-2024.1.tar.gz -C /opt/
tkopton@ubuntu01:/opt/pycharm-community-2024.1/bin$ ./

For Java, I relied on an old familiar tool, the most likely well-known IDE, Eclipse.

tkopton@ubuntu01:~/Downloads$ sudo tar -xzvf eclipse-inst-jre-linux64.tar.gz -C /opt/tkopton@ubuntu01:/opt/eclipse-installer$ ./eclipse-inst
VMware Aria Operations Integration SDK Installation

Your output will be similar to the following output except for the fact, that for this blog post I had to re-run the installation using --force option.

tkopton@ubuntu01:~$ pipx install vmware-aria-operations-integration-sdk --force
Installing to existing venv 'vmware-aria-operations-integration-sdk'
installed package vmware-aria-operations-integration-sdk 1.1.0, installed using Python 3.10.12
These apps are now globally available
- mp-build
- mp-init
- mp-test
done! ✨ 🌟 ✨
VMware Aria Operations Integration SDK Test

Following the Get Started documentation and its “Creating a Management Pack” section I started with creating my first “Hello World” Management Pack.

tkopton@ubuntu01:~/intergration-sdk-projects$ mp-init
Enter a directory to create the project in. This is the directory where adapter code, metadata, and
content will reside. If the directory doesn't already exist, it will be created.
Path: hello-world
Management pack display name: Hello World
Management pack adapter key: HelloWorld
Management pack description: This is my first Management Pack created using the Integration SDK.
Management pack vendor: tkopton
Enter a path to a EULA text file, or leave blank for no EULA:
A EULA can be added later by editing the default 'eula.txt' file.
Enter a path to the management pack icon file, or leave blank for no icon:
An icon can be added later by setting the 'pak_icon' key in 'manifest.txt' to the
icon file name and adding the icon file to the root project directory.
Select a language for the adapter: Python
Select a template for your project: Sample Adapter
Creating Project [Finished]
Creating Virtual Environment [Finished]

project generation completed

In my work folder a hello-world folder containing the structure and the actual sample code has been created (next picture shows only two levels of the structure for better visibility).

Figure 01: Integration SDK – sample project structure.

To use the SDK and test and build our Management pack, you need to navigate to the newly-generated project directory and activate the virtual environment:

tkopton@ubuntu01:~/intergration-sdk-projects$ cd hello-world/
tkopton@ubuntu01:~/intergration-sdk-projects/hello-world$ source venv-Hello\ World/bin/activate
(venv-Hello World) tkopton@ubuntu01:~/intergration-sdk-projects/hello-world$

Now we can test the Management Pack for the first time without any changes to the code. As the guide describes if you run mp-test from within the project directory it will test exactly this project/management pack, if you run it from outside of a specific project director the toll will ask for the project to test.

There are several options to test the Management Pack, a connection test is what I did first. Please keep in mind that we are testing a sample solution and the goal is to check if the SDK is working as expected.

Figure 02: Integration SDK – mp-test run.

As last step using the Integration SDK I have tested if building the Management Pack to provide the actual pak file using mp-build also works. For the build process we need to provide the path to the registry we have created in the Docker section: If you are not already logged in to your Docker Registry, you will be prompted for a login.

Figure 03: Integration SDK – mp-build run.

The ready to install pak file is located in the build directory.

(venv-Hello World) tkopton@ubuntu01:~/intergration-sdk-projects/hello-world$ cd build/
(venv-Hello World) tkopton@ubuntu01:~/intergration-sdk-projects/hello-world/build$ ls -al
total 40
drwxr-xr-x 2 tkopton tkopton 4096 Mai 8 10:47 .
drwxr-xr-x 11 tkopton tkopton 4096 Mai 8 10:44 ..
-rw-rw-r-- 1 tkopton tkopton 31376 Mai 8 10:47 HelloWorld_1.0.0.pak
Management Pack Installation and Start

The installation of the Management Pack into the Integrations Repository in Aria Operations does not differ from any other Management Pack installation.

Figure 04: Management Pack installation.

The creation of an Adapter Instance is very simply as this is a sample Management Pack without any real functionality and configuration options.

NOTE: Integration SDK Management Pack Adapter Instances need to run on a Cloud Proxy!

Figure 05: Adapter Instance configuration.

It basically monitors itself providing very few metrics.

Figure 06: Sample Management Pack Adapter Instance collecting data.

In one of the upcoming blog posts, I will delve deeper into the development of real Management Packs and describe the details more precisely

Stay safe.

Thomas –

Leave a Reply

Your email address will not be published. Required fields are marked *