This patch is a part of Legacy APIs deprecation.
Currently, the Tacker uses Mistral for the VIM monitoring but for
nothing else. Maintaining dependency on Mistral only for this feature
is ineffective in terms of maintainability. Moreover, the main use case
of Tacker is now VNFM that is not responsible for VIM monitoring.
This patch removes the dependency on Mistral for VIM monitoring.
Note: although there's no actual use, Tacker also depends on Mistral in
NS LCM, which will be removed by a different patch.
Implements: blueprint deprecate-legacy-apis
Change-Id: Ia11496da7942457239df59b52af817c76e736013
This patch fixes the problem of aborting the wait process even if there
are pods left to be removed by replace when container update feature.
Closes-Bug: #1998756
Change-Id: I6bc5c10fe4c7f646b84798d3b4a296721ccea0f8
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
In the current implementation, when users invoke update operation of
ConfigMaps and Secrets, all Pods are restarted even if they don't use
those updated ConfigMaps and Secrets.
This patch filters out ['Pod', 'Deployment ', 'Replicaset',
'Daemonset'] using the updated ConfigMap/Secret on the original
functionality and updates these resources. No more restarting all
Pods.
Implements: blueprint enhancement-container-update
Change-Id: I2c058979a65fc80c4486bd1f7dfada26ea89d7fd
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
Added a sample VNF package for practical use cases.
In this sample, the use cases listed below is supported.
- using multiple deployment flavours
- deploying VNF connected to an external network
- deploying VNF as HA cluster
- deploying scalable VNF
Implements: blueprint add-vnf-package-sample-for-practical-use-cases
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814511
Change-Id: I1c55e028b96ba3c1ad26270d359e0b1165670078
This patch supports MgmtDriver in the operation of modifying VNF.
It provides a sample script MgmtDriver, when modifying CNF,
If the ConfigMap and Secret are updated, the Pod and Deployment will
also be updated (image only).
Implements: blueprint container-update
Change-Id: I1e7a1b03fef13f4c7a83488f6d2fdd7efc2e454b
The LCM retry operation of CNF and MgmtDriver(k8s-cluster)
was verified.
To fix these errors, the following things is done in this patch:
1. When executing retry, if the status of vnf is ERROR, change ERROR to
the status of the corresponding lifecycle.
2. In the scale operation, the judgment condition is added. When vim is
not kubernetes, the `scaleGroupDict` assignment will be used.
3. When an exception occurs in terminate, the task_state in
vnf_instance is changed to None.
4. In the scale operation, add an else branch. If before_error_point is
greater than 4, get resource_changes from vnf_info first. If
resource_changes does not exist, get it by calling the
self._scale_resource_update method.
5. At the beginning of instantiate/heal/terminate, when modifying the
status of vnf, add the judgment condition. When the status is not
ERROR, it can be modified.
6. In the heal/scale operation, add a judgment condition to judge
whether the node exists, and only when the node exists, the delete node
command will be executed.
7. In the instantiate operation, before creating the stack, add to
determine whether the stack already exists.
8. (1) When installing the k8s node with MgmtDriver, add to determine
whether the node already exists in the cluster. If it exists, skip
the node and install the next node.
(2) After installing the k8s cluster, when registering VIM, add to
determine whether the VIM already exists, and if it exists, use it
directly.
Closes-Bug: #1942277
Change-Id: If4e695120eb432155499a2e866ae651a18a320ab
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC VNF samples for the operation verification,
which corresponds to ETSI NFV Plugtests Conformance testing.
This patch adds the following VNF packages.
- VNF
- VNF base
- ChangeExtConn
- Anti-Affinity
Implements: blueprint free5gc-vnf-samples
Change-Id: Ie3e501452b58d4f51ceb793dc1246fb3021546c6
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC CNF samples for the operation verification,
which corresponds to ETSI NFV Plugtests Conformance testing.
Implements: blueprint free5gc-vnf-samples
Change-Id: I414d5c550dc7a45df1c873f8e4313bcc19955a3d
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC CNF on VM samples for the operation
verification, which corresponds to ETSI NFV Plugtests Conformance
testing.
This patch adds the following VNF packages.
- CNF on VM
- CNF
- VNF
Implements: blueprint free5gc-vnf-samples
Change-Id: Ie70b1ebbf43f2ed26fe8e7e3b5dd720c11fdca51
After the X version was released, regression tests were performed
on all functions of MgmtDriver. This patch is used to fix
these bugs.
1. Add the process of getting 'FloatingIP' to kuberenetes_mgmt.py
and private_registry_mgmt.py files, so that users can access the
Registry and Storage VM through the floatingIP when using the CIR
and Storage functions.
2. When the registry is accessed through https, add a `break`
process to the while loop connection in the
`_connect_to_private_registries` method in kuberenetes_mgmt.py
to break out of the loop.
3. Modify the type field in podaffinity_hot_top.yaml to match
the name in the nested directory.
4. When using the pod-affinity function, if multiple
'OS::Nova::ServerGroup' resources are created at the same time,
the id of the resource cannot be matched to the workerNode.
Modify the original process of obtaining the id directly,
instead, first obtain the `physical_resource_id` of all
'OS::Nova::ServerGroup' resources, and then match the id in the
workerNode information to obtain the target id.
5. Modify the method of obtaining the kubespray VM's password
in kubespray_mgmt.py.
Closes-Bug: #1949926
Change-Id: I2e966df35f874e14c39792a6882ee913ac424663
Support deploying Kubernetes cluster VNF which has a storage server
with Cinder volume. This feature enables users to deploy CNF which
has PersistentVolume on it. The following changes are added for
MgmtDriver.
1.Create a storage server VM with Cinder volume.
2.Expose Cinder volume as NFS shared directories in the storage
server.
3.Register NFS shared directories as Kubernetes PersistentVolumes.
4.Install NFS client on newly created Master/Worker VMs in all LCM
operations.
Implements: blueprint pv-k8s-cluster
Change-Id: Iaab9b6393e6f2007c637f83a82de0d27cf9db257
This patch implements spec
Support deployed Kubernetes cluster using the images in a Docker
private registry with MgmtDriver in blueprint bp/cir-k8s-cluster.
It includes mgmt_driver scripts of deploying a Docker private
registry to vm created by openstack_driver.
Support instantiate/terminate/heal function.
It includes mgmt_driver scripts of deploying kubernetes cluster
that can use images in Docker private registry to vm created by
openstack_driver.
Support instantiate/terminate/scale/heal function.
It also includes a shell script that actual install kubernetes
cluster and configure environment to support Docker private registry
on vm.
Implements: blueprint cir-k8s-cluster
Change-Id: I7adab1d1eaa491a37399d0b615cbee4c6ae86657
This patch and "Sample script for deploying k8s with kubespray",
"Sample script for scaling k8s with kubespray" are actually the
same one. For the convenience of review, they
were submitted separately.
This patch is only about the content of heal k8s nodes. However,
since the processing of scale_start is similar to heal_start,
and the processing of scale_end is similar to the processing of
heal_end, the code of scale has been refactored and the common
processing is extracted as a common method. At the same time,
when CNF needs to perform `heal_entire`, the configuration file
of Load Balancer needs to be re-modified, so heal-related
processing is added to the example MgmtDriver of CNF's `NodePort`.
Because the input parameter of terminate and heal is limited,
the type of this parameter is also modified. In
`NFV-SOL003 v2.6.1`[1], the `additionalParams`'s type is
`KeyValuePairs`, so we changed the additionalParams's type from
`list` to `dict` in heal_vnf_request. In order not to affect
the original function, we modified the original additional_params
to legacy_additional_params and retained the original processing,
and revised the UT code.
[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ibf8b56904b1326f5c7d323c9295d10e303f4b4b8
This patch and "Sample script for deploying k8s with kubespray"
are actually the same one. For the convenience of review, they
were submitted separately.
This patch is only about the content of scale k8s nodes. Since
the content of `NodePort` is not involved when scaling CNF,
there is no need to modify the configuration of Load Balancer.
The type of input parameter `additionalParams` of
ScaleVnfRequest is `DictOfStringsField`. The type of Kubernetes
cluster parameters used in MgmtDriver is dict, `DictOfStringsField`
type cannot adapt it. So we modify the type of additionalParams to
`DictOfNullableField`.
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ib5e009c53dd834624d91ea38c9facba832d65d2b
This patch provides a sample script that allows users to install
or delete kubernetes on VMs in the VNF when executing
instantiate/terminate/scale/heal through the kubespray ansible
server.
It also provides script to install and configure Load Balancer
for kubernetes cluster in the VNF.
When instantiating CNF with service resource whose type is
`NodePort` on Kubernetes VIM deployed by kubespray, its port must
be added into Load Balancer's configuration and restart it. So
this patch also provides a sample MgmtDriver and shell script
to fix this problem.
At the same time, we found that if instantiate operation fails,
after the `instantiate_end` operation, the `terminate_end` operation
will not be executed in the rollback, which may cause the
modification in `instantiate_end` remains in the environment, so
this patch adds a `terminate_end` operation in `post_rollback_vnf`.
Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: I45661b5d8006e87db5f46a595756231849723ce6
This patch support pods to be scheduled on the different
physical Compute server. Through the policy attribute of
the VDU, the Worker node can be instantiated on different
Compute server. Then we can obtain the Compute information
where the worker node is located, and use it as the label
of the Worker node. Finally, pod will be deployed on
different Worker nodes based on labels.
Implements: blueprint hardware-aware-pod-affinity
Change-Id: I71dc5bed94654c19bace77c11fe1202ccdc549c9
Implements new interface for Kubernetes VIM to handle Helm chart.
It enables Users to include Helm chart files as MCIOP in their VNF
Packages, to instantiate and to terminate CNF with them.
And update sample of MgmtDriver to install and configure Helm package
for using Helm cli command in the deployed Kubernetes cluster VNF, and
to restore the registered helm repositories and charts after the master
node is healed.
Implements: blueprint helmchart-k8s-vim
Change-Id: I8511b103841d5aba7edcf9ec5bb974bfa3a74bb2
The current `Tacker User Guide` page doesn't have `Getting Started` for
ETSI NFV-SOL Tacker.
Added `Getting Started with ETSI NFV-SOL Tacker`.
Also, added sample files, such as a VIM config file, VNF packages and a
VNF instantiation parameters file, to the `samples` directory, which
are referred from the `Getting Started` page.
Change-Id: I58dadaa6c99fc45a34d87218c4d943e2572aa0a1
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
We've been using old cirros-0.4.0 for long time, and don't need to fix
the version of cirros to 0.4.0. This patch is update to the latest
0.5.2.
Most of the changes in this patch is replacing `image`, `hash` and
`version` in TOSCA definition files. The rest of them are:
* Replace images. First one is only an actual image, and rest of them
are empty text files which is a trick for reducing total size in
tacker repo. So, text files are not replaced, but renamed simply.
* tacker/tests/etc/samples/etsi/nfv/common/Files/images/cirros-0.5.2-x86_64-disk.img
* samples/vnf_packages/Files/images/cirros-0.5.2-x86_64-disk.img
* tacker/tests/etc/samples/etsi/nfv/test_csar_utils_data/sample_vnfpkg_no_meta_single_vnfd/Files/images/cirros-0.5.2-x86_64-disk.img
* tacker/tests/etc/samples/sample_vnf_package_csar_in_meta_and_manifest/Files/images/cirros-0.5.2-x86_64-disk.img
* Update functional tests verifying images. A refactor of defining
package size is included.
* Update devstack script, and helper scripts under `contrib` dir.
* Update API references and documents describing usage of the image.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Implements: blueprint update-cirros-052
Change-Id: I081b791dc986ab10f4845784b3e19dbb626e3cac
In kubernetes_mgmt, it will find 'Install Failed!\n' in stdout
to judge raise a exception of script install failed.
However in recent fix, we changed error message from script,
thus kubernetes_mgmt cannot catch error msg from stdout,
exception will not be raised.
This patch will fix matching error message in kuberntes_mgmt.
Closes-Bug: #1922192
Change-Id: Iffb3e045cbe121aca0fc74621cc5b3b5daf69f5b
2 new methods are added at last time merge of
Wallaby release in vnflcm_abstract_driver.py.
* change_external_connectivity_start()
* change_external_connectivity_end()
(tacker/vnfm/mgmt_drivers/vnflcm_abstract_driver.py#L88)
In kubernetes_mgmt.py,
(sample/mgmt_drivers/kubernetes_mgmt.py)
we inherited VnflcmAbstractDriver thus we also
needed to implements these 2 methods here.
Due to we don't have these interfaces here, I updated
empty methods for clear runtime error.
Change-Id: I9f918ceff9882da1bff4b1cc953602a3b84aec0c
While calling _get_by_name() in kubernetes_mgmt, it is passing
self + other 3 parameters.
However it is calling _get_by_name() by instance,
thus passing self is not needed and will cause an unmatch
parameters error during Terminate process
Closes-Bug: #1922194
Change-Id: Ic4601cb277c02b2d41263724bb2ce21e7d24cdbb
An error occurs in tox due to an incorrect setting of
properties related to tosca.policies.tacker.Scaling.
Therefore, this patch fixes the related VNFDs.
The error is occurring in unittest and FT, so fix both.
At the same time, there was a problem with the version of
heat-translator, so modify the following files as well.
- lower-constraints.txt
- requirements.txt
Co-Authored-By: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Iae2b25abe53eda483e811171306d3d375a7e1687
Closes-Bug: #1921996
This patch fixes some bugs related legacy cnf operations below:
* Delete the "unsupported key check" of policies in TOSCA template, to
resolve `openstack vnf create` command failure due to property
validation of policies.
* Change the branch condition of legacy/sol, to resolve the
`openstack vnf scale` command failure due to keyError.
* Add interval to each retry loops of delete_wait_legacy, to resolve
the `openstack vnf delete` command failure.
And this patch revises the documentation for legacy cnf operations to
work properly.
Closes-Bug: #1920085
Change-Id: If14b95b2f9dfafe994a5ebf4f447a2bf7d27981c
This patch implements spec
Support deploying Kubernetes cluster with MgmtDriver
in blueprint bp/cnf-support-with-etsi-nfv-specs.
It includes sample mgmt_driver scripts of deploying
kubernetes cluster to vm created by openstack_driver.
Support instantiate/terminate/scale/heal function.
It also includes a shell script that actual install
kubernets cluster on vm, and an use guide to show
how to use this sample script.
Implements: bp/cnf-support-with-etsi-nfv-specs
Change-Id: I4d0085ffa3b4c90741ebb169b96f69113e2bb6d7
The CSAR file for VNF package registered as a sample fails to run
the VNF LCM instantiate. The cause of this issue is typo and invalid
definition for the VNFD. I think that the csar zip file for uploaded VNF
package should be able to run the VNF LCM instantiate normally.
Therefore, fix typo and invalid definition for the VNFD in the CSAR file.
Also, fix to the following settings that has a dependent on environment
because the current VNFD can only be run in the limited environment.
* Change hash algorithm from sha-256 to sha-512 according
the Glance default hash algorithm
* Change from 8192 MB to 256 MB in the `min_ram` size of
the VirtualStorage to work even in a low specification environment
* Delete `CP1.properties.vnic_type` to work even under a virtual
environment
Change-Id: Icccaa523d33115e8b7ec0a6fd7e9c5f177d0a363
Closes-Bug: #1886124
This update is for revising contents of documents, especially for styles,
because current tacker documentation does not follow the guidelines [1].
Other than styles, this patch revises things bellow. However, [2] and
[3] are still remained old because they are very different situation
with other parts, too old and redhat distro based. It seems better to
remove the contentents insteads of upudate, but neet to have a
discussion before to decide.
* Update old links, such as referring to github.com.
* Correct explanations which are not wrong, but misunderstanding.
* Replace code blocks of `local.conf` with literalinclude to reduce
unnecessary lines.
* Fix collapsed descriptions in format.
[1] https://docs.openstack.org/doc-contrib-guide/rst-conv.html
[2] https://docs.openstack.org/tacker/latest/install/openstack_vim_installation.html
[3] https://docs.openstack.org/tacker/latest/install/kolla.html
Change-Id: I9a2a58a804ff65dff356b424e12f605066717844
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Cirros and OpenWRT images are downloaded and registered to Glance during
Tacker devstack installation. But it is better to avoid these external
dependencies so that we can complete the installation even if image
download links are broken.
Change-Id: I8bd9ef27267ae2097d9cdce5d655c77d9e4a3aad