From c9dc8ffa175f8aac4ced5ac43c189c60d403d4f9 Mon Sep 17 00:00:00 2001 From: "zhifeng.jiang" Date: Sat, 22 Oct 2016 13:20:03 +0800 Subject: Make documents update to data modification: Leave only docker installation method Fix some errors due to path changes JIRA:QTIP-113 Change-Id: I18663d57df4c792f72cbde95806ecd6b3a6436e2 Signed-off-by: zhifeng.jiang --- docs/configguide/configuration.rst | 60 +++++++++++-------------------- docs/userguide/introduction.rst | 72 ++++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 76 deletions(-) (limited to 'docs') diff --git a/docs/configguide/configuration.rst b/docs/configguide/configuration.rst index e5228541..d6d2fd5d 100644 --- a/docs/configguide/configuration.rst +++ b/docs/configguide/configuration.rst @@ -7,39 +7,14 @@ Configuration ************* -QTIP currently supports by using a Docker image or by pulling the repo from -the upstream repository found at https://git.opnfv.org/qtip. Detailed steps -about setting up QTIP using both of these options can be found below. +QTIP currently supports by using a Docker image. Detailed steps +about setting up QTIP can be found below. To use QTIP you should have access to an OpenStack environment, with at least Nova, Neutron, Glance, Keystone and Heat installed. Add a brief introduction to configure OPNFV with this specific installer -Pre-configuration activities ----------------------------- - - -Setting QTIP framework on Ubuntu 14.04 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Install dependencies: -:: - - sudo apt-get install python-dev - sudo apt-get install python-pip - sudo apt-get install build-essential - sudo apt-get install git wget - sudo pip install python-heatclient python-glanceclient python-neutronclient - - -Download source code and install python dependencies: -:: - - git clone https://git.opnfv.org/qtip - cd qtip - - Installing QTIP using Docker ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,18 +22,25 @@ QTIP has a Docker images on the docker hub. Pulling opnfv/qtip docker image from docker hub: :: - sudo docker pull opnfv/qtip + docker pull opnfv/qtip Verify that opnfv/qtip has been downloaded. It should be listed as an image by running the following command. :: - sudo docker images + docker images -Run the Docker instance: +Make dir to store the QTIP image which will be used to create vm in cloud. :: - docker run -it opnfv/qtip /bin/bash + mkdir $HOME/imgstore + +Run and enter the Docker instance: +:: + envs="INSTALLER_TYPE={INSTALLER_TYPE} -e INSTALLER_IP={INSTALLER_IP} +-e NODE_NAME={NODE_NAME}" + docker run --name qtip -id -e $envs -v "$HOME/imgstore:/home/opnfv/imgstore" opnfv/qtip + docker exec -i -t qtip /bin/bash Now you are in the container and QTIP can be found in the /repos/qtip and can be navigated to using the following command. @@ -79,22 +61,22 @@ from the OpenStack *openrc* file. This can be done by running the following command. :: - source get_env_info.sh -n {INSTALLER_TYPE} -i {INSTALLER_IP} + source scripts/get_env_info.sh -n {INSTALLER_TYPE} -i {INSTALLER_IP} source opnfv-creds.sh This provides a ``opnfv-creds.sh`` file which can be sources to get the -environment variables. For running QTIP manually, it is also necessary to -export the installer type. -:: - - export INSTALLER_TYPE="{installer-type}" +environment variables. QTIP default key pair """""""""""""""""""""" -QTIP uses a SSH key pair to connect to the guest image. This key pair can -be found in the ``config/`` directory. +QTIP uses a SSH key pair to connect to the guest image. You should generate key pair +before running QTIP test. And put key pair in the ``config/`` directory. +:: + + ssh-keygen -t rsa -N "" -f config/QtipKey -q + Hardware configuration diff --git a/docs/userguide/introduction.rst b/docs/userguide/introduction.rst index 7a202a45..4876d0e2 100644 --- a/docs/userguide/introduction.rst +++ b/docs/userguide/introduction.rst @@ -9,16 +9,16 @@ Introduction ************ This guide will serve as a first step to familiarize the user with how to -run QTIP the first time when the user clones QTIP on to their host machine. -In order to clone QTIP please follow the instructions in the -installation.rst located in docs/userguide/installation.rst. +run QTIP the first time when the user pull QTIP image on to their host machine. +In order to install and config QTIP please follow the instructions in the +configuration.rst located in docs/configguide/configuration.rst. QTIP Directory structure: ------------------------- The QTIP directory has been sectioned off into multiple folders to facilitate segmenting information into relevant categories. The folders that concern - the end user are `test_cases/` and `test_list/`. + the end user are `test_cases/` and `benchmarks/suite/`. **test_cases/:** @@ -58,7 +58,7 @@ distinguishes between a test to be run on the Virtual Machine or the compute node itself, respectively. -**test_list/:** +**benchmarks/suite/:** This folder contains three files, namely `compute`, `network` and `storage`. These files list the benchmarks are to be run by the QTIP framework. Sample @@ -132,11 +132,13 @@ The `Context` tag helps the user list the number of compute nodes they want to run dhrystone on. The user can list all the compute nodes under the `Host_Machines` tag. All the machines under test must be listed under the `Host_Machines` and naming it incrementally higher. The `ip:` tag is used - to specify the IP of the particular compute node. The `pw:` tag can be left - blank because QTIP uses its own key for ssh. In order to run dhrystone on - one compute node at a time the user needs to edit the `role:` tag. `role: - host` for machine_1 and `role: server` for machine_2 will allow for - dhrystone to be run on machine_1 and then run on machine_2. + to specify the IP of the particular compute node.The `ip:` tag can be left + blank when installer type is 'fuel',because QTIP will get ip + from installer. The `pw:` tag can be left blank because QTIP uses its own + key for ssh. In order to run dhrystone on one compute node at a time the user + needs to edit the `role:` tag. `role: host` for machine_1 and `role: server` + for machine_2 will allow for dhrystone to be run on machine_1 and then run + on machine_2. :: @@ -312,71 +314,67 @@ Sample dhrystone_vm.yaml file: Commands to run the Framework: ------------------------------ -In order to start QTIP on the default lab please use the following commands (asssuming you have prepared the config files in the test_cases/default/ directory and listed the intended suite in the test_list/): +In order to start QTIP on the default lab please use the following commands (asssuming your installer +is 'fuel' or 'compass', you use the config files in the test_cases/default/ directory and listed the +intended suite in the benchmarks/suite/): -First step is to export the necessary information to the environment. -:: - - source get_env_info.sh -n -i - -for running qtip on an openstack deployed using FUEL with the Installer IP 10.20.0.2 -:: - - source get_env_info.sh -n fuel -i 10.20.0.2 +First step is to export the necessary information to the environment and generate QTIP key pair. +Please follow the instructions in the configuration.rst. -This will generate the `opnfv-creds.sh` file needed to use the python clients for keystone, glance, nova, and neutron. +Secondary step download the QTIP image and upload it to the Cloud.QTIP will use this image +to create VM when test VM performance. :: - source opnfv-creds.sh + source docker/prepare_qtip_image.sh -Running QTIP on the using `default` as the pod name and for the `compute` suite by cli +Running QTIP on the using `default` as the pod name and for the `compute` suite by cli. :: python qtip.py -l default -f compute -Running QTIP on the using 'default' as the pod name and for the 'compute' suite 'bm' type by restful api +Running QTIP on the using 'default' as the pod name and for the 'compute' suite 'bm' type by restful api. :: - curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"compute", "type": "BM"}' -H "Content-Type: application/json" http://qtip_server_ip:5000/api/v1.0/jobs + curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"compute", "type": "BM"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/v1.0/jobs -Running QTIP on the using 'default' as the pod name and for the 'compute' suite 'vm' type by restful api +Running QTIP on the using 'default' as the pod name and for the 'compute' suite 'vm' type by restful api. :: - curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"compute", "type": "VM"}' -H "Content-Type: application/json" http://qtip_server_ip:5000/api/v1.0/jobs + curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"compute", "type": "VM"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/v1.0/jobs -Running QTIP on the using `default` as the pod name and for the `network` suite by cli +Running QTIP on the using `default` as the pod name and for the `network` suite by cli. :: python qtip.py -l default -f network -Running QTIP on the using 'default' as the pod name and for the 'network' suite 'bm' type by restful api +Running QTIP on the using 'default' as the pod name and for the 'network' suite 'bm' type by restful api. :: - curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"network", "type": "BM"}' -H "Content-Type: application/json" http://qtip_server_ip:5000/api/v1.0/jobs + curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"network", "type": "BM"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/v1.0/jobs -Running QTIP on the using `default` as the pod name and for the `storage` suite by cli +Running QTIP on the using `default` as the pod name and for the `storage` suite by cli. :: python qtip.py -l default -f network -Running QTIP on the using 'default' as the pod name and for the 'storage' suite 'bm' type by restful api +Running QTIP on the using 'default' as the pod name and for the 'storage' suite 'bm' type by restful api. :: - curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"storage", "type": "BM"}' -H "Content-Type: application/json" http://qtip_server_ip:5000/api/v1.0/jobs + curl --trace-ascii debug.txt -X POST -d '{ "installer_ip": "10.20.6.2","installer_type":"fuel", "suite_name":"storage", "type": "BM"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/v1.0/jobs Get running QTIP job status by restful api :: - curl --trace-ascii debug.txt -X GET http://qtip_server_ip:5000/api/v1.0/jobs/job-id + curl --trace-ascii debug.txt -X GET http://127.0.0.1:5000/api/v1.0/jobs/job-id For example: - curl --trace-ascii debug.txt -X GET http://172.37.0.3:5000/api/v1.0/jobs/5b71f035-3fd6-425c-9cc7-86acd3a04214 + curl --trace-ascii debug.txt -X GET http://127.0.0.1:5000/api/v1.0/jobs/5b71f035-3fd6-425c-9cc7-86acd3a04214 Stop running QTIP job by restful api.The job will finish the current benchmark test and stop. :: - curl --trace-ascii debug.txt -X DELTET http://qtip_server_ip:5000/api/v1.0/jobs/job-id + curl --trace-ascii debug.txt -X DELTET http://127.0.0.1:5000/api/v1.0/jobs/job-id For example: - curl --trace-ascii debug.txt -X DELETE http://172.37.0.3:5000/api/v1.0/jobs/5b71f035-3fd6-425c-9cc7-86acd3a04214q + curl --trace-ascii debug.txt -X DELETE http://127.0.0.1:5000/api/v1.0/jobs/5b71f035-3fd6-425c-9cc7-86acd3a04214q Results: -------- -- cgit 1.2.3-korg