Merge "Document --plugin-paths/RALLY_PLUGIN_PATHS"
This commit is contained in:
commit
7bb2904dec
@ -30,12 +30,34 @@ full list with detailed descriptions of all official Rally plugins.
|
|||||||
How plugins work
|
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
|
.. image:: ./images/Rally-Plugins.png
|
||||||
:align: center
|
: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
|
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()
|
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
|
Usage
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
@ -195,13 +211,6 @@ Inherit a class for your plugin from the base *Context* class. Then, implement t
|
|||||||
LOG.warning(msg)
|
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
|
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))
|
(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
|
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
|
# use self.send_result for result of each iteration
|
||||||
self._send_result(result)
|
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
|
Usage
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user