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