Enhancement of the Ansible Driver To improve flexibility, we will add:
1. Ansible version selection in the VNF-Package
2. Environment variable config for ansible-playbook in tacker.conf
Feature 1 allows tenants to specify the Ansible version for their
validated playbooks. This prevents issues caused by using a single
Ansible version in Tacker.
Feature 2 enables administrators to configure ansible-playbook
options (e.g., log storage locations, callback plugins) via
tacker.conf, removing the need for source code modifications.
Implements: blueprint enhance-ansible-driver-2024oct
Change-Id: Iafd64e6647d8b1868244fb52ef1ae900c066ad61
The Ansible driver can only run specific script files.
Due to multi artifact support of mgmt driver, it will be extended to
specify script files to be executed in each life cycle.
Implements: blueprint add-ansible-mgmt-driver-sample
Change-Id: Id584a41fc7ae64a682d6dd390a38913e2c7e655b
Tested the Mgmt Driver in the Yoga version and found some bugs.
To fix these bugs, the following things have been done in this
patch:
1. When checking whether the node has k8s installed, since the
value of result.get_stderr() is a list, an error will occur
in the if branch, and the value needs to be modified.
2. Use the _init_commander_and_send_install_scripts function
instead of the RemoteCommandExecutor function to prevent the
VM from getting an error when the connection fails during
the startup phase.
3. Added the type of exceptions caught by the
_init_commander_and_send_install_scripts function.
4. Change the scale_stack_id to scale_out_id_list uniformly to
solve the parameter mismatch between the input values for
mgmt_drvier in vnflcm_driver and mgmt_driver.
5. Add modify_information_start and modify_information_end to
Mgmt Driver.
6. When using the Mgmt Driver to modify the content of the
haproxy configuration file, use the exact match of grep to
find the corresponding line number.
Closes-Bug: #1976440
Change-Id: I94f011fd5061b04dff0840bf90ca10ae2a677874
This patch contains a sample VNF Package that has ansible driver
artifacts. It will be a useful reference for users who choose to use
ansible to configure their target VNFs.
User document of ansible driver usage will be added.
It describes the conditions for running the script, how to create the
package, and an example of how it works.
Implements: blueprint add-ansible-mgmt-driver-sample
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814689
Change-Id: Ibbb9115a938de19e48f06c59af6bd7e7b222706d
Added a sample Ansible Driver as an option for users
who want to use ansible for configuration of VNFs.
In this Sample Ansible Driver, the following key LCMs
are supported:
- instantiate_end
- scale_start
- scale_end
- heal_end
- terminate_start
Implements: blueprint add-ansible-mgmt-driver-sample
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814689
Change-Id: I539f1ab5442196865155f12fe0b2b4106feedeae