Wrap long lines
[multicloud/framework.git] / docs / multicloud-plugin-windriver / Tutorial-Onboard-WindRiver-TitaniumCloud.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0\r
2 .. International License.  http://creativecommons.org/licenses/by/4.0\r
3 .. Copyright (c) 2017-2018 Wind River Systems, Inc.\r
4 \r
5 Tutorial: Onboard instance of Wind River Titanium Cloud\r
6 ```````````````````````````````````````````````````````\r
7 \r
8 Prerequisites\r
9 -------------\r
10 \r
11 Collect ONAP Access Info\r
12 ^^^^^^^^^^^^^^^^^^^^^^^^\r
13 \r
14 With Heat based ONAP:\r
15 .....................\r
16 \r
17 .. code-block:: console\r
18 \r
19     export ONAP_AAI_IP=<floating IP of VM with name "onap-aai-inst1">\r
20     export ONAP_AAI_PORT=8443\r
21     export ONAP_MSB_IP=<floating IP of VM with name "onap-multi-service">\r
22     export ONAP_MSB_PORT=80\r
23 \r
24 With OOM based ONAP:\r
25 ....................\r
26 \r
27 .. code-block:: console\r
28 \r
29     export ONAP_AAI_IP=<floating IP of VM with name "k8s_1">\r
30     export ONAP_AAI_PORT=30233\r
31     export ONAP_MSB_IP=<floating IP of VM with name "k8s_1">\r
32     export ONAP_MSB_PORT=30280\r
33 \r
34 Determine the ID of the cloud region:\r
35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
36 \r
37     cloud region is ONAP's representation of the on-boarded VIM/Cloud instance (Titanium Cloud instance in this case).\r
38     The ID of a cloud region is specified by ONAP user while on-boarding the VIM/Cloud instance, this ID will be\r
39     internal to ONAP only, comprised by the composite keys of "cloud-owner" and "cloud-region-id".\r
40 \r
41 .. code-block:: console\r
42 \r
43     export CLOUD_OWNER="CloudOwner"\r
44     export CLOUD_REGION_ID="RegionOne"\r
45 \r
46 \r
47 Notes:\r
48 ......\r
49 \r
50     1, It is suggested to populate "cloud-owner" to be "CloudOwner".\r
51     The restriction is that underscore "_" can not be used.\r
52 \r
53     2, There is restriction from ONAP Amsterdam Release that the\r
54     "cloud-region-id" must be the same as OpenStack Region ID in case that\r
55     the cloud region represent an OpenStack Instance.\r
56     From Casablanca Release, the restriction of "cloud-region-id" has been\r
57     removed by MultiCloud plugin for Wind River Titanium Cloud. It is not\r
58     mandatory to be populate the "cloud-region-id" with OpenStack Region ID.\r
59 \r
60 \r
61 The geographic location of the cloud region\r
62 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
63 \r
64 make sure there is complex object to represent the geographic location of the cloud region\r
65 in case you need create a complex object "clli1":\r
66 \r
67 .. code-block:: console\r
68 \r
69     curl -X PUT \\r
70     https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/complexes/complex/clli1 \\r
71     -H 'Accept: application/json' \\r
72     -H 'Authorization: Basic QUFJOkFBSQ==' \\r
73     -H 'Cache-Control: no-cache' \\r
74     -H 'Content-Type: application/json' \\r
75     -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \\r
76     -H 'Real-Time: true' \\r
77     -H 'X-FromAppId: jimmy-postman' \\r
78     -H 'X-TransactionId: 9999' \\r
79     -d '{\r
80         "physical-location-id": "clli1",\r
81         "data-center-code": "example-data-center-code-val-5556",\r
82         "complex-name": "clli1",\r
83         "identity-url": "example-identity-url-val-56898",\r
84         "physical-location-type": "example-physical-location-type-val-7608",\r
85         "street1": "example-street1-val-34205",\r
86         "street2": "example-street2-val-99210",\r
87         "city": "Beijing",\r
88         "state": "example-state-val-59487",\r
89         "postal-code": "100000",\r
90         "country": "example-country-val-94173",\r
91         "region": "example-region-val-13893",\r
92         "latitude": "39.9042",\r
93         "longitude": "106.4074",\r
94         "elevation": "example-elevation-val-30253",\r
95         "lata": "example-lata-val-46073"\r
96         }'\r
97 \r
98 \r
99 \r
100 \r
101 On-board Wind River Titanium Cloud Instance\r
102 -------------------------------------------\r
103 \r
104 You can on-board the instance of Wind River Titanium Cloud with either way as below\r
105 \r
106 \r
107 With curl commands\r
108 ^^^^^^^^^^^^^^^^^^\r
109 \r
110 Step 1: Create a cloud region to represent the instance\r
111 .......................................................\r
112 \r
113 .. code-block:: console\r
114 \r
115     ### on-board a single OpenStack region\r
116     ### you can specify the Openstack Region ID by extra inputs: {"openstack-region-id":"RegionOne"}\r
117 \r
118 \r
119     curl -X PUT \\r
120     https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID} \\r
121     -H 'Accept: application/json' \\r
122     -H 'Authorization: Basic QUFJOkFBSQ==' \\r
123     -H 'Cache-Control: no-cache' \\r
124     -H 'Content-Type: application/json' \\r
125     -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \\r
126     -H 'Real-Time: true' \\r
127     -H 'X-FromAppId: jimmy-postman' \\r
128     -H 'X-TransactionId: 9999' \\r
129     -d '{\r
130         "cloud-owner": "<${CLOUD_OWNER}>",\r
131         "cloud-region-id": "<${CLOUD_REGION_ID}>",\r
132         "cloud-type": "openstack",\r
133         "owner-defined-type": "t1",\r
134         "cloud-region-version": "titanium_cloud",\r
135         "complex-name": "clli1",\r
136         "cloud-zone": "CloudZone",\r
137         "sriov-automation": false,\r
138         "identity-url": "WillBeUpdatedByMultiCloud",\r
139         "cloud-extra-info":"{\"openstack-region-id\":\"RegionOne\"}"\r
140         "esr-system-info-list": {\r
141             "esr-system-info": [\r
142                 {\r
143                 "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",\r
144                 "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",\r
145                 "user-name": "<your openstack user>",\r
146                 "password": "<your openstack password>",\r
147                 "system-type": "VIM",\r
148                 "ssl-insecure": true,\r
149                 "cloud-domain": "Default",\r
150                 "default-tenant": "<your openstack project name>",\r
151                 "system-status": "active"\r
152                 }\r
153             ]\r
154           }\r
155         }'\r
156 \r
157 \r
158 \r
159 .. code-block:: console\r
160 \r
161     ### on-board multiple OpenStack regions with a single request by indicating {"multi-region-discovery":true}\r
162     ### you can specify the Openstack Region ID by extra inputs: {"openstack-region-id":"RegionOne"}\r
163 \r
164     curl -X PUT \\r
165     https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID} \\r
166     -H 'Accept: application/json' \\r
167     -H 'Authorization: Basic QUFJOkFBSQ==' \\r
168     -H 'Cache-Control: no-cache' \\r
169     -H 'Content-Type: application/json' \\r
170     -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \\r
171     -H 'Real-Time: true' \\r
172     -H 'X-FromAppId: jimmy-postman' \\r
173     -H 'X-TransactionId: 9999' \\r
174     -d '{\r
175         "cloud-owner": "<${CLOUD_OWNER}>",\r
176         "cloud-region-id": "<${CLOUD_REGION_ID}>",\r
177         "cloud-type": "openstack",\r
178         "owner-defined-type": "t1",\r
179         "cloud-region-version": "titanium_cloud",\r
180         "complex-name": "clli1",\r
181         "cloud-zone": "CloudZone",\r
182         "sriov-automation": false,\r
183         "identity-url": "WillBeUpdatedByMultiCloud",\r
184         "cloud-extra-info":"{\"multi-region-discovery\":true, \"openstack-region-id\":\"RegionOne\"}"\r
185         "esr-system-info-list": {\r
186             "esr-system-info": [\r
187                 {\r
188                 "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",\r
189                 "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",\r
190                 "user-name": "<your openstack user>",\r
191                 "password": "<your openstack password>",\r
192                 "system-type": "VIM",\r
193                 "ssl-insecure": true,\r
194                 "cloud-domain": "Default",\r
195                 "default-tenant": "<your openstack project name>",\r
196                 "system-status": "active"\r
197                 }\r
198             ]\r
199           }\r
200         }'\r
201 \r
202 \r
203 Step 2: associate the cloud region with the location object\r
204 ...........................................................\r
205 \r
206 \r
207 This association between the cloud region and location is required for OOF homing/placement of VNF\r
208 \r
209 .. code-block:: console\r
210 \r
211     curl -X PUT \\r
212     https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}/relationship-list/relationship \\r
213     -H 'Authorization: Basic QUFJOkFBSQ==' \\r
214     -H 'Cache-Control: no-cache' \\r
215     -H 'Content-Type: application/json' \\r
216     -H 'Postman-Token: 7407d60c-8ce7-45de-ada3-4a7a9e88ebd4' \\r
217     -H 'Real-Time: true' \\r
218     -H 'X-FromAppId: jimmy-postman' \\r
219     -H 'X-TransactionId: 9999' \\r
220     -d '{\r
221         "related-to": "complex",\r
222         "related-link": "/aai/v13/cloud-infrastructure/complexes/complex/clli1",\r
223         "relationship-data": [\r
224             {\r
225             "relationship-key": "complex.physical-location-id",\r
226             "relationship-value": "clli1"\r
227             }\r
228             ]\r
229         }'\r
230 \r
231 \r
232 \r
233 Step 3: Trigger the MultiCloud Plugin registration process\r
234 ..........................................................\r
235 \r
236 \r
237 Make sure trigger MultiCloud plugin to discover and register Infrastructure\r
238 resources, including HPA\r
239 \r
240 .. code-block:: console\r
241 \r
242     curl -X POST \\r
243     http://$ONAP_MSB_IP:$ONAP_MSB_PORT/api/multicloud/v0/${CLOUD_OWNER}_${CLOUD_REGION_ID}/registry \\r
244     -H 'Accept: application/json' \\r
245     -H 'Cache-Control: no-cache' \\r
246     -H 'Content-Type: application/json' \\r
247     -H 'Postman-Token: 8577e1cc-1038-471d-8b3b-d36fe44ae023'\r
248 \r
249 \r
250 With ESR GUI Portal\r
251 ^^^^^^^^^^^^^^^^^^^\r
252 ESR will conduct all steps mentioned above with a single click.\r
253 \r
254 The url of the ESR GUI Portal is:\r
255 \r
256 ..\r
257  http://$ONAP_MSB_IP:$ONAP_MSB_PORT/iui/aai-esr-gui/extsys/vim/vimView.html\r
258 \r
259 .. image:: ../images/mc-windriver/esr-vim-register.png\r
260     :alt: ESR VIM Registrer GUI Portal\r
261     :width: 500\r
262     :height: 700\r
263     :align: center\r
264 \r
265 \r
266 Verification\r
267 ------------\r
268 \r
269 You may want to verify if the cloud region was registered properly (with HPA information populated)\r
270 to represent the instance of Wind River Titanium Cloud, you can do it with the curl command as below\r
271 \r
272 .. code-block:: console\r
273 \r
274     curl -X GET \\r
275     https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}?depth=all \\r
276     -H 'Accept: application/json' \\r
277     -H 'Authorization: Basic QUFJOkFBSQ==' \\r
278     -H 'Cache-Control: no-cache' \\r
279     -H 'Content-Type: application/json' \\r
280     -H 'Postman-Token: 2899359f-871b-4e61-a307-ecf8b3144e3f' \\r
281     -H 'Real-Time: true' \\r
282     -H 'X-FromAppId: jimmy-postman' \\r
283     -H 'X-TransactionId: 9999'\r
284 \r
285 \r
286 Note:\r
287 ^^^^^\r
288 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."\r
289 \r