1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 AT&T Intellectual Property. All rights reserved.
6 Adding a new Openstack Cloud Site to ONAP
7 =========================================
9 The following guide describe how to configure ONAP to be able to instantiate
10 a service in a new cloud site based on Openstack.
12 There are 2 methods for ONAP to communicate with Openstack in order
13 to instantiate a service:
15 method 1 : ONAP SO => Openstack
16 method 2 : ONAP SO => ONAP MultiCloud => Openstack
18 In this guideline the following parameter/value will be used
20 * Complex Name: My_Complex
21 * Region Name: INTEGRATION_CENTER
22 * Cloud Owner: MyCompanyName
25 Method 1 : without ONAP MultiCloud
26 ----------------------------------
32 Method 2 : using ONAP MultiCloud
33 --------------------------------
36 STEP 1 : declare Cloud Site in ONAP SO to interact with ONAP multiCloud
37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 The MariaDB database of ONAP SO needs to be modified.
41 In the ONAP SO, the use of ONAP Multicloud for that Cloud Site need
44 ONAP SO will communicate with ONAP MultiCloud like if MultiCloud would be
48 Connect to ONAP SO pod
50 In a Unix Terminal, to get the SO pods id that is providing
55 kubectl -n onap get pod | grep mariadb-galera
57 To connect to that SO pod
58 (in this example, the SO pod id is "onap-mariadb-galera-mariadb-galera-0"):
62 kubectl -n onap exec -ti onap-mariadb-galera-mariadb-galera-0 sh
64 Then modify the data in the MariaDB:
67 A "mso_id" and "mso_pass" are required even if, with multicloud,
68 only credentials managed by ESR will be used.
70 Nevertheless, you need to provide a correct encrypted value for the pass value.
72 "MyCompanyName" is a cloud owner value. WARNING : do not use underscore
75 "INTEGRATION_CENTER" is the region name
79 mysql --user=so_admin --password=so_Admin123
81 INSERT INTO identity_services VALUES('MC_KEYSTONE', 'http://msb-iag.onap:80/api/multicloud/v1/MyCompanyName_INTEGRATION_CENTER/identity/v2.0', 'admin', '5b6f369745f5f0e1c61da7f0656f3daf93c8030a2ea94b7964c67abdcfb49bdf2fa2266344b4caaca1eba8264d277831', 'service', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'lastUser', '2019-07-05 10:32:00', '2019-07-05 10:32:00');
82 INSERT INTO cloud_sites VALUES('INTEGRATION_CENTER', 'INTEGRATION_CENTER', 'MC_KEYSTONE', 2.5, 'INTEGRATION_CENTER', NULL, NULL, NULL, 'MySelf', '2019-07-05 10:32:00', '2019-07-05 10:32:00');
85 You need then to change the ONAP SO VNF Adapter Rest API endpoint version:
89 to find the right config map name:
93 kubectl -n onap get configmap | grep so-so-bpmn-infra-app-configmap
96 to edit and change the configmap:
100 kubectl -n onap edit configmap onap-so-so-bpmn-infra-app-configmap
102 in the section "vnf", modify the rest endpoint:
107 endpoint: http://so-openstack-adapter.onap:8087/services/VnfAdapter
109 - endpoint: http://so-openstack-adapter.onap:8087/services/rest/v1/vnfs
110 + endpoint: http://so-openstack-adapter.onap:8087/services/rest/v2/vnfs
113 endpoint: http://so-openstack-adapter.onapg:8087/services/rest/v1/volume-groups
116 Having modified the configmap, it is necessary to delete the pod in order
117 it takes the modification into account.
119 to find the right pod name:
123 kubectl -n onap get po | grep so-so
126 You need to find the pod that is similar to the following pod id:
128 "onap-so-so-6b9f64b887-jgrdp"
135 kubectl -n onap delete onap-so-so-6b9f64b887-jgrdp
138 Then, wait for the pod to restart. To check:
142 kubectl -n onap get po | grep so-so
147 STEP 2 : declare the new cloud Site in ONAP AAI
148 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 declare a Complex in ONAP AAI
154 A Cloud Site is located in a Building called "Complex" object
155 in ONAP AAI datamodel.
157 AAI REST API is used to declare the complex object.
159 Here is an example using "curl" tool to send the API request.
161 The new Complex is named "My_Complex" in this example.
167 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/complexes/complex/My_Complex \
168 -H 'Accept: application/json' \
169 -H 'Authorization: Basic QUFJOkFBSQ==' \
170 -H 'Cache-Control: no-cache' \
171 -H 'Content-Type: application/json' \
172 -H 'Real-Time: true' \
173 -H 'X-FromAppId: jimmy-postman' \
174 -H 'X-TransactionId: 9999' \
176 "physical-location-id": "My_Complex",
177 "data-center-code": "example-data-center-code-val-5556",
178 "complex-name": "My_Complex",
179 "identity-url": "example-identity-url-val-56898",
180 "physical-location-type": "example-physical-location-type-val-7608",
181 "street1": "example-street1-val-34205",
182 "street2": "example-street2-val-99210",
184 "state": "example-state-val-59487",
185 "postal-code": "100000",
186 "country": "example-country-val-94173",
187 "region": "example-region-val-13893",
188 "latitude": "39.9042",
189 "longitude": "106.4074",
190 "elevation": "example-elevation-val-30253",
191 "lata": "example-lata-val-46073"
195 Check the Complexes in ONAP AAI:
200 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/complexes \
201 -H 'Accept: application/json' \
202 -H 'Authorization: Basic QUFJOkFBSQ==' \
203 -H 'X-FromAppId: AAI' \
204 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
205 -H 'cache-control: no-cache' -k
210 declare a Cloud Site in ONAP AAI
213 To declare a Cloud Site, you need to use the AAI REST API.
215 The new Cloud site is named "INTEGRATION_CENTER" in this example.
217 There is also a "Cloud Owner" notion in ONAP AAI datamodel.
219 The new Cloud Owner is named "MyCompanyName" in this example.
221 In Openstack, there is also a "region" notion. You need to get the value of
222 the region that has been set when deploying your openstack platform
224 In the following example the openstack region has the value "RegionOne"
225 (in the parameter "cloud-extra-info")
227 parameter "complex-name" relate to the Complex you previously declared.
229 parameter "cloud-type" take the value "openstack"
231 parameter "cloud-region-version" is refering to your openstack version
233 parameter "cloud-extra-info" will contain the Openstack "region".
234 Here, the region ID of the deployed openstack cloud site will be set.
236 In the following example the openstack region has the value "RegionOne".
238 parameter "esr-system-info-list" will contain the list of openstack platform
239 credentials that will allow ONAP MultiCloud to communicate with the Cloud Site.
245 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/INTEGRATION_CENTER \
246 -H 'Accept: application/json' \
247 -H 'Authorization: Basic QUFJOkFBSQ==' \
248 -H 'Cache-Control: no-cache' \
249 -H 'Content-Type: application/json' \
250 -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \
251 -H 'Real-Time: true' \
252 -H 'X-FromAppId: jimmy-postman' \
253 -H 'X-TransactionId: 9999' \
255 "cloud-owner": "MyCompanyName",
256 "cloud-region-id": "INTEGRATION_CENTER",
257 "cloud-type": "openstack",
258 "owner-defined-type": "N/A",
259 "cloud-region-version": "pike",
260 "complex-name": "My_Complex",
261 "cloud-zone": "CloudZone",
262 "sriov-automation": false,
263 "identity-url": "WillBeUpdatedByMultiCloud",
264 "cloud-extra-info":"{\"openstack-region-id\":\"RegionOne\"}"
265 "esr-system-info-list": {
268 "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",
269 "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",
270 "user-name": "<your openstack user>",
271 "password": "<your openstack password>",
272 "system-type": "VIM",
273 "ssl-insecure": true,
274 "cloud-domain": "Default",
275 "default-tenant": "<your openstack project name>",
276 "system-status": "active"
283 Associate Cloud site to a Complex in ONAP AAI:
289 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/INTEGRATION_CENTER/relationship-list/relationship \
290 -H 'Accept: application/json' \
291 -H 'Authorization: Basic QUFJOkFBSQ==' \
292 -H 'Content-Type: application/json' \
293 -H 'X-FromAppId: AAI' \
294 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
295 -H 'cache-control: no-cache' \
297 "related-to": "complex",
298 "related-link": "/aai/v16/cloud-infrastructure/complexes/complex/My_Complex",
299 "relationship-data": [
301 "relationship-key": "complex.physical-location-id",
302 "relationship-value": "My_Complex"
308 Check the Cloud Site creation in ONAP AAI:
313 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions \
314 -H 'Accept: application/json' \
315 -H 'Authorization: Basic QUFJOkFBSQ==' \
316 -H 'X-FromAppId: AAI' \
317 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
318 -H 'cache-control: no-cache' -k
321 Associate an Availability zone to a Cloud site in ONAP AAI:
326 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/INTEGRATION_CENTER/availability-zones/availability-zone/brittany \
327 -H 'Accept: application/json' \
328 -H 'Authorization: Basic QUFJOkFBSQ==' \
329 -H 'Content-Type: application/json' \
330 -H 'X-FromAppId: AAI' \
331 -H 'X-TransactionId: get_aai_subscr' \
332 -H 'cache-control: no-cache' \
334 "availability-zone-name": "brittany",
335 "hypervisor-type": "KVM"
344 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/INTEGRATION_CENTER/availability-zones \
345 -H 'Accept: application/json' \
346 -H 'Authorization: Basic QUFJOkFBSQ==' \
347 -H 'Content-Type: application/json' \
348 -H 'X-FromAppId: AAI' \
349 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
350 -H 'cache-control: no-cache'
354 STEP 3 : Register the Cloud Site in ONAP Multicloud
355 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
360 http://msb.api.discovery.simpledemo.onap.org:30280/api/multicloud/v1/MyCompanyName_INTEGRATION_CENTER/registry \
361 -H 'Accept: application/json' \
362 -H 'Cache-Control: no-cache' \
363 -H 'Content-Type: application/json' \
371 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/MyCompanyName/INTEGRATION_CENTER?depth=all \
372 -H 'Accept: application/json' \
373 -H 'Authorization: Basic QUFJOkFBSQ==' \
374 -H 'Cache-Control: no-cache' \
375 -H 'Content-Type: application/json' \
376 -H 'Real-Time: true' \
377 -H 'X-FromAppId: jimmy-postman' \
378 -H 'X-TransactionId: 9999' -k