X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=blobdiff_plain;f=docs%2FMultiCloud-Deployment-Guide.rst;h=58edaf9ef70acabbee7f6207b39346b1f0e643cf;hp=11c1e5fd3f35b802c3c64c18a4aa402db936509a;hb=ed9fad8c05ffae7b971d906c8ef978bafb8c61fb;hpb=42fbfdc598d852e24c17edf2dfa89f73bdbf217e diff --git a/docs/MultiCloud-Deployment-Guide.rst b/docs/MultiCloud-Deployment-Guide.rst index 11c1e5f..58edaf9 100644 --- a/docs/MultiCloud-Deployment-Guide.rst +++ b/docs/MultiCloud-Deployment-Guide.rst @@ -1,3 +1,7 @@ +.. + This work is licensed under a Creative Commons Attribution 4.0 + International License. + ================================ ONAP MultiCloud Deployment Guide ================================ @@ -9,11 +13,14 @@ Please refer to onap deployment in kubernetes website(https://wiki.onap.org/disp to setup kubernets cluster. -After installing kubectl and helm, execute "kubectl cluster-info" command to verify your kubernets cluster. +After installing kubectl and helm, execute "kubectl cluster-info" command to +verify your kubernets cluster. Clone oom project: git clone http://gerrit.onap.org/r/oom -Source the setenv.bash script in /oom/kubernetes/oneclick/, it will set your helm list of components to start/delete -Run the one time config pod - which mounts the volume /dockerdata/ contained in the pod config-init. +Source the setenv.bash script in /oom/kubernetes/oneclick/, it will set your +helm list of components to start/delete +Run the one time config pod - which mounts the volume /dockerdata/ contained +in the pod config-init. .. code-block:: console @@ -137,7 +144,8 @@ No Service Name Version NameSpace Url Protocol Visualrange Control 1 multicloud v0 /api/multicloud/v0 REST InSystem 2 multicloud-vio v0 /api/multicloud-vio/v0 REST InSystem -Then register vio information into AAI service with region name "vmware" and region id "vio" +Then register vio information into AAI service with region name "vmware" and +region id "vio" .. code-block:: console @@ -163,194 +171,3 @@ Then register vio information into AAI service with region name "vmware" and reg ] } }" - -Test Examples -~~~~~~~~~~~~~ - -The env HOST_IP is msb-iag service cluster-ip value is "10.43.188.78"(see it above). -The vimid is "vmware_vio" the registered name in aai. - - -Get auth token --------------- - -# send request to multicloud-framework(broker) service to get token - -.. code-block:: console - - $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud/v0//identity/auth/tokens - -test.json content example: - -:: - - { - "auth": sudo pip install virtualenv{ - "scope": {"project": {"id": “”}}, - "identity": - { - "password": {"user": {"domain": {"name": “”}, "password": “”, "name": “”}}, "methods": ["password"] - } - } - } - - -Response: -There are a large amounts of data including service endpoint, user information, etc. -For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”. - -# you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So -requests sending to mulitcloud-vio will be forwarded to backend VIO openstack. - - -Identity endpoint: - http://$HOST_IP/api/multicloud-vio/v0//identity - -Nova endpoint: - http://$HOST_IP/api/multicloud-vio/v0//compute/ - - -List projects -------------- - -Use identity’s endpoint: http://$HOST_IP/api/multicloud-vio/v0//identity/ - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0//identity/projects - - -Get os Hypervisor ------------------ - -Use nova’s endpoint: http://$HOST_IP/api/multicloud-vio/v0//nova/ - - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0//nova//os-hypervisors/detail - - -List instance of user’s project --------------------------------- - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0//nova//servers - - -Show instance detail --------------------- - -you need to input in url path. - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0/vimid/nova/tenantid/servers/ - - -Shutdown instance ------------------ - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"os-stop":null}' -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Start instance --------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"os-start":null}' -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Suspend instance ----------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"suspend":null}' -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Resume instance ----------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"resume":null}' -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Pause instance --------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"pause":null}' -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Unpasue instance ----------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"unpause":null}' -H 'X-Auth-Token: -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Reboot instance ---------------- - -you need to input in url path - -.. code-block:: console - - $ curl -X POST -d '{"reboot":{"type":"HARD"}}' -H 'X-Auth-Token: -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//nova//servers//action - - -Upload Image Task ------------------ - -create uploading image task by image url: - -.. code-block:: console - - $ curl -X POST -d '{"input": {"image_properties": - {"container_format": "bare", "name": ""}, - "import_from_format": "", - "import_from": ""}, - "type": "import"}' - -H 'X-Auth-Token:' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0//glance/v2/tasks - -get the taskid from response body,then query the task status by taskid. - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0//glance/v2/tasks/ - -You can see the description and properties of task in response body,if 'status' is success, it will show image_id in -result block. - -query the image status by image_id - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$HOST_IP/api/multicloud-vio/v0//glance/v2/images/ - - - - - - -