The multi-cloud layer hpa discovery pluggable 89/98089/4
authorHaibin Huang <haibin.huang@intel.com>
Thu, 7 Nov 2019 07:16:10 +0000 (15:16 +0800)
committerHaibin Huang <haibin.huang@intel.com>
Thu, 5 Dec 2019 06:53:18 +0000 (14:53 +0800)
Issue-ID: MULTICLOUD-694
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Change-Id: I48b7e0540acc36f9d147fb2c5ab08ea7270e735c

docs/multicloud-hpa-discovery-pluggable.rst [new file with mode: 0644]

diff --git a/docs/multicloud-hpa-discovery-pluggable.rst b/docs/multicloud-hpa-discovery-pluggable.rst
new file mode 100644 (file)
index 0000000..ff330bb
--- /dev/null
@@ -0,0 +1,138 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright (c) 2017-2018 VMware, Inc.\r
+\r
+==================================\r
+MultiCloud HPA Discovery Pluggable\r
+==================================\r
+\r
+To better support more HPA capabilities without modifying the implementation code\r
+for Multicloud. So we need to extract the HPA discovery part of the code and make\r
+it into many drivers(HPA Discovery Driver). if we want to add new HPA feature  or\r
+modify the implementation code for the  existing  feature, we just need to modify\r
+HPA Discovery Driver code.\r
+\r
+Problem Description\r
+===================\r
+\r
+Currently, every time we add or modify an HPA feature, we need to modify the part\r
+of HPA discovery code,  which will affect the other HPA features. It is difficult\r
+for device vendors to participate because they need to understand the entire ONAP\r
+process.\r
+In fact, we should design it so that it only requires the vendor to focus on both\r
+discovery and use.\r
+\r
+\r
+Propose Change\r
+==============\r
+\r
+Extract the original part of HPA discovery code and make it into many drivers. we\r
+need to add hooks in Openstack,  Kubernetes and other plugins. then we develop\r
+drivers for various language. we will get below benefit:\r
+\r
+#. Each driver development is independent, and modifying the driver and adding\r
+the driver does not have any impact on each other.\r
+#. It is easier for vendors to participate in the development of ONAP. They no\r
+longer need to understand the whole working principle of ONAP, but only need to\r
+understand the interface of the driver.\r
+#. Any driver problem will not affect the HPA discovery process.\r
+#. The publishing difficulty of openstack package is reduced. Even if the latest\r
+driver has a little problem. We just need to point to the stable driver version\r
+of the pip package in the dockerfile.\r
+\r
+We plan to develop drivers in python language(in R6 release) and drivers in golang\r
+language(in R7 release).\r
+\r
+Add New Driver\r
+-------------------------------\r
+The hardware vendor determines whether upstream drivers. If vendor upstream driver,\r
+then submitted the driver code to multicloud/openstack repo. then He/She will also\r
+need package the driver and push to pip repo for distribution. In case that vendor\r
+doesn't upstream the driver, he/she could maintain the driver in local repo as well.\r
+\r
+  # Dockerfile(Example)\r
+\r
+  from multi-windriver:1.4.0\r
+\r
+  pip install <hpa-discovery-driver1(device vendor1)>\r
+\r
+  pip install <add hpa-discovery-driver2(device vendor2)>\r
+\r
+Driver Version Control\r
+----------------------\r
+\r
+We will make HPA discovery drivers as pip packages to release pip REPO. name like:\r
+\r
+onap-device-driver-<drivername>-<version>\r
+\r
+when we release the plugin, we will add the driver of pip package to the docker.\r
+\r
+Driver code Management\r
+----------------------\r
+For python language driver, we put it into multi-cloud openstack plugin.\r
+\r
+For golang language driver, we put it into multi-cloud kubernetes plugin.\r
+\r
+Security\r
+--------\r
+we solve one flavor each time, the result maximin is 1500 bytes. We will verify the\r
+validity of the data?\r
+\r
+CRUD\r
+----\r
+Driver don't write AAI, plugin will write AAI. driver just format data.\r
+\r
+Create\r
+^^^^^^\r
+Fill discover HPA data, transform data, format data in the driver, and then return\r
+the data, call AAI.\r
+\r
+Delete\r
+^^^^^^\r
+Driver don't write AAI and just return resource URL accord to flavor information.\r
+\r
+Update\r
+^^^^^^\r
+update flow is same as create flow.\r
+\r
+please see https://git.onap.org/multicloud/openstack/tree/share/common/msapi/helper.py L142\r
+\r
+Consume\r
+-------\r
+OOF can parse the AAI data, the driver just need to follow AAI schema. OOF output is\r
+oof_directives which is defined in https://git.onap.org/multicloud/framework/tree/docs/specs/multicloud_infra_workload.rst.\r
+\r
+check VIM capacity will store in driver. driver will get information from "Collectd". This will be completed in next release.\r
+\r
+FCAPS\r
+-----\r
+Driver with some issue: alarm(pool or other mode).\r
+if driver have some issues, the hpa capabilities will be empty.\r
+\r
+Usage\r
+=====\r
+Local use\r
+---------\r
+\r
+To integrate with multicloud openstack plugin, run below command\r
+\r
+ $ python setup.py build\r
+\r
+ $ python setup.py install\r
+\r
+based on pip package\r
+--------------------\r
+\r
+To integrate with multicloud openstack plugin, run below command in create docker image\r
+\r
+ $ pip install <package-name>\r
+\r
+Tests\r
+=====\r
+\r
+#. Unit Tests with tox.\r
+#. Integration test will use SRIOV-NIC as example.\r
+\r
+Reference\r
+=========\r
+https://wiki.onap.org/display/DW/Multicloud+HPA+Discovery+Pluggable\r