18 Commits

Author SHA1 Message Date
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
Sergey Skripnick
a9b635f62e Rename rally.cmd to rally.cli
There is module 'cmd' in standard library, and unittest's discover
does modify sys.path when running tests. This cause errors when running
unit tests in some environments (E.g. pycharm)

Change-Id: I4fd2d271da1b7fd300fbbeb6107aa958e716fd2b
Closes-Bug: 1457162
2015-05-21 18:14:19 +03: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
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
03155f5246 Release 0.0.3
Relese notes for 0.0.3 version

Set new version in doc/source/conf.py

Set new version in setup.cfg

Change-Id: I0569af56525dbb64ffd8ca209cc2212f69dbbe68
2015-04-14 16:50:14 +03:00
Boris Pavlovic
df2475d27e Release 0.0.2
* Add new section in docs for release_notes

* Write release notes for 0.0.1 and 0.0.2 versions

* Move doc/feature_request/stop_scenario_after_several_errors to implemented

* Various improvements and fixes in docs

Change-Id: I787e320db5f7a17044a76f345612cd29d515f3ca
2015-03-12 17:48:57 +03:00
Andrey Kurilin
6eb8e1da9d Add Python 3.4 as supported interpreters
Rally code is python 3.4 compatible(required several small fixes, see a list
below for more details), so we can mention this great information in
setup.cfg file.

Fixed py34 incompatibe issues:
 - usage of OrderedDict for storing task results. Order of such results as
AtomicActions is important.
 - printed sla results are sorted by criterea name, so the results are equal
in all envs

Change-Id: I5f031170218ef4c2daf0ce0c2c391822218643dd
2015-03-10 14:43:01 +02:00
Andrey Kurilin
387dc356e3 Remove all non-incubated oslo code
Rally repository includes openstack.common module with modules from
oslo-incubator(modules are listed in openstack-common.conf file).

All those modules can be splitted by 4 categories:
 1. logging modules
 2. aas related modules
 3. cliutils
 4. config

Modules from first category were graduated to separate lib, so we can remove
them and use `oslo.log`.

Modules from second category are not really used and will be not used,
because Rally-as-a-Service will use flask microframework instead of
pecan(modules from oslo-incubator are designed for pecan).

Since oslo core team did not plan to graduate `cliutils` module from
oslo-incubator, so there are no reasons to sync this module with oslo, we
can copy needed functions and maintain them in our repo.

Additional to rally.openstack dir, modules from oslo incubator are located
in tools dir.
tools/config modules works pretty bad, opts from rally.osclients always lost
during automated config generator.
`oslo.config` lib provides a better way to autogenerate config sample of
Rally. It requires new entry point, which returns a list with all opts(look
at 'rally.common.opts', 'setup.cfg' for more details). Since all opts are
used in one place, their names were unified.
Also config was updated(via `tox -egenconfig`).

tools/rally.bash_completion file is moved to etc dir, because etc dir
corresponds better and it gave us ability to remove whole tools dir

Closes-Bug: #1378960

Change-Id: Ic127269c367275d3adcfc9f40d9144fce8295391
2015-02-23 14:31:36 +00:00
Andrey Kurilin
712a6fa482 Fix all py3 related issues
This patch makes output of `tox -epy34` to finish with following message:
>  py34: commands succeeded
>  congratulations :)

Issues:
 * module "__builtin__" was renamed to "builtins" in Python 3

   Related modules:
    - rally.api
    - tests.unit.benchmark.scenarios.vm.test_utils

 * function "map"/"filter" returns "builtins.map"/"builtins.filter" object
   in Python 3 instead of list in Python 2. "builtins.map" and
   "builtins.filter" object is not subscriptable and has no len(), so list
   comprehension is preferable to use and py2/py3 compatible way.

   Related modules:
    - rally.benchmark.context.sahara.sahara_edp
    - rally.benchmark.processing.plot
    - rally.benchmark.sla.base
    - rally.benchmark.types
    - rally.cmd.commands.task
    - rally.cmd.commands.verify
    - tests.unit.benchmark.scenarios.test_base
    - tests.unit.benchmark.wrappers.test_keystone
    - tests.unit.cmd.commands.test_task
    - tests.unit.cmd.commands.test_verify

 * dict.keys()/dict.values() returns "dict_keys"/"dict_values" object in
   Python 3 instead of list in Python 2. so list(dict) and
   list(dict.values()) should be used instead.

   Related modules:
    - rally.benchmark.scenarios.utils
    - rally.benchmark.scenarios.vm.vmtasks
    - tests.unit.cmd.commands.test_show
    - tests.unit.common.test_broker
    - tests.unit.deploy.engines.test_fuel
    - tests.unit.fakes

 * Some changes was made in Python 3 related to data model, so we should
   change our inspect code. See code changes for more details

   Related modules:
    - rally.cmd.cliutils
    - rally.common.utils

 * ConfigParser is more strict for duplicate items in Python 3, so
   duplicates are removed

   Related files:
    - rally/verification/tempest/config.ini

 * Exception object doesn't have "message" attribute in Python 3, so
   if we want to get it, the most proper way is using "getattr"

   Related modules:
    - rally.verification.tempest.config

 * "mock.MagicMock" is not sortable in Python 3, so we should add required
   attributes to fix that.

   Related modules:
    - tests.unit.benchmark.context.test_base

 * assertSequenceEqual assertation method was added in tests.unit.test to
   compare sequence objects

   Related modules:
    - tests.unit.benchmark.context.cleanup.test_resources
    - tests.unit.benchmark.scenarios.nova.test_utils

 * function "range" returns "range" object in Python 3 instead of list
   in Python 2.

   Related modules:
    - tests.unit.benchmark.processing.test_utils

 * keyword arguments should be transmitted to self.assertRaises as kwargs,
   not like a dict

   Related modules:
    - tests.unit.benchmark.scenarios.dummy.test_dummy

Additional changes:
 * Python 2.6 was added to setup.cfg, since Rally supports it.
 * py33, py34 environments were added to tox.ini
 * wrong ignore path was removed from tox.ini
 * made items of bash complition sorted

Several tests are skipped in Python 3 env. For more details see notes in code:
 - tests.unit.benchmark.processing.test_plot.PlotTestCase.test__process_main_time
 - tests.unit.benchmark.processing.test_plot.PlotTestCase.test__process_atomic_time
 - tests.unit.common.test_utils.MethodClassTestCase.test_method_class_for_class_level_method

During porting Rally to Python3, several issues found and fixed in
TempestContext and its unit tests:

 - If process of cleanup is failed, exception is handled and cleanup is
   marked as successfull. This issue was fixed and CleanUpException was
   added to rally.exception module
 - Cleanup was called with wrong path.

Change-Id: If04e873790dcb4c9c882d4be4bf40479deedd36d
2015-01-26 15:18:36 +00:00
Boris Pavlovic
afc5589a8f Fix bash completition setup
Change-Id: Ibe3290a273b99ea3a468a4b67b2dde54f01998a3
2014-10-13 23:24:24 +04:00
Aswad Rangnekar
cfd93b799a Remove openstack-rally entry point
Closes-Bug: #1353233
Change-Id: I5582b1c1942a094ea9486f07d49386106282201c
2014-08-06 11:53:33 +00:00
Ilya Kharin
4b16da33db Base part of a server REST API
The patch introduces a first version of REST API. Rally can be run
as-a-Service by the shell script rally-api. By default a service binds
to a socket 0.0.0.0:8877. The pair of binding parameters have got own
section called an 'api'. One of the supported Content-Type is an
'application/json'.

TODO:
* A Deployment and a Task controllers/types.
* Proper exception handling.

blueprint rally-service-api-v1

Change-Id: Ib0a1f141a083a35c8d43aed2bb1db3307e022b70
2014-03-20 17:11:38 +04:00
Hugh Saunders
43a12fd92f Call rally-manage with warning when openstack-rally-manage is used
Currently when openstack-rally-manage is used, args are passed through
to rally, not rally-manage. This patch fixes this situation.

Change-Id: I51fe14068f679d7f65fb4e518b8f55beca1c7d72
Closes-Bug: #1274068
2014-01-29 11:37:32 +00:00
Ilya Kharin
ac234be543 Add support to build docs by Sphinx
The patch introduce configuration files for building documentations by
Sphinx. Also added a simple tree of static documents for test ability of
autobuilding documentation from source code.

bp rally-sphinx-docs

Change-Id: I2a225b1bdb4ae0640428b438a0c9779e28586546
2014-01-15 19:11:11 +04:00
Hugh Saunders
46ffad029a Deprecate openstack- console scripts, introduce rally, rally-manage
Change-Id: I9edb34a15e26f22a5576ad2c911415950ff17e42
Trello: https://trello.com/c/BpplZmWS
2014-01-15 09:20:09 +00:00
Monty Taylor
2f0d1d8bb6 Update short description language
There is a legal/english thing that needs to happen here - it can't be
"OpenStack Benchmark System" due to trademark issues unless it's
blessed. It can be "Benchmark System for OpenStack" - which I think
should be about the same.

Change-Id: I1b015dbbe68dbeed8ddf7bf393456a399a5a6340
2013-10-15 19:43:55 -03:00
Alexei Kornienko
f11dcbeb01 Added cli scripts to package config
Created 2 new scripts for entrypoints:
openstack-rally
openstack-rally-manage

Change-Id: I0f4851f867211f27a52392f99c2cb0af2139f752
2013-09-23 12:35:51 +03:00
Boris Pavlovic
8e31103305 Add tox, pep and requirements to project
Adding minimal amount of things to be able to run
tox against code and check all unit tests + pep
2013-08-14 12:23:42 +04:00