8 Commits

Author SHA1 Message Date
Hitomi Koba
025a21d9f3 Enhancement of the Ansible Driver
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
2025-03-11 12:41:30 +00:00
Takashi Kajinami
db2dee07a3 Remove six from sample scripts
six is no longer needed since python 2 support was removed.

Change-Id: I87eef25a2e9f81aa6c6a31f4dcb9c900b8984162
2024-09-06 05:55:38 +00:00
Takashi Kajinami
def6216576 Replace CRLF by LF
... because LF is now commonly used as newline code.

Change-Id: Iaebf9330fb1305d9314d9fec05f9923efd7e61c6
2024-03-15 01:02:00 +09:00
Pooja Singla
03dcde328f Support multi artifact of ansible driver
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
2022-09-13 08:19:02 +00:00
Yi Feng
9d5a84c2fd Fixed some bugs for Mgmt Driver
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
2022-08-31 11:10:32 +09:00
Zuul
233a12c378 Merge "Add a Sample VNF Package for Ansible Driver" 2022-03-18 02:23:19 +00:00
Aldinson Esto
147f8c43ca Add a Sample VNF Package for Ansible Driver
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
2022-03-16 10:37:46 +00:00
Aldinson Esto
611b8b1043 Add a Sample Ansible Driver
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
2022-03-16 10:27:08 +00:00