Refactor the docs
[multicloud/framework.git] / docs / multicloud-plugin-windriver / Tutorial-Onboard-WindRiver-TitaniumCloud.rst
diff --git a/docs/multicloud-plugin-windriver/Tutorial-Onboard-WindRiver-TitaniumCloud.rst b/docs/multicloud-plugin-windriver/Tutorial-Onboard-WindRiver-TitaniumCloud.rst
new file mode 100644 (file)
index 0000000..52926bb
--- /dev/null
@@ -0,0 +1,289 @@
+.. This work is licensed under a Creative Commons Attribution 4.0\r
+.. International License.  http://creativecommons.org/licenses/by/4.0\r
+.. Copyright (c) 2017-2018 Wind River Systems, Inc.\r
+\r
+Tutorial: Onboard instance of Wind River Titanium Cloud\r
+```````````````````````````````````````````````````````\r
+\r
+Prerequisites\r
+-------------\r
+\r
+Collect ONAP Access Info\r
+^^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+With Heat based ONAP:\r
+.....................\r
+\r
+.. code-block:: console\r
+\r
+    export ONAP_AAI_IP=<floating IP of VM with name "onap-aai-inst1">\r
+    export ONAP_AAI_PORT=8443\r
+    export ONAP_MSB_IP=<floating IP of VM with name "onap-multi-service">\r
+    export ONAP_MSB_PORT=80\r
+\r
+With OOM based ONAP:\r
+....................\r
+\r
+.. code-block:: console\r
+\r
+    export ONAP_AAI_IP=<floating IP of VM with name "k8s_1">\r
+    export ONAP_AAI_PORT=30233\r
+    export ONAP_MSB_IP=<floating IP of VM with name "k8s_1">\r
+    export ONAP_MSB_PORT=30280\r
+\r
+Determine the ID of the cloud region:\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+    cloud region is ONAP's representation of the on-boarded VIM/Cloud instance (Titanium Cloud instance in this case).\r
+    The ID of a cloud region is specified by ONAP user while on-boarding the VIM/Cloud instance, this ID will be\r
+    internal to ONAP only, comprised by the composite keys of "cloud-owner" and "cloud-region-id".\r
+\r
+.. code-block:: console\r
+\r
+    export CLOUD_OWNER="CloudOwner"\r
+    export CLOUD_REGION_ID="RegionOne"\r
+\r
+\r
+Notes:\r
+......\r
+\r
+    1, It is suggested to populate "cloud-owner" to be "CloudOwner".\r
+    The restriction is that underscore "_" can not be used.\r
+\r
+    2, There is restriction from ONAP Amsterdam Release that the\r
+    "cloud-region-id" must be the same as OpenStack Region ID in case that\r
+    the cloud region represent an OpenStack Instance.\r
+    From Casablanca Release, the restriction of "cloud-region-id" has been\r
+    removed by MultiCloud plugin for Wind River Titanium Cloud. It is not\r
+    mandatory to be populate the "cloud-region-id" with OpenStack Region ID.\r
+\r
+\r
+The geographic location of the cloud region\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+make sure there is complex object to represent the geographic location of the cloud region\r
+in case you need create a complex object "clli1":\r
+\r
+.. code-block:: console\r
+\r
+    curl -X PUT \\r
+    https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/complexes/complex/clli1 \\r
+    -H 'Accept: application/json' \\r
+    -H 'Authorization: Basic QUFJOkFBSQ==' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 2b272126-aa65-41e6-aa5d-46bc70b9eb4f' \\r
+    -H 'Real-Time: true' \\r
+    -H 'X-FromAppId: jimmy-postman' \\r
+    -H 'X-TransactionId: 9999' \\r
+    -d '{\r
+        "physical-location-id": "clli1",\r
+        "data-center-code": "example-data-center-code-val-5556",\r
+        "complex-name": "clli1",\r
+        "identity-url": "example-identity-url-val-56898",\r
+        "physical-location-type": "example-physical-location-type-val-7608",\r
+        "street1": "example-street1-val-34205",\r
+        "street2": "example-street2-val-99210",\r
+        "city": "Beijing",\r
+        "state": "example-state-val-59487",\r
+        "postal-code": "100000",\r
+        "country": "example-country-val-94173",\r
+        "region": "example-region-val-13893",\r
+        "latitude": "39.9042",\r
+        "longitude": "106.4074",\r
+        "elevation": "example-elevation-val-30253",\r
+        "lata": "example-lata-val-46073"\r
+        }'\r
+\r
+\r
+\r
+\r
+On-board Wind River Titanium Cloud Instance\r
+-------------------------------------------\r
+\r
+You can on-board the instance of Wind River Titanium Cloud with either way as below\r
+\r
+\r
+With curl commands\r
+^^^^^^^^^^^^^^^^^^\r
+\r
+Step 1: Create a cloud region to represent the instance\r
+.......................................................\r
+\r
+.. code-block:: console\r
+\r
+    ### on-board a single OpenStack region\r
+    ### you can specify the Openstack Region ID by extra inputs: {"openstack-region-id":"RegionOne"}\r
+\r
+\r
+    curl -X PUT \\r
+    https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID} \\r
+    -H 'Accept: application/json' \\r
+    -H 'Authorization: Basic QUFJOkFBSQ==' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \\r
+    -H 'Real-Time: true' \\r
+    -H 'X-FromAppId: jimmy-postman' \\r
+    -H 'X-TransactionId: 9999' \\r
+    -d '{\r
+        "cloud-owner": "<${CLOUD_OWNER}>",\r
+        "cloud-region-id": "<${CLOUD_REGION_ID}>",\r
+        "cloud-type": "openstack",\r
+        "owner-defined-type": "t1",\r
+        "cloud-region-version": "titanium_cloud",\r
+        "complex-name": "clli1",\r
+        "cloud-zone": "CloudZone",\r
+        "sriov-automation": false,\r
+        "identity-url": "WillBeUpdatedByMultiCloud",\r
+        "cloud-extra-info":"{\"openstack-region-id\":\"RegionOne\"}"\r
+        "esr-system-info-list": {\r
+            "esr-system-info": [\r
+                {\r
+                "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",\r
+                "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",\r
+                "user-name": "<your openstack user>",\r
+                "password": "<your openstack password>",\r
+                "system-type": "VIM",\r
+                "ssl-insecure": true,\r
+                "cloud-domain": "Default",\r
+                "default-tenant": "<your openstack project name>",\r
+                "system-status": "active"\r
+                }\r
+            ]\r
+          }\r
+        }'\r
+\r
+\r
+\r
+.. code-block:: console\r
+\r
+    ### on-board multiple OpenStack regions with a single request by indicating {"multi-region-discovery":true}\r
+    ### you can specify the Openstack Region ID by extra inputs: {"openstack-region-id":"RegionOne"}\r
+\r
+    curl -X PUT \\r
+    https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID} \\r
+    -H 'Accept: application/json' \\r
+    -H 'Authorization: Basic QUFJOkFBSQ==' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 8b9b95ae-91d6-4436-90fa-69cb4d2db99c' \\r
+    -H 'Real-Time: true' \\r
+    -H 'X-FromAppId: jimmy-postman' \\r
+    -H 'X-TransactionId: 9999' \\r
+    -d '{\r
+        "cloud-owner": "<${CLOUD_OWNER}>",\r
+        "cloud-region-id": "<${CLOUD_REGION_ID}>",\r
+        "cloud-type": "openstack",\r
+        "owner-defined-type": "t1",\r
+        "cloud-region-version": "titanium_cloud",\r
+        "complex-name": "clli1",\r
+        "cloud-zone": "CloudZone",\r
+        "sriov-automation": false,\r
+        "identity-url": "WillBeUpdatedByMultiCloud",\r
+        "cloud-extra-info":"{\"multi-region-discovery\":true, \"openstack-region-id\":\"RegionOne\"}"\r
+        "esr-system-info-list": {\r
+            "esr-system-info": [\r
+                {\r
+                "esr-system-info-id": "<random UUID, e.g. 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bde>",\r
+                "service-url": "http://<your openstack keystone endpoint, e.g. http://10.12.25.2:5000/v3>",\r
+                "user-name": "<your openstack user>",\r
+                "password": "<your openstack password>",\r
+                "system-type": "VIM",\r
+                "ssl-insecure": true,\r
+                "cloud-domain": "Default",\r
+                "default-tenant": "<your openstack project name>",\r
+                "system-status": "active"\r
+                }\r
+            ]\r
+          }\r
+        }'\r
+\r
+\r
+Step 2: associate the cloud region with the location object\r
+...........................................................\r
+\r
+\r
+This association between the cloud region and location is required for OOF homing/placement of VNF\r
+\r
+.. code-block:: console\r
+\r
+    curl -X PUT \\r
+    https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}/relationship-list/relationship \\r
+    -H 'Authorization: Basic QUFJOkFBSQ==' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 7407d60c-8ce7-45de-ada3-4a7a9e88ebd4' \\r
+    -H 'Real-Time: true' \\r
+    -H 'X-FromAppId: jimmy-postman' \\r
+    -H 'X-TransactionId: 9999' \\r
+    -d '{\r
+        "related-to": "complex",\r
+        "related-link": "/aai/v13/cloud-infrastructure/complexes/complex/clli1",\r
+        "relationship-data": [\r
+            {\r
+            "relationship-key": "complex.physical-location-id",\r
+            "relationship-value": "clli1"\r
+            }\r
+            ]\r
+        }'\r
+\r
+\r
+\r
+Step 3: Trigger the MultiCloud Plugin registration process\r
+..........................................................\r
+\r
+\r
+Make sure trigger MultiCloud plugin to discover and register Infrastructure\r
+resources, including HPA\r
+\r
+.. code-block:: console\r
+\r
+    curl -X POST \\r
+    http://$ONAP_MSB_IP:$ONAP_MSB_PORT/api/multicloud/v0/${CLOUD_OWNER}_${CLOUD_REGION_ID}/registry \\r
+    -H 'Accept: application/json' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 8577e1cc-1038-471d-8b3b-d36fe44ae023'\r
+\r
+\r
+With ESR GUI Portal\r
+^^^^^^^^^^^^^^^^^^^\r
+ESR will conduct all steps mentioned above with a single click.\r
+\r
+The url of the ESR GUI Portal is:\r
+\r
+..\r
+ http://$ONAP_MSB_IP:$ONAP_MSB_PORT/iui/aai-esr-gui/extsys/vim/vimView.html\r
+\r
+.. image:: ../images/mc-windriver/esr-vim-register.png\r
+    :alt: ESR VIM Registrer GUI Portal\r
+    :width: 500\r
+    :height: 700\r
+    :align: center\r
+\r
+\r
+Verification\r
+------------\r
+\r
+You may want to verify if the cloud region was registered properly (with HPA information populated)\r
+to represent the instance of Wind River Titanium Cloud, you can do it with the curl command as below\r
+\r
+.. code-block:: console\r
+\r
+    curl -X GET \\r
+    https://$ONAP_AAI_IP:$ONAP_AAI_PORT/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/${CLOUD_OWNER}/${CLOUD_REGION_ID}?depth=all \\r
+    -H 'Accept: application/json' \\r
+    -H 'Authorization: Basic QUFJOkFBSQ==' \\r
+    -H 'Cache-Control: no-cache' \\r
+    -H 'Content-Type: application/json' \\r
+    -H 'Postman-Token: 2899359f-871b-4e61-a307-ecf8b3144e3f' \\r
+    -H 'Real-Time: true' \\r
+    -H 'X-FromAppId: jimmy-postman' \\r
+    -H 'X-TransactionId: 9999'\r
+\r
+\r
+Note:\r
+^^^^^\r
+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
+\r