diff options
-rw-r--r-- | INFO | 1 | ||||
-rw-r--r-- | docs/testing/user/configguide/index.rst | 1 | ||||
-rw-r--r-- | docs/testing/user/configguide/web.rst | 74 | ||||
-rw-r--r-- | docs/testing/user/userguide/cli.rst | 55 | ||||
-rw-r--r-- | docs/testing/user/userguide/index.rst | 1 | ||||
-rw-r--r-- | docs/testing/user/userguide/web.rst | 70 | ||||
-rw-r--r-- | qtip/scripts/quickstart.sh | 2 | ||||
-rw-r--r-- | requirements-frozen.txt | 19 | ||||
-rw-r--r-- | requirements.txt | 5 | ||||
-rw-r--r-- | resources/ansible_roles/opnfv-testapi/tasks/report.yml | 2 | ||||
-rw-r--r-- | resources/ansible_roles/ramspeed/tasks/main.yml | 4 | ||||
-rw-r--r-- | setup.cfg | 1 | ||||
-rwxr-xr-x | tests/ci/experimental.sh | 2 | ||||
-rwxr-xr-x | tests/ci/periodic.sh | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
15 files changed, 199 insertions, 42 deletions
@@ -16,6 +16,7 @@ Akhil Batra akhil.batra@research.iiit.ac.in Morgan Richomme morgan.richomme@orange.com Prabu Kuppuswamy prabu.kuppuswamy@spirent.com Prakash Ramchandran prakash.ramchandran@huawei.com +Taseer Ahmed taseer94@gmail.com Trevor Cooper trevor.cooper@intel.com Yujun Zhang zhang.yujunz@zte.com.cn Zhifeng Jiang Jiang.ZhiFeng@zte.com.cn diff --git a/docs/testing/user/configguide/index.rst b/docs/testing/user/configguide/index.rst index 43c32cab..ce733666 100644 --- a/docs/testing/user/configguide/index.rst +++ b/docs/testing/user/configguide/index.rst @@ -12,3 +12,4 @@ QTIP Installation & Configuration :maxdepth: 2 ./configuration.rst + ./web.rst diff --git a/docs/testing/user/configguide/web.rst b/docs/testing/user/configguide/web.rst new file mode 100644 index 00000000..83365abe --- /dev/null +++ b/docs/testing/user/configguide/web.rst @@ -0,0 +1,74 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +*************************************** +Web Portal installation & configuration +*************************************** + +Web Portal for Benchmarking is developed on python `Django`_ Framework. Right now the installation +is need to be done from source. + + + +Clone QTIP Repo +=============== + +:: + + git clone https://github.com/opnfv/qtip.git + + +Setup database and Initialize user data +======================================= + +CD into `web` directory. +------------------------ + +:: + + cd qtip/qtip/web + + +Setup migrations +---------------- + +:: + + python manage.py makemigrations + + +In usual case migrations will be already available with source. Console willll notify you +of the same. + +Run migrations +-------------- + +:: + + python manage.py migrate + + +Create superuser +---------------- +:: + + python manage.py createsuperuser + + +Console will prompt for adding new web admin. Enter new credentials. + + + +Collecting Static Dependencies +------------------------------ +:: + + python manage.py importstatic + + +This will import js and css dependencies for UI in static directory. Now the web application is +ready to run. + + +.. _Django: https://docs.djangoproject.com/en/1.11/ diff --git a/docs/testing/user/userguide/cli.rst b/docs/testing/user/userguide/cli.rst index 8a983155..f0894b01 100644 --- a/docs/testing/user/userguide/cli.rst +++ b/docs/testing/user/userguide/cli.rst @@ -7,7 +7,7 @@ CLI User Manual *************** QTIP consists of a number of benchmarking tools or metrics, grouped under QPI's. QPI's map to the different -components of a NFVI ecosystem, such as compute, network and storage. Depending on the type of application, +components of a NFVi ecosystem, such as compute, network and storage. Depending on the type of application, a user may group them under plans. Bash Command Completion @@ -26,53 +26,60 @@ QTIP CLI provides interface to all of the above the components. A help page prov along with a short description. :: - qtip [-h|--help] + qtip --help Usage ===== -Typically a complete plan is executed at the target environment. QTIP defaults to a number of sample plans. -A list of all the available plans can be viewed +QTIP is currently supports two different QPI's, compute and storage. To list all the supported QPI :: - qtip plan list + qtip qpi list -In order to view the details about a specific plan. +The details of any QPI can be viewed as follows :: - qtip plan show <plan_name> +qtip qpi show <qpi_name> -where *plan_name* is one of those listed from the previous command. - -To execute a complete plan +In order to benchmark either one of them, their respective templates need to be generated :: - qtip plan run <plan_name> -p <path_to_result_directory> + qtip create --project-template [compute|storage] <workspace_name> + +By default, the compute template will be generated. An interactive prompt would gather all parameters specific to +OpenStack installation. -QTIP does not limit result storage at a specific directory. Instead a user may specify his own result storage -as above. An important thing to remember is to provide absolute path of result directory. +Once the template generation is complete, configuration for OpenStack needs to be generated. :: - mkdir result - qtip plan run <plan_name> -p $PWD/result + cd <workspace_name> + qtip setup -Similarly, the same commands can be used for the other two components making up the plans, i.e QPI's and metrics. -For example, in order to run a single metric +This step generates the inventory, populating it with target nodes. + +QTIP can now be run :: - qtip metric run <metric_name> -p $PWD/result + qtip run -The same can be applied for a QPI. +This would start the complete testing suite, which is either compute or storage. Each suite normally takes about +half an hour to complete. -QTIP also provides the utility to view benchmarking results on the console. One just need to provide to where -the results are stored. Extending the example above +Benchmarking report is made for each and every individual section in a QPI, on a particular target node. It consists of +the actual test values on that node along with scores calculated by comparison against a baseline. :: - qtip report show <metric_name> -p $PWD/result + qtip report show [-n|--node] <node> <section_name> + Debugging options ================= -Debug option helps identify the error by providing a detailed traceback. It can be enabled as +QTIP uses Ansible as the runner. One can use all of Ansible's CLI option with QTIP. In order to enable verbose mode +:: + + qtip setup -v + +One may also be able to achieve the different levels of verbosity :: - qtip [-d|--debug] plan run <plan_name> + qtip run [-v|-vv|-vvv] diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst index e6eaea59..8cbb43c2 100644 --- a/docs/testing/user/userguide/index.rst +++ b/docs/testing/user/userguide/index.rst @@ -15,4 +15,5 @@ QTIP User Guide getting-started.rst cli.rst api.rst + web.rst compute.rst diff --git a/docs/testing/user/userguide/web.rst b/docs/testing/user/userguide/web.rst new file mode 100644 index 00000000..79f180d9 --- /dev/null +++ b/docs/testing/user/userguide/web.rst @@ -0,0 +1,70 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +********************** +Web Portal User Manual +********************** + +QTIP consists of different tools(metrics) to benchmark the NFVI. These metrics +fall under different NFVI subsystems(QPI's) such as compute, storage and network. +QTIP benchmarking tasks are built upon `Ansible`_ playbooks and roles. +QTIP web portal is a platform to expose QTIP as a benchmarking service hosted on a central host. + + +Running +======= + +After setting up the web portal as instructed in config guide, cd into the `web` directory. + +and run. + +:: + + python manage.py runserver 0.0.0.0 + + +You can access the portal by logging onto `<host>:8000/bench/login/` + +If you want to use port 80, you may need sudo permission. + +:: + + sudo python manage.py runserver 0.0.0.0:80 + +To Deploy on `wsgi`_, Use the Django `deployment tutorial`_ + + +Features +======== + +After logging in You'll be redirect to QTIP-Web Dashboard. You'll see following menus on left. + + * Repos + * Run Benchmarks + * Tasks + +Repo +---- + + Repos are links to qtip `workspaces`_. This menu list all the aded repos. Links to new repos + can be added here. + +Run Benchmarks +-------------- + + To run a benchmark, select the corresponding repo and run. QTIP Benchmarking service will clone + the workspace and run the benchmarks. Inventories used are predefined in the workspace repo in the `/hosts/` config file. + +Tasks +----- + + All running or completed benchmark jobs can be seen in Tasks menu with their status. + + +*New users can be added by Admin on the Django Admin app by logging into `/admin/'.* + +.. _Ansible: https://www.ansible.com/ +.. _wsgi: https://wsgi.readthedocs.io/en/latest/what.html +.. _deployment tutorial: https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +.. _workspaces: https://github.com/opnfv/qtip/blob/master/docs/testing/developer/devguide/ansible.rst#create-workspace diff --git a/qtip/scripts/quickstart.sh b/qtip/scripts/quickstart.sh index 58a12459..826ed656 100644 --- a/qtip/scripts/quickstart.sh +++ b/qtip/scripts/quickstart.sh @@ -26,7 +26,7 @@ verify_connectivity(){ fi sleep 1 done - error "Can not talk to $ip." + echo "Can not talk to $ip." } #Getoptions diff --git a/requirements-frozen.txt b/requirements-frozen.txt index 0355eb3c..f9225232 100644 --- a/requirements-frozen.txt +++ b/requirements-frozen.txt @@ -1,10 +1,13 @@ -ansible==2.1.2.0 -click==6.7 -connexion==1.1.5 -Jinja2==2.9.5 -numpy==1.12.1 -paramiko==2.1.2 -pbr==2.0.0 +humanfriendly==4.4.1 +connexion==1.1.11 +Jinja2==2.9.6 +Django==1.11.5 +asq==1.2.1 +six==1.11.0 +ansible==2.4.0.0 +requests==2.18.4 prettytable==0.7.2 -six==1.10.0 +numpy==1.13.1 +click==6.7 +pbr==3.1.1 PyYAML==3.12 diff --git a/requirements.txt b/requirements.txt index 3b1d7498..97229c29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,13 @@ -colorama ansible click connexion<=1.1.11 Jinja2 numpy -paramiko pbr prettytable six PyYAML humanfriendly asq -Django
\ No newline at end of file +Django +requests diff --git a/resources/ansible_roles/opnfv-testapi/tasks/report.yml b/resources/ansible_roles/opnfv-testapi/tasks/report.yml index bb034d84..830f9398 100644 --- a/resources/ansible_roles/opnfv-testapi/tasks/report.yml +++ b/resources/ansible_roles/opnfv-testapi/tasks/report.yml @@ -26,6 +26,6 @@ scenario: "{{ scenario }}" start_date: "{{ ansible_date_time.date }}" stop_date: "{{ ansible_date_time.date }}" - criteria: "{{ pod_result.score }}" + criteria: 2048 details: score: "{{ pod_result.score }}" diff --git a/resources/ansible_roles/ramspeed/tasks/main.yml b/resources/ansible_roles/ramspeed/tasks/main.yml index dbf16567..6f0b10fc 100644 --- a/resources/ansible_roles/ramspeed/tasks/main.yml +++ b/resources/ansible_roles/ramspeed/tasks/main.yml @@ -14,7 +14,9 @@ - name: downloading ramsmp get_url: - url: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz +# alasir.com domain name expired on 2017-09-30 05:47:11 +# url: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz + url: http://sources.buildroot.net/ramsmp-3.5.0.tar.gz dest: "{{ workdir }}" checksum: "sha256:39fb15493fb3c293575746d56f6ab9faaa1d876d8b1f0d8e5a4042d2ace95839" @@ -15,7 +15,6 @@ setup-hooks = [entry_points] console_scripts = qtip = qtip.cli.entry:cli - qtip-api = qtip.api.__main__:main [files] packages = diff --git a/tests/ci/experimental.sh b/tests/ci/experimental.sh index bb9694b7..7fa18f2f 100755 --- a/tests/ci/experimental.sh +++ b/tests/ci/experimental.sh @@ -31,7 +31,7 @@ qtip_repo='/home/opnfv/repos/qtip' docker cp . ${TEST_SUITE}_qtip:${qtip_repo} docker exec ${TEST_SUITE}_qtip bash -c "cd ${qtip_repo} && pip install -U -e ." -docker exec -t ${TEST_SUITE}_qtip bash -x ${qtip_repo}/qtip/scripts/quickstart.sh +docker exec ${TEST_SUITE}_qtip bash -x ${qtip_repo}/qtip/scripts/quickstart.sh echo "QTIP: Verify ${TEST_SUITE} done!" exit 0 diff --git a/tests/ci/periodic.sh b/tests/ci/periodic.sh index 5c488b87..87fa7627 100755 --- a/tests/ci/periodic.sh +++ b/tests/ci/periodic.sh @@ -13,7 +13,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${script_dir}/utils/start_services.sh -docker exec -t ${TEST_SUITE}_qtip bash -x /home/opnfv/repos/qtip/qtip/scripts/quickstart.sh +docker exec ${TEST_SUITE}_qtip bash -x /home/opnfv/repos/qtip/qtip/scripts/quickstart.sh echo "${TEST_SUITE} QPI done!" @@ -38,7 +38,7 @@ builtins = _ exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv [testenv:reqs] -deps=-rrequirements/test.txt +deps=-rrequirements-test.txt commands= pip-missing-reqs qtip pip-extra-reqs qtip |