What's on this page

Basic Resource Example

Prerequisites

Objectives This guide aims to show you how to: Create a working Resource with Openstack infrastructure Include an external IP address as part of the infrastructure so the Resource service can be accessed publicly Add lifecycle scripts to configure a software function for the Resource Create an instance of the Resource Prerequisites To follow this guide you will need: LMCTL v2.5.0+ A ready-to-use Telco Network Cloud Orchestration (TNC-O) environment An Openstack environment (for testing we recommend installing DevStack. »

Create Resource

Create the Resource Project Start by creating a directory for the Resource project and navigating to it mkdir hw-apache2 && cd hw-apache2 Use LMCTL to create the basis of a Resource project lmctl project create --type Resource --rm brent Each resource requires a resource descriptor in YAML format that is located in the ‘Definitions/lm/resource.yaml’ file of the resource package. The format of this file is defined by the TNC-O Resource Descriptor YAML Specification. »

Instantiate Resource

Push Resource Push the Resource project to your target environment with LMCTL lmctl project push example-env Add Resource to design Create a new Assembly in the Telco Network Cloud Orchestration (TNC-O) UI Open the Assembly design and click “Add Element” in the top right Add an element using the hw-apache2 Resource descriptor now available in the environment Select the “apache2-service” node in the designer and open the right hand panel by selecting the menu icon in the top right »

Add Lifecycle

Create Lifecycle and Operation Scripts The next step is to create scripts for the the standardized lifecycles (start, stop, configure, install, integrity and uninstall) and operations defined in the resource descriptor. The scripts may be implemented using any scripting language of choice, as long as there is a Resource Driver capable of executing them. Scripts are located in a subdirectory of the ‘Lifecycle’ directory of the resource package, named after the type of the Resource driver that will use them. »