What's on this page

Create a Brent Resource Package

Introduction and Structure

A Brent resource package is a zip file conforming to a specific layout. For example, if the resource uses the Openstack driver and Ansible driver, the resource package directory will be as follows:

Definitions/
  lm/
    resource.yaml         # mandatory
Lifecycle/
  ansible/
    config/
      host_vars/
        myhost.yaml
      inventory
    scripts/
      Install.yaml
      Start.yaml
  openstack/
    heat.yaml

The Definitions directory contains the TNC-O descriptor file. The Lifecycle directory should be populated with scripts and templates required by the chosen driver(s).

Creating a Resource Package

You can create a Resource package by creating the necessary directories and files described in the section below, then zipping the contents of the parent directory using any zip command line tools or applications. However, it is more efficient to first create a skeleton Resource package using LMCTL v2.4.1+. To do this, use the project create command with the brent --rm option:

mkdir Example && cd Example
lmctl project create --type Resource --rm brent

When you are ready to build your project, use the project build command:

lmctl project build

This will create an LMCTL package at _lmctl/build. Note that the LMCTL package is not a Resource package. The package and it’s structure is specific to LMCTL, the Resource is actually inside. You should continue to use LMCTL to manage the package rather than attempting to directly onboard it through Rest APIs.

You can push the package to a Telco Network Cloud Orchestration (TNC-O) environment with project push:

lmctl project push myenvironment

See the example resource package guide for more details on the construction of a Brent resource package, including how to build on the skeleton generated by lmctl.

If you have an existing example resource package for TNC-O v2.1 that you wish to reuse, you can install LMCTL v2.5.0+ and use --autocorrect flag to adapt your package to work with TNC-O v2.2:

lmctl project validate --autocorrect

Next Steps

Once you understand the basics of a Resource package, you may move on to understand Drivers and how they are used by Brent to manage the Resource.