Document --plugin-paths/RALLY_PLUGIN_PATHS

These options were added in 71d01a but were never added to the
docs. This removes the five duplicate places that plugin placement was
discussed, and replaces them with a single place that documents the
"new" options.

Change-Id: Ief27578692b220895027291d02f5e204351c8c0f
This commit is contained in:
Chris St. Pierre 2015-09-24 08:50:53 -05:00 committed by Boris Pavlovic
parent 592a4b6cc0
commit 45059a05a6

View File

@ -30,12 +30,34 @@ full list with detailed descriptions of all official Rally plugins.
How plugins work
----------------
Rally provides an opportunity to create and use a **custom benchmark scenario, runner or context** as a **plugin**:
Rally provides an opportunity to create and use a **custom benchmark
scenario, runner or context** as a **plugin**:
.. image:: ./images/Rally-Plugins.png
:align: center
Plugins can be quickly written and used, with no need to contribute them to the actual Rally code. Just place a python module with your plugin class into the **/opt/rally/plugins** or **~/.rally/plugins** directory (or it's subdirectories), and it will be autoloaded.
Placement
---------
Plugins can be quickly written and used, with no need to contribute
them to the actual Rally code. Just place a python module with your
plugin class into the ``/opt/rally/plugins`` or ``~/.rally/plugins``
directory (or its subdirectories), and it will be
autoloaded. Additional paths can be specified with the
``--plugin-paths`` argument, or with the ``RALLY_PLUGIN_PATHS``
environment variable, both of which accept comma-delimited
lists. Both ``--plugin-paths`` and ``RALLY_PLUGIN_PATHS`` can list
either plugin module files, or directories containing plugins. For
instance, both of these are valid:
.. code-block:: bash
rally --plugin-paths /rally/plugins ...
rally --plugin-paths /rally/plugins/foo.py,/rally/plugins/bar.py ...
You can also use a script ``unpack_plugins_samples.sh`` from
``samples/plugins`` which will automatically create the
``~/.rally/plugins`` directory.
Example: Benchmark scenario as a plugin
@ -77,12 +99,6 @@ Inherit a class for your plugin from the base *Scenario* class and implement a s
self._list_flavors_as_admin()
Placement
^^^^^^^^^
Put the python module with your plugin class into the **/opt/rally/plugins** or **~/.rally/plugins** directory or it's subdirectories and it will be autoloaded. You can also use a script **unpack_plugins_samples.sh** from **samples/plugins** which will automatically create the **~/.rally/plugins** directory.
Usage
^^^^^
@ -195,13 +211,6 @@ Inherit a class for your plugin from the base *Context* class. Then, implement t
LOG.warning(msg)
Placement
^^^^^^^^^
Put the python module with your plugin class into the **/opt/rally/plugins** or **~/.rally/plugins** directory or it's subdirectories and it will be autoloaded. You can also use a script **unpack_plugins_samples.sh** from **samples/plugins** which will automatically create the **~/.rally/plugins** directory.
Usage
^^^^^
@ -280,12 +289,6 @@ Inherit a class for your plugin from the base *SLA* class and implement its API
(self.status(), self._max - self._min, self.criterion_value))
Placement
^^^^^^^^^
Put the python module with your plugin class into the **/opt/rally/plugins** or **~/.rally/plugins** directory or it's subdirectories and it will be autoloaded. You can also use a script **unpack_plugins_samples.sh** from **samples/plugins** which will automatically create the **~/.rally/plugins** directory.
Usage
^^^^^
@ -375,14 +378,6 @@ Inherit a class for your plugin from the base *ScenarioRunner* class and impleme
# use self.send_result for result of each iteration
self._send_result(result)
Placement
^^^^^^^^^
Put the python module with your plugin class into the **/opt/rally/plugins** or **~/.rally/plugins** directory or it's subdirectories and it will be autoloaded. You can also use a script **unpack_plugins_samples.sh** from **samples/plugins** which will automatically create the **~/.rally/plugins** directory.
Usage
^^^^^