35 Commits

Author SHA1 Message Date
Jenkins
c2b75d7947 Merge "Install data files in proper path" 2015-06-16 16:45:45 +00:00
Andrey Kurilin
540aefc440 Decrease time of rally verify job
Let's use regex 'tempest.api.compute.servers.test_servers' instead of
whole compute set.

Change-Id: I641f5d03b8e67a56d09fd0cba4632ff803e793c1
2015-06-11 00:26:00 +03:00
Sergey Skripnick
4dc498ceb9 Install data files in proper path
Bash completion script is installed in /usr/local/etc, so
install_rally.sh should make a symlink in /etc/bash_completion.d/

Also move `data_files` section from setup.py to setup.cfg

Closes-Bug: 1463038
Change-Id: Ifd5f69e41aa8121129d6314130385f48e1690843
2015-06-10 18:46:43 +03:00
Jenkins
8f82f50b34 Merge "Improvement of cover script" 2015-05-27 12:53:20 +00:00
Jenkins
b4b826afa6 Merge "Remove break from case statement to allow for parsing of CLI args" 2015-05-27 02:33:55 +00:00
Andrey Kurilin
35f179c9bc Improvement of cover script
*.pyc files break cover-script for situations like:
     some/module.py -> some.py

So we should remove all *.pyc files before launching `testr --coverage`

Change-Id: Ica22a3cd1a26d27c01f314a48a7cd49a529552eb
2015-05-26 19:01:09 -07:00
Brian Downs
a6f9d3c190 Remove break from case statement to allow for parsing of CLI args
Added test to check that --dbtype works

Closes-bug: 1458408

Change-Id: I26d3d7446e9652dc8df424854ee6204b95638f36
2015-05-26 23:39:03 +00:00
Chris St. Pierre
bbb1bbd92a Minor install script improvements
* Install wget/curl in install_required_sw(), where all other required
  software is installed.
* Fix and standardize exit. install_rally.sh used three different ways
  to stop execution: abort(); die(); and err() + exit. die() has a
  strange usage pattern, and there are several places that use a
  two-argument die() which happily waits for stdin forever. In other
  cases we had unique and exciting hacks to get around die()'s
  strangeness. This fixes all of those, and makes everything either
  use abort() or die() (correctly).
* Fix inconsistent say()/echo usage. This eliminates the rarely-used
  say() function entirely.
* Quoted things that need quoted. Some other minor changes
  recommended by shellcheck.

Change-Id: I1a9d0b2ff5daba02998245d5c7e624f46bd2242a
2015-05-19 14:27:41 -05:00
Antonio Messina
1f29afc116 Improve installation script
This is an almost complete rewrite of the installation script, mainly
directed to allow installation of Rally also from unprivileged users,
but also adding a few more options and checks.

More in details, the script now:

* can run as unprivileged user.
* support different database types
* allow to specify custom python binary
* always asks confirmation before doing potentially dangerous actions
  (removing directories or installing software)
* automatically install needed software if run as root
* this script is self-sufficient: it automatically downloads Rally
  from the git if needed
* if interrupted, cleans up the virtualenv and/or the downloaded repository

Co-Authored-By: Antonio Messina <antonio.s.messina@gmail.com>
Co-Authored-By: Sergey Skripnick <sskripnick@mirantis.com>
Change-Id: I574d4fd7cc7c8e71720a6a5ff8db22ee4fd4fc81
Closes-bug: #1393887
2015-05-13 18:24:05 +03:00
Sergey Skripnick
a36de3a119 Fix RALLY_SCENARIO filename in rally-gate.py
Script rally-gate.py is designed to work if RALLY_SCENARIO
does contain scenario filename with extension.

It should work if there is no extension in  RALLY_SCENARIO
as done in OpenStack infra scripts.

Change-Id: I95c77ae7d9109c6f9cf6a12b1a56bb73357c7d70
2015-05-06 16:22:19 +02:00
Roman Vasilets
42b454ef2b Print Rally debug logs in Rally dsvm gate jobs
Add --rally-debug flag to the task execution to show
 rally logs in scenarios that are tested on gate.

Change-Id: I877cf605ead7e2e7172ef6e3d88c57942edb9b0e
2015-05-03 02:47:01 +00:00
Boris Pavlovic
0264b75a60 Restore coverage job
Closes-bug: #1450731
Change-Id: I26c796345b04de373a10608748460ffbbb315481
2015-05-01 10:53:48 +02:00
Boris Pavlovic
b09c20a02b Fix pbr and it's version checks (unblock gates)
New version of pbr 0.11 was released and it checks
that version in setup.cfg is bigger then latest tag

To avoid future issues we will let pbr calulate version
instead of hardcode them in setup.cfg

Temporary disable coverage job to merge this patch

Partial-bug: #1450731

Change-Id: I0c00c231cea1a0506107133803406eb56694f690
2015-05-01 10:51:03 +02:00
Boris Pavlovic
b1b48e2791 Fix coverage job to compare proper git diff and make it more strict
Allow only 4 lines non covered by unit tets

Currently we are testing patch against master, instead of HEAD^
which produce issue when checked commit is not after current rebase.

master
  |
patch1
  |
patch2
  |
old_master <- your_patch

Proper way to check coverage is to do diff between
your_patch and old_master instead of master.

Change-Id: Ib0a177eafa9c7dcce799bde1c6b45d541fedde05
2015-04-23 17:31:59 +03:00
Boris Pavlovic
b399ce876e Improve coverage job
* Make decision based on missing lines not difference
  between percentage of coverage.

* Fix issue in case when stash has elements but
  there is no changes to stash. We pop stash only
  if coverage job created it

* Changes in UX:

  * Show diff of coverage reports if proposed patch
    coverage is less than in master

  * Better UI messages

Change-Id: I61bb5fff812628a163025eef0a6e2ed29cdd4353
2015-04-22 17:37:44 +02:00
Boris Pavlovic
6bb572e046 Fix rally plugins relative imports
We are not able to use relative imports for plugins that are
outside of rally package.

To fix this we should add to sys.path all directories with Rally
plugins.

This is quite easy fix. But in any case it includes functional test
that checks that this actually works in real life.

+ Fix of Rally gates to copy whole tree not just *.py files from
  rally-jobs/plugins/

Change-Id: Ie53dc2ba5c32a5e83d84d0ea5703e2e04b10ff33
Closes-bug: #1446923
2015-04-22 11:59:40 +03:00
Swapnil Kulkarni
3fb277d122 Update stackforge to openstack
Found the issue while configuring devstack,
the libs were having stackforge location.

Change-Id: Ibd93eccb7d89cb6b06a1e8cc1d7d6f65ce52f352
2015-04-20 14:02:43 +05:30
Boris Pavlovic
2a4f2bb2a0 Make coverage job voting
Instead of asking people to write unit tests let's just make
coverage job voting.

This can be implemented in very simple maner:

1) checkout to master
2) run coverage and get base line
3) checkout back
4) run coverage to get current coverage
5) If coverage was reduced more then 0.01% mark job as failed

Change-Id: Ib6bc4dbb11c69b107e6fcd6464a4041337ea1a66
2015-04-17 18:18:21 +03:00
Hugh Ma
82c309fdc5 Replaced deprecated 'use deployment' with 'deployment use'
Changes:
  - Replaced 'use deployment' with 'deployment use' in various files
    as the former command has been deprecated.

Change-Id: I5f5779d6b6f36fa4f21cfe257ba88c2d9fce0d57
Closes-Bug: #1433683
2015-04-10 19:36:52 -07:00
Sergey Skripnick
d41621eb7c Add new script for gate jobs
This script will run scenario specified by $RALLY_SCENARIO
environment variable.

Also tags now supported. Tags are stand for modifying
deployment or environment somehow.

Currently implemented only "v3" tag. This tag is changing
deployment endpoints to use keystone v3 protocol.

For example we want to run two scenarios: one for keysone v2
and one for v3. Then we need to create two files:

my-rally.yaml    # will be run vs keystone v2 (v2 is used by default)
my-rally_v3.yaml # will be run vs keystone v3

And export $RALLY_SCENARIO=my-rally.yaml

Change-Id: I44d1788e3892be59afbf8eaecb5d3e3b995fc3a8
2015-02-19 23:23:15 +01:00
Olga Kopylova
a59b9817bb Add aliases "rally task|deployment|verify use"
Add alias "rally task use" for "rally use task",
"rally deployment use" for "rally use deployment"
and "rally verify use" for "rally use verification"

Change-Id: I6e63f4b60e1faf794f050f98be127744fe8011a4
2015-02-02 12:20:47 +02:00
Jenkins
637b41cfe2 Merge "Input task templates and task cmd cleanup" 2015-01-15 15:31:06 +00:00
Boris Pavlovic
a2d28d1f9f Input task templates and task cmd cleanup
Implement task templates based on jinja2.

This allow us to pass as a task jinja2 template
and it's argument via arguments --task-args and
--task-args-file that should be dict in JSON or YAML
presentations.

So now command looks like:

rally task start <file> --task-args <template-args-json-or-yaml> \
  --task-args-file <file-with-args-in-json-yaml>

If both --task-args and --task-args-file then file dict is updated
by task args file.

Extend rally CI performance job. Now we can set template args
via file with name: ${TASK}_args.yaml

Bonus:
* Better message on InvalidTask format
* Remove redudant catch of "keyboardinterrupt"
  it should be implement in different way.
* Replace ' -> " in rally.cmd.commands.task
  and tests.unit.cmd.commands.task
* Imporve a bit CLI messages on rally task start
* Remove old plot2html command (it's enough deprecated)
* Improve test coverage of rally/cmd/commands/task
* Fix rally/cmd/commands/validate return 1 if bad format
* Write errors to stderr (in whole cmd/commands/task.py)

Change-Id: I7dadf2986bb10407865bc73bb2fb8c96a5162d9a
2015-01-15 16:29:34 +03:00
Prabhjyot Singh Sodhi
2cf021ec9c Adding documentation
Documentation about rally-verify.sh and test_install.sh is added

Change-Id: If5f2911385b0df893867fc8711212d2d62351dfd
2015-01-14 00:18:06 -08:00
sskripnick
e12ccc7d09 Fix html rendering on failed functional tests
Remove -e option from shebang

Change-Id: I32fb1c13e20a61476958eabfca7897caa59dccab
2014-12-16 17:19:34 +02:00
Andrey Kurilin
6c5e07e31c Configure gate-rally-dsvm-verify
Recently, we added new job "gate-rally-dsvm-verify" for Rally[1].
This job implied functional testing integration Rally with Tempest[2].

This patch adds tests/ci/rally-verify.sh script, which is used by new job.

rally-verify.sh does:
- tempest installation
- run "rally verify start" twice and print results
- compare results of two verifications
- list verifications
- generate html page based on results

To implement gate-rally-dsvm-verify some changes were requered to
existing Rally code:
- Added ability for rally/ui/utils.py to accept arguments to render html-pages
- Fixed logging debug-messages in tempest verifier
- Fixed check "is debug mode turned on or not"(also, added hacking rule for it)

TODO for future patches:
- add launch of rally task for Tempest
- add launch of random test set
- add check for successful tests

[1] https://review.openstack.org/#/c/137232
[2] https://www.mirantis.com/blog/rally-openstack-tempest-testing-made-simpler

Closes-Bug: #1400465
Closes-Bug: #1400518

Change-Id: I8e1fbab22c2da109bbc442f040fe259e5d22a62a
2014-12-12 01:28:01 +02:00
Alexander Maretskiy
867c4be47c Add benchmark overview page to html report
The overview page shows all scenarios and their summarized results
in single table, so it is easier to understand the whole result
and compare specific scenarios.

Also, there are some minor features and fixes in html report.

Changes:
  * Benchmark overview page
  * Task input file is available now
  * Scenario full duration is added to overview
  * Scenario duration is renamed to `Load duration'
  * Overview is sortable
  * Fix: control from browser history: back/forward buttons now work
  * Fix: durations are reset for iterations with errors
  * AngularJS version is updated to release 1.3.3
  * task sla_check output: column `success' with options True/False
    is renamed to `status' with options PASS/FAIL

Change-Id: I0eb7af01432c9c10e4ec55720bb53417478a5789
2014-11-27 19:47:32 +02:00
Boris Pavlovic
98dc6b9a7a Rename rally-scenarios to rally-jobs & add readme
This patch renames misleading rally-scenarios to rally-jobs.
rally-jobs describes much better purpose of this directory

Add readme files that describes structure and meanings of files
and directories

Change-Id: I8f5a2816186a2cafd251981ba7ad50e631e548f5
Closes-bug: #1395502
2014-11-24 16:13:47 +04:00
Jenkins
cae77b17da Merge "add ability to refer deployment by uuid or name" 2014-11-21 16:31:06 +00:00
Oleh Anufriiev
9611927787 add ability to refer deployment by uuid or name
also deployment name turned unique in db

Change-Id: I513b5259e0cfa66780b4ce00cf78dc57aeeb57db
2014-11-19 23:37:38 +02:00
Alexander Maretskiy
4901d45bbf Base HTML templates and improvements for task report
This patch adds UI templates directory and utils,
which serve and unify HTML generation.

Also, there are some fixes and improvements for HTML task report.

In this patch:
  * Base mako templates (package rally.ui)
  * Rework tests/ci/rally-gate templates
    in order to use base template with generic header and styles
  * Show scenario errors (if any) in task report tab
  * Show scenario output (if any) in task report tab
  * Show SLA data in Overview tab
  * Show total scenario duration value (after the scenario name, above tabs)
  * If got some iteration error, save exception class name in the database
    instead of its repr()
  * Prevent layout from breaking and show proper message if JS libs
    can not be loaded for some reason
  * Fix bug 1387661 - the cause of the bug is wrong input json data,
    generated by plot.py. This happens when some atomic actions data
    missed (which is a result of scenario errors) - and we have different
    atomic actions sets between iterations. The fix saves atomic actions
    integrity by adding missed atomic actions (with 0 value).
  * Fix: if unexistend task uuid is specified in `task report' command,
    then proper exception is raised

Closes-Bug: 1387661

Change-Id: I4bcbf86e6fad844e6752306eb6c1ccfefa6c6909
2014-11-18 19:32:30 +02:00
Olga Kopylova
2c368272c9 Improve plugins and apply loading for runners and contexts plugins
Provide plugins loading for runners and contexts, improve samples.
Plugins now can be loaded from ~/.rally/plugins and /opt/rally/plugins
and any it's subdirectories.

Closes-Bug: #1320942

Change-Id: I213086e7eae17e297c398c301f5ed8d2331d951e
2014-10-24 10:25:10 +00:00
rook
903b09b38b Adding logic to clean up old rally installs
Change-Id: Idee30bbeeb4d7b77b0ac2a0eb09ca56f2d7c488a
2014-10-16 13:29:25 -04:00
Alexander Maretskiy
3230a3a89b Improvements for task plot2html
CLI command `task plot2html' is renamed to `task report',
however old name is still available for compatibility.

HTML output of benchmark results is reworked:
     * scenario select dropdown is changed to aside menu,
       with scenarios methods grouped by classes
     * initially select scenario from URL hash
     * scenario results are divided into tabs
     * new layout and styling, from bootstrap framework
     * jQuery is removed
     * AngularJS is used for rendering all the data

Change-Id: I00db7016900952f397681045ff99d07a0714fafe
2014-10-14 15:29:43 +03:00
Sergey Skripnick
f752ac9add Reorganize test module structure
Moved test modules:
 tests/             ->  tests/unit
 test_ci/           ->  tests/ci
 tests_functional   ->  tests/functional
 rally/hacking      ->  tests/hacking

Add testing read me file

Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Andrey Kurilin <akurilin@mirantis.com>

Change-Id: I57c09d892da4adf863c358a4d63e3543b50d10b7
2014-10-07 13:50:40 +00:00