1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
\r
2 .. http://creativecommons.org/licenses/by/4.0
\r
3 .. Copyright (c) 2019 Intel, Inc.
\r
5 =================================================
\r
6 MultiCloud for k8s HPA Discovery And Registration
\r
7 =================================================
\r
8 Discover HPA capability and register it to A&AI
\r
13 Kubernetes clusters using ONAP Multicloud K8s Plugin Project for R4/R5 do not report hardware
\r
14 features to A&AI. Consequently during the CNF/VNF life cycle CNFs/VNFs that require or recommend
\r
15 specific hardware during instantiation cannot dynamically reach the correct cluster and node that
\r
16 provides the needed hardware capabilities.
\r
22 Cluster Registration FLOW
\r
23 -------------------------
\r
24 #. Cluster is deployed.
\r
25 #. K8s registration agent is deployed on cluster.
\r
26 #. K8s registration agent gathers features and cluster info.
\r
27 #. K8s registration agent registers with K8s scheduler with labels identifying it's capabilities.
\r
28 #. K8s Scheduler hook gives HPA Placement Plugin hardware features.
\r
29 #. HPA Placement Plugins stores features in mongoDB.
\r
33 #. CLI registers cluster with K8s plugin.
\r
34 #. Registration asks HPA Placement for cluster features.
\r
35 #. HPA Placement gets cluster features from mongoDB.
\r
36 #. HPA Placement plugin returns map of nodes/features to registration.
\r
37 #. Registration module munges features into tenant/flavors updates AAI.
\r
39 Converting node feature label to flavor properties
\r
40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\r
42 Node feature label::
\r
44 feature.node.kubernetes.io/network-sriov.capable=True
\r
45 feature.node.kubernetes.io/network-sriov.configured=True
\r
46 feature.node.kubernetes.io/pci-1200_8086.present=True
\r
48 Comments: The other parameter we can set default because node feature label can not provide.
\r
53 +-----------------------------------------------------+-------------+
\r
55 +-----------------------------------------------------+-------------+
\r
56 | OS-FLV-DISABLED:disabled | False |
\r
57 | OS-FLV-DISABLED:ephemeral | 0 |
\r
58 | feature.node.kubernetes.io/network-sriov.capable | True |
\r
59 | feature.node.kubernetes.io/network-sriov.configured | True |
\r
60 | feature.node.kubernetes.io/pci-1200_8086.present | True |
\r
63 | name | k8s_sriov_1 |
\r
66 +-----------------------------------------------------+-------------+
\r
68 Add API for K8s Plugin
\r
69 ^^^^^^^^^^^^^^^^^^^^^^
\r
70 API V0 URL: POST http://{{MSB_IP}}:{{MSB_PORT}}/api/v0/multicloud-k8s/{{cloud-owner}}_{{cloud-region-id}}/registry
\r
71 API V1 URL: POST http://{{MSB_IP}}:{{MSB_PORT}}/api/v1/multicloud-k8s/{{cloud-owner}}/{{cloud-region-id}}/registry
\r
88 +--------------------+----------------------------------------------------------------------+
\r
90 +====================+======================================================================+
\r
91 | 202 - ACCEPTED | Discover HPA and successfully register it |
\r
92 +--------------------+----------------------------------------------------------------------+
\r
97 +----------------------------+--------------------------------------------------------------+
\r
99 +============================+==============================================================+
\r
100 | 500 - INTERAL_SERVER_ERROR | Some content in the request was invalid. |
\r
101 +----------------------------+--------------------------------------------------------------+
\r
111 API V0 URL: GET http://{{MSB_IP}}:{{MSB_PORT}}/api/v0/multicloud-k8s/{{cloud-owner}}_{{cloud-region-id}}/registry
\r
112 API V1 URL: GET http://{{MSB_IP}}:{{MSB_PORT}}/api/v1/multicloud-k8s/{{cloud-owner}}/{{cloud-region-id}}/registry
\r
129 +--------------------+----------------------------------------------------------------------+
\r
131 +====================+======================================================================+
\r
132 | 202 - ACCEPTED | Discover HPA and successfully register it |
\r
133 +--------------------+----------------------------------------------------------------------+
\r
138 +----------------------------+--------------------------------------------------------------+
\r
140 +============================+==============================================================+
\r
141 | 500 - INTERAL_SERVER_ERROR | Some content in the request was invalid. |
\r
142 +----------------------------+--------------------------------------------------------------+
\r
153 API V0 URL: DELETE http://{{MSB_IP}}:{{MSB_PORT}}/api/v0/multicloud-k8s/{{cloud-owner}}_{{cloud-region-id}}/registry
\r
154 API V1 URL: DELETE http://{{MSB_IP}}:{{MSB_PORT}}/api/v1/multicloud-k8s/{{cloud-owner}}/{{cloud-region-id}}/registry
\r
171 +--------------------+----------------------------------------------------------------------+
\r
173 +====================+======================================================================+
\r
174 | 204 - NO_CONTENT | Successfully delete HPA information from AAI |
\r
175 +--------------------+----------------------------------------------------------------------+
\r
180 +----------------------------+--------------------------------------------------------------+
\r
182 +============================+==============================================================+
\r
183 | 500 - INTERAL_SERVER_ERROR | Some content in the request was invalid. |
\r
184 +----------------------------+--------------------------------------------------------------+
\r
199 #. Expose API by broker and k8s plugin.
\r
204 #. Unit Tests with tox
\r
205 #. Pairwise test with AAI project.
\r
206 #. Integration test with vFW HPA test.
\r
207 #. CSIT Tests, the input/ouput of broker and k8s plugin see API design above.
\r
211 https://wiki.onap.org/display/DW/Extending+HPA+for+K8S
\r