What's on this page

Infrastructure Keys 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 Create Compute instances accessible with SSH keys that are stored securely in TNC-O (Brent), and provided to lifecycle scripts and inventory to be able to connect to the instance. 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: »

Create Resource

Create the Resource Project The resource comprises 2 Apache servers defined in a HEAT template (one that uses an existing SSH key pair pre-created in Openstack, the other uses a new SSH key pair created by the HEAT template) and configured by Ansible playbooks. 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 »

Add Shared Infrastructure Key to TNC-O

Add the Shared Infrastructure Key to TNC-O See infrastructure key management for a general introduction to infrastructure keys. The resource descriptor defines a server1_ssh_key key property which is populated with the apache1_server_key shared infrastructure key by TNC-O when the Resource driver that stands up the Openstack Apache instance is called. This (SSH) key is assumed to already exist in Openstack (see prerequisites), and also needs to be added (at least the private key portion) as a shared infrastructure key to TNC-O to allow Resource drivers to communicate with the infrastructure in order to provision it. »

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. »