From ec91103a59343be31f6cbcc2d12f58ce5e774e9f Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Mon, 30 Oct 2017 13:36:33 +0800 Subject: Split Test Guide from Deployment Guide Split the test part from deployment guide. Change-Id: I22b9182d0c83a395b3bb07169af8a124c337f7cc issue-id: MULTICLOUD-122 Signed-off-by: Ethan Lynn --- docs/MuliCloud-Heat-Deployment-Guide.rst | 105 -------------- docs/MultiCloud-Deployment-Guide.rst | 231 ------------------------------ docs/MultiCloud-Heat-Deployment-Guide.rst | 105 ++++++++++++++ docs/MultiCloud-Test-Guide.rst | 227 +++++++++++++++++++++++++++++ docs/index.rst | 3 +- 5 files changed, 334 insertions(+), 337 deletions(-) delete mode 100644 docs/MuliCloud-Heat-Deployment-Guide.rst create mode 100644 docs/MultiCloud-Heat-Deployment-Guide.rst create mode 100644 docs/MultiCloud-Test-Guide.rst (limited to 'docs') diff --git a/docs/MuliCloud-Heat-Deployment-Guide.rst b/docs/MuliCloud-Heat-Deployment-Guide.rst deleted file mode 100644 index d33ab47..0000000 --- a/docs/MuliCloud-Heat-Deployment-Guide.rst +++ /dev/null @@ -1,105 +0,0 @@ -===================================== -ONAP MultiCloud Heat Deployment Guide -===================================== - -Prerequisites -~~~~~~~~~~~~~ - -1. A VIO platofrom install with nova,keystone,horizon,image, -,neutron and heat service, make sure floating ip is work. - -2 A local host as openstackclient cloud access opentack platform, -install python,python-pip,vietualenv, python-openstackclient, -python-heatclient. - - - - -Export os enviroment -~~~~~~~~~~~~~~~~~~~~ - -we'll need to create a file call admin.rc with following content - -keystone version 2.0 Example: - -export OS_AUTH_URL=https://identity.api.opentack.com/v2.0/ -export OS_USERNAME=UserName -export OS_TENANT_ID=TenantID -export OS_REGION_NAME=RegionID -export OS_PASSWORD=Password -export OS_IDENTITY_API_VERSION=2 - -keystone version 3.0 Example: - -export OS_AUTH_URL=https://identiy.api.openstack.com/v3/ -export OS_PROJECT_ID=ProjectID -export OS_PROJECT_NAME=ProjectName -export OS_USER_DOMAIN_NAME=DomainName -export OS_USERNAME=UserName -export OS_PASSWORD=Password -if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi - -# unset v2.0 items in case set -unset OS_TENANT_ID -unset OS_TENANT_NAME - - -export OS_IDENTITY_API_VERSION=3 - - - - -Get VIO pem -~~~~~~~~~~~~~ - -Get a copy of vio.pem in load balancer vms(/etc/ssl/vio.pem) in local -host, then add the following line to your admin.rc file: -export OS_CACERT=/your/path/vio.pem - - - - -Deploy the ONAP -~~~~~~~~~~~~~~~~ - -get onap heat files from git repo: -git clone http://@gerrit.onap.org/r/a/demo - -we will use onap_opentack_float.yaml and onap_openstack_float.env heat templates -at ./demo/heat/ONAP/ dirctory. - -Set env options in onap_openstack_float.env according to VIO platform env, -Finally, heat enviroment contains correct parameters. - -Next source the admin.rc file to create shell environment variables we nedd. - -source admin.rc - -Then create heat stack - -openstack stack create -t onap_openstack_float.yaml -e onap_openstack_float.env ONAP - -This process will take several minutes to spin up - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/MultiCloud-Deployment-Guide.rst b/docs/MultiCloud-Deployment-Guide.rst index 03db16f..ed18a0a 100644 --- a/docs/MultiCloud-Deployment-Guide.rst +++ b/docs/MultiCloud-Deployment-Guide.rst @@ -163,234 +163,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 V2 auth token ------------------ - -# VIO openstack support keystone V2 version, vio proxy-plugin will check the request body format, if request body format -# is keystone V2 format will access keystone V2 service, if not it will access keystone V3 service. -# this example show how to access keystone V2 service. -.. code-block:: console - - $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0//identity/v2.0/tokens - -testV2.json content: - -:: - - { - "auth": { - "tenantName": "admin", - "passwordCredentials": { - "username": "admin", - "password": "vmware" - } - } - } - - -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://$msb_address/api/multicloud-vio/v0//identity - -Nova endpoint: - http://$msb_address/api/multicloud-vio/v0//nova/ - - -Get V3 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://$msb_address/api/multicloud/v0//identity/v3/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://$msb_address/api/multicloud-vio/v0//identity - -Nova endpoint: - http://$msb_address/api/multicloud-vio/v0//nova/ - - -List projects -------------- - -Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0//identity/ - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$msb_address/api/multicloud-vio/v0//identity/projects - - -Get os Hypervisor ------------------ - -Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0//nova/ - - -.. code-block:: console - - $ curl -X GET -H 'X-Auth-Token:' http://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/api/multicloud-vio/v0//glance/v2/images/ - - - - - - - diff --git a/docs/MultiCloud-Heat-Deployment-Guide.rst b/docs/MultiCloud-Heat-Deployment-Guide.rst new file mode 100644 index 0000000..d33ab47 --- /dev/null +++ b/docs/MultiCloud-Heat-Deployment-Guide.rst @@ -0,0 +1,105 @@ +===================================== +ONAP MultiCloud Heat Deployment Guide +===================================== + +Prerequisites +~~~~~~~~~~~~~ + +1. A VIO platofrom install with nova,keystone,horizon,image, +,neutron and heat service, make sure floating ip is work. + +2 A local host as openstackclient cloud access opentack platform, +install python,python-pip,vietualenv, python-openstackclient, +python-heatclient. + + + + +Export os enviroment +~~~~~~~~~~~~~~~~~~~~ + +we'll need to create a file call admin.rc with following content + +keystone version 2.0 Example: + +export OS_AUTH_URL=https://identity.api.opentack.com/v2.0/ +export OS_USERNAME=UserName +export OS_TENANT_ID=TenantID +export OS_REGION_NAME=RegionID +export OS_PASSWORD=Password +export OS_IDENTITY_API_VERSION=2 + +keystone version 3.0 Example: + +export OS_AUTH_URL=https://identiy.api.openstack.com/v3/ +export OS_PROJECT_ID=ProjectID +export OS_PROJECT_NAME=ProjectName +export OS_USER_DOMAIN_NAME=DomainName +export OS_USERNAME=UserName +export OS_PASSWORD=Password +if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi + +# unset v2.0 items in case set +unset OS_TENANT_ID +unset OS_TENANT_NAME + + +export OS_IDENTITY_API_VERSION=3 + + + + +Get VIO pem +~~~~~~~~~~~~~ + +Get a copy of vio.pem in load balancer vms(/etc/ssl/vio.pem) in local +host, then add the following line to your admin.rc file: +export OS_CACERT=/your/path/vio.pem + + + + +Deploy the ONAP +~~~~~~~~~~~~~~~~ + +get onap heat files from git repo: +git clone http://@gerrit.onap.org/r/a/demo + +we will use onap_opentack_float.yaml and onap_openstack_float.env heat templates +at ./demo/heat/ONAP/ dirctory. + +Set env options in onap_openstack_float.env according to VIO platform env, +Finally, heat enviroment contains correct parameters. + +Next source the admin.rc file to create shell environment variables we nedd. + +source admin.rc + +Then create heat stack + +openstack stack create -t onap_openstack_float.yaml -e onap_openstack_float.env ONAP + +This process will take several minutes to spin up + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/MultiCloud-Test-Guide.rst b/docs/MultiCloud-Test-Guide.rst new file mode 100644 index 0000000..2be65c0 --- /dev/null +++ b/docs/MultiCloud-Test-Guide.rst @@ -0,0 +1,227 @@ +========================== +ONAP MultiCloud Test Guide +========================== + +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 V2 auth token +----------------- + +# VIO openstack support keystone V2 version, vio proxy-plugin will check the request body format, if request body format +# is keystone V2 format will access keystone V2 service, if not it will access keystone V3 service. +# this example show how to access keystone V2 service. +.. code-block:: console + + $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0//identity/v2.0/tokens + +testV2.json content: + +:: + + { + "auth": { + "tenantName": "admin", + "passwordCredentials": { + "username": "admin", + "password": "vmware" + } + } + } + + +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://$msb_address/api/multicloud-vio/v0//identity + +Nova endpoint: + http://$msb_address/api/multicloud-vio/v0//nova/ + + +Get V3 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://$msb_address/api/multicloud/v0//identity/v3/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://$msb_address/api/multicloud-vio/v0//identity + +Nova endpoint: + http://$msb_address/api/multicloud-vio/v0//nova/ + + +List projects +------------- + +Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0//identity/ + +.. code-block:: console + + $ curl -X GET -H 'X-Auth-Token:' http://$msb_address/api/multicloud-vio/v0//identity/projects + + +Get os Hypervisor +----------------- + +Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0//nova/ + + +.. code-block:: console + + $ curl -X GET -H 'X-Auth-Token:' http://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/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://$msb_address/api/multicloud-vio/v0//glance/v2/images/ diff --git a/docs/index.rst b/docs/index.rst index 56a95a5..25804de 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,7 @@ MultiCloud Documentation Repository :maxdepth: 2 MultiCloud-Deployment-Guide + MultiCloud-Test-Guide MultiCloud-API-Specification-V1 Multicloud-Fake_Cloud-Guide - MUlticloud-Heat-Deploymnet-Guide + MultiCloud-Heat-Deployment-Guide -- cgit 1.2.3-korg