Onboarding Virtual Network Functions on OpenStack
You must fulfill the following prerequisites before onboarding VNFs on OpenStack:
The VNF image formats must be compatible with OpenStack, for example qcow2 format. The image can be onboarded on OpenStack either by the OpenStack glance client, or by ESC using the NETCONF or REST APIs.
The day 0 configuration file passed into the VM must be compatible with either the OpenStack config-drive or the user-data, so that the VMs can use the day 0 configuration details for bootstrap mechanism.
The day 0 variables must be in plain text format and use the predefined day 0 variables, so that the VMs can use the static IP information available in the day 0 file.
Preparing the Deployment Data Model
You must prepare the deployment data model as part of VNF onboarding. The deployment data model is an XML file (template) that describes the operational behavior such as resource requirements, networking, monitoring KPI, placement policies, lifecycle stages (LCS), scaling rules and so on.
Preparing the Data Model for OpenStack Deployment
The VNF deployment data model is an XML file or template describing the resource requirements, networking, day zero configuration, and other service operational behaviors such as monitoring KPI, placement policies, lifecycle stages, scaling rules and so on.
To onboard a VNF and define the VNF services in the deployment data model, you must:
Prepare the VM Resources
Describe the VNF Networking
Prepare the Day Zero Configuration
Define the operational behaviors such as metrics and KPIs, in the deployment data model
Preparing the VM Resources
The deployment data model refers to resources such as tenants, images, flavors, volumes and so on to deploy the VNFs. You can either create these resources using ESC, or use the preexisting resources already available on OpenStack. For more information, see Managing Resources Overview.
A sample data model with the resources is as follows:
<?xml version="1.0" encoding="ASCII"?> <esc_datamodel xmlns="http://www.cisco.com/esc/esc"> <tenants> <tenant> <name>vnf_tenant</name> <deployments> <deployment> ... <name>vnf-dep</name> <vm_group> <name>Grp1</name> <flavor>vnf_flavor</flavor> <image>vnf_image</image> ... </vm_group> </deployment> </deployments> </tenant> </tenants> </esc_datamodel>
Describing the VNF Network
The deployed VMs in the VNF must connect to specific networks for different purposes. These networks could be the management network, the internal networks within VMs, and so on. Make sure these networks are either available on OpenStack, or created by ESC. You must define these networks in the deployment data model to create them during deployment. For more information, see Managing Networks.
A sample deployment data model showing how to create networks and subnetworks, and specify the network connection for the VM interfaces is as follows:
<deployment> <name>vnf-dep</name> ... <networks> <network> <name>vnf_net</name> <shared>false</shared> <admin_state>true</admin_state> <subnet> <name>vnf_subnet</name> <ipversion>ipv4</ipversion> <dhcp>true</dhcp> <address>172.16.0.0</address> <netmask>255.255.255.0</netmask> <gateway>172.16.0.1</gateway> </subnet> </network> </networks> ... </deployment> </deployments> <vm_group> <name>Grp1</name> ... <interfaces> <interface> <nicid>0</nicid> <network>vnf_management</network> </interface> <interface> <nicid>1</nicid> <network>vnf_net</network> </interface> </interfaces> ... </vm_group>
Preparing the Day Zero Configuration
As part of the Day Zero configuration, the day zero file is passed into the VNF at the time of installation for bootstrapping. The day zero file is described in the deployment data model. For more information, see Day Zero Configuration.
A sample describing the day zero file as config drive and user data is as follows:
<config_data> <configuration> <dst>--user-data</dst> <file>file://var/test/test-script.sh</file> </configuration> <configuration> <dst>/etc/configure-networking.sh</dst> <file>file://var/test/configure-networking.sh</file> </configuration> </config_data>
Defining the Operational Behavior
To onboard composite VNFs, you must configure some of the operational behaviors such as network connections, monitoring KPIs, placement policies, lifecycle stages, scaling rules and so on. These behaviors can be described in the deployment data model. For more information, see Deployment Parameters.
Once you have prepared the deployment data model with these details, you have onboarded the VNF and instantiated the VNF service on OpenStack. Now you can deploy the VNF. When the VNF is deployed, ESC applies the day zero configuration for the new service. For more information, seeDeploying Virtual Network Functions on OpenStack.For information on preparing the VNFs on VMware vCenter, see Preparing the Data Model for VMware vCenter Deployment.