Add sample ansible mgmt driver¶
This Specification describes a sample Mgmt Driver that enables VNF Configuration using Ansible.
In the current community code, there is no Mgmt Driver which enables VNF Configuration using Ansible. Ansible is a general purpose configuration management tool.
Enable VNF Configuration with specific LCMs and the following VNF Packages.
By using this driver, we can increase the configuration choices without having to include specific setting in the VNF. Since Ansible behaves according to Playbook, it has the advantage of executing a uniform configuration when deploying multiple VNF from a single VNF Package.
1) Support ansible driver configuration point of LCM¶
This sample ansible driver supports following configuration points of LCM.
2) Support VNF Package¶
Perform VNF configuration using a VNF Package with the following structure. There are two configuration points in Ansible Driver.
VNF Package !----TOSCA-Metadata !----Definitions !----Files !----Scripts !----ScriptANSIBLE !----BaseHOT !----UserData
Contains the settings for running Ansible Script. This includes the path to the Ansible Playbook that each LCM runs, and the orders that should be executed according to each VDU, etc. Also, here is defined the information for connecting to the host. Connection username, SSH _ Key information, etc.
vdus: VDUA: config: order: 1 vm_app_config: instantiation_end: - path: Scripts/VDUA-instantiation.yaml order: 0 heal_end: - path: Scripts/VDUA-healing.yaml order: 0 VDUB: config: order: 1 vm_app_config: instantiation_end: - path: Scripts/VDUB-instantiation.yaml order: 0 heal_end: - path: Scripts/VDUB-healing.yaml order: 0
The user needs to set an IP address to connect to the VNF for VNF Configuration. This sample driver uses the HOT outputs parameter to specify the Port used for VNF Configuration.
outputs: mgmt_ip-VDUA: value: get_attr: - CP1 - fixed_ips - 0 - ip_address
Contains the Playbook to run on each LCM. They execute the Playbook specified by the vnflcm driver and ScriptANSIBLE during each LCM operation.
The Ansible Driver Sample runs using the Ansible service on the same server as Tacker.
Data model impact¶
REST API impact¶
Other end user impact¶
Other deployer impact¶
Add parameter of mgmt_driver I/F in vnflcm_driver.py.
Add ansible driver sample at tacker/samples/mgmt_driver/ansible
Complete the documentation for the user using this sample driver.
How to find the prerequisites
How to create a package
How to operate LCM with this sample driver