blob: 8f618bba55a5008a25bf5eae7905b42a9dc8ea4c [file] [log] [blame]
Yun Huang87e46652018-06-14 21:43:04 +08001..
2 This work is licensed under a Creative Commons Attribution 4.0
3 International License.
4
5===================================
6ONAP MultiCloud HPA Deployment Guide
7===================================
8
9The guide for MultiCloud HPA Deployment.
10
11Architecture & Policies & Mappings
12============
13
14Please refer to the link for more architecture details:
15
16https://wiki.onap.org/pages/viewpage.action?pageId=20874679
17
18Please refer to the link for more Policies&Mappings details:
19
20https://wiki.onap.org/display/DW/HPA+Policies+and+Mappings
21
22Prerequisites
23============
24configure openstack with proper flavors (with name prefixed by "onap." to carry HPA information to ONAP), example flavor:
25
26.. code-block:: console
27
28 nova flavor-create onap.hpa.medium 110 4096 0 6
29 #cpu pining
30 nova flavor-key onap.hpa.medium set hw:cpu_policy=dedicated
31 nova flavor-key onap.hpa.medium set hw:cpu_thread_policy=prefer
32 #cpu topology
33 nova flavor-key onap.hpa.medium set hw:cpu_sockets=2
34 nova flavor-key onap.hpa.medium set hw:cpu_cores=4
35 nova flavor-key onap.hpa.medium set hw:cpu_threads=8
36 #hugepage
37 nova flavor-key onap.hpa.medium set hw:mem_page_size=large
38 #numa
39 nova flavor-key onap.hpa.medium set hw:numa_nodes=2
40 nova flavor-key onap.hpa.medium set hw:numa_cpus.0=0,1 hw:numa_cpus.1=2,3,4,5 hw:numa_mem.0=2048 hw:numa_mem.1=2048
41
42collect following information for on-boarding this Cloud instance to ONAP:
43
44.. code-block:: console
45
46 your openstack project name
47 your openstack user
48 your openstack password
49 your openstack keystone endpoint
50 your openstack Region ID: e.g. RegionOne
51 your openstack owner name/ID (any string without underscore character '_'), e.g. CloudOwner
52
53Note: along with the Region ID, the owner name/ID comprises unique ID of a cloud region within ONAP
54
55With Heat based ONAP:
56
57.. code-block:: console
58
59 export ONAP_AAI_IP=<floating IP of VM with name "onap-aai-inst1">
60 export ONAP_AAI_PORT=8443
61 export ONAP_MSB_IP=<floating IP of VM with name "onap-multi-service">
62 export ONAP_MSB_PORT=80
63
64With OOM based ONAP:
65
66.. code-block:: console
67
68 export ONAP_AAI_IP=<floating IP of VM with name "k8s_1">
69 export ONAP_AAI_PORT=30233
70 export ONAP_MSB_IP=<floating IP of VM with name "k8s_1">
71 export ONAP_MSB_PORT=30280
72
73The geographic location of the cloud region
74============
75make sure there is complex object to represent the geographic location of the cloud region
76in case you need create a complex object "clli1":
77
78.. code-block:: console
79
80 curl -X PUT \
81 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/complexes/complex/clli1 \
82 -H 'Accept: application/json' \
83 -H 'Authorization: Basic QUFJOkFBSQ==' \
84 -H 'Cache-Control: no-cache' \
85 -H 'Content-Type: application/json' \
86 -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \
87 -H 'Real-Time: true' \
88 -H 'X-FromAppId: jimmy-postman' \
89 -H 'X-TransactionId: 9999' \
90 -d '{
91 "physical-location-id": "clli1",
92 "data-center-code": "example-data-center-code-val-5556",
93 "complex-name": "clli1",
94 "identity-url": "example-identity-url-val-56898",
95 "physical-location-type": "example-physical-location-type-val-7608",
96 "street1": "example-street1-val-34205",
97 "street2": "example-street2-val-99210",
98 "city": "Beijing",
99 "state": "example-state-val-59487",
100 "postal-code": "100000",
101 "country": "example-country-val-94173",
102 "region": "example-region-val-13893",
103 "latitude": "39.9042",
104 "longitude": "106.4074",
105 "elevation": "example-elevation-val-30253",
106 "lata": "example-lata-val-46073"
107 }'
108
109Register a cloud region
110============
111register a cloud region to represent the VIM with the specific tenant
112
113note: please update the parameters enclosed with "<>"
114
115.. code-block:: console
116
117 curl -X PUT \
118 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne \
119 -H 'Accept: application/json' \
120 -H 'Authorization: Basic QUFJOkFBSQ==' \
121 -H 'Cache-Control: no-cache' \
122 -H 'Content-Type: application/json' \
123 -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \
124 -H 'Real-Time: true' \
125 -H 'X-FromAppId: jimmy-postman' \
126 -H 'X-TransactionId: 9999' \
127 -d '{
128 "cloud-owner": "CloudOwner",
129 "cloud-region-id": "RegionOne",
130 "cloud-type": "openstack",
131 "owner-defined-type": "t1",
132 "cloud-region-version": "titanium_cloud",
133 "complex-name": "clli1",
134 "cloud-zone": "CloudZone",
135 "sriov-automation": false,
136 "identity-url": "WillBeUpdatedByMultiCloud",
137 "esr-system-info-list": {
138 "esr-system-info": [
139 {
140 "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",
141 "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",
142 "user-name": "<your openstack user>",
143 "password": "<your openstack password>",
144 "system-type": "VIM",
145 "ssl-insecure": true,
146 "cloud-domain": "Default",
147 "default-tenant": "<your openstack project name>",
148 "system-status": "active"
149 }
150 ]
151 }
152 }'
153
154associate the cloud region with the location object:
155
156.. code-block:: console
157
158 curl -X PUT \
159 https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/relationship-list/relationship \
160 -H 'Authorization: Basic QUFJOkFBSQ==' \
161 -H 'Cache-Control: no-cache' \
162 -H 'Content-Type: application/json' \
163 -H 'Postman-Token: 7407d60c-8ce7-45de-ada3-4a7a9e88ebd4' \
164 -H 'Real-Time: true' \
165 -H 'X-FromAppId: jimmy-postman' \
166 -H 'X-TransactionId: 9999' \
167 -d '{
168 "related-to": "complex",
169 "related-link": "/aai/v13/cloud-infrastructure/complexes/complex/clli1",
170 "relationship-data": [
171 {
172 "relationship-key": "complex.physical-location-id",
173 "relationship-value": "clli1"
174 }
175 ]
176 }'
177
178
179Trigger the MultiCloud registration
180===================================
181
182.. code-block:: console
183
184 curl -X POST \
185 'http://$ONAP_MSB_IP:$ONAP_MSB_PORT/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne/registry' \
186 -H 'Accept: application/json' \
187 -H 'Cache-Control: no-cache' \
188 -H 'Content-Type: application/json' \
189 -H 'Postman-Token: 8577e1cc-1038-471d-8b3b-d36fe44ae023'
190
191
192Verify
193======
194verify if the cloud region was registered properly (with HPA information populated)
195
196.. code-block:: console
197
198 curl -X GET \
199 'https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne?depth=all' \
200 -H 'Accept: application/json' \
201 -H 'Authorization: Basic QUFJOkFBSQ==' \
202 -H 'Cache-Control: no-cache' \
203 -H 'Content-Type: application/json' \
204 -H 'Postman-Token: 2899359f-871b-4e61-a307-ecf8b3144e3f' \
205 -H 'Real-Time: true' \
206 -H 'X-FromAppId: jimmy-postman' \
207 -H 'X-TransactionId: 9999'
208
209Note: The response of querying a cloud region above should return with a comprehensive cloud region object, you should find out the "hpa-capabilities" under certain flavor object with name prefixed by "onap."
210
211