RETIRED, further work has moved to Debian project infrastructure
Go to file
Kirill Izotov 5566129d64 Make executor able to work in isolated environment
The idea is to simplify executor as much as possible (first of all,
remove all db calls). As of now, all the work related to creating,
resolving and updating tasks, converting action params and results and
so on should be done by engine. Executer here is barely an action
runner that receives an action name, params and some kind of session
identifier (task id in our case) and reports back the status and
results along with the session identifier to reference the task it
have done.

In order to keep the model simple, we had to make several assumptions:
 - Any task that was queued for execution is expected to be executed
 and eventually report back by putting its results into
 `convey_task_result` queue.
 - All executors are the same. Each of them should be able to execute
 the action and return the same result.
 - All executor should be also able to access any external resource
 without any additional params evaluation on an executor side

Conflicts:
	mistral/engine/drivers/default/executor.py

Change-Id: I4f1f8fb08cd977ba90f69462108e15f9cfb26250
2014-07-10 19:04:24 +07:00
contrib/devstack Make the service_type more consistent 2014-06-17 18:04:35 +10:00
doc/source Make plugins easier to use 2014-07-03 18:24:57 -10:00
etc Make plugins easier to use 2014-07-03 18:24:57 -10:00
functionaltests Merge "Make the service_type more consistent" 2014-07-03 05:46:06 +00:00
mistral Make executor able to work in isolated environment 2014-07-10 19:04:24 +07:00
tools Clean up configuration settings 2014-06-09 16:50:11 -07:00
.coveragerc Move tests to testr 2014-06-04 14:58:29 +04:00
.gitignore Move tests to testr 2014-06-04 14:58:29 +04:00
.gitreview Add .gitreview, setup.py and other infrastructure. 2013-11-01 02:57:27 +07:00
.pylintrc Add .gitreview, setup.py and other infrastructure. 2013-11-01 02:57:27 +07:00
.testr.conf Add OS_LOG_CAPTURE to testr.conf 2014-06-12 07:00:17 +10:00
AUTHORS Fixing Mistral HTTP action to take care of empty headers 2014-07-01 11:40:11 +07:00
LICENSE Adding license and authors file 2013-12-30 13:11:49 +07:00
openstack-common.conf Add lockutils to openstack/common 2014-06-02 17:28:16 +04:00
README.rst Merge "Fixing obsolete file name in README.rst" 2014-06-18 02:22:51 +00:00
requirements.txt Update requirements due to global-requirements 2014-07-03 13:57:22 +04:00
run_tests.sh Move tests to testr 2014-06-04 14:58:29 +04:00
setup.cfg Make plugins easier to use 2014-07-03 18:24:57 -10:00
setup.py Fixed issue with tarballs 2014-04-30 18:12:55 +04:00
test-requirements.txt Update requirements due to global-requirements 2014-07-03 13:57:22 +04:00
tox.ini Remove redundant DB API arguments 2014-06-20 12:54:39 +07:00

Mistral

Task Orchestration and Scheduling service for OpenStack cloud

Installation

First of all, in a shell run:

tox

This will install necessary virtual environments and run all the project tests. Installing virtual environments may take significant time (~10-15 mins).

Running Mistral API server

To run Mistral API server perform the following command in a shell:

tox -evenv -- python mistral/cmd/launch.py --server api --config-file path_to_config*

Note that an example configuration file can be found in etc/mistral.conf.sample.

Running Mistral Engines

To run Mistral Engine perform the following command in a shell:

tox -evenv -- python mistral/cmd/launch.py --server engine --config-file path_to_config*

Running Mistral Task Executors

To run Mistral Task Executor instance perform the following command in a shell:

tox -evenv -- python mistral/cmd/launch.py --server executor --config-file path_to_config

Note that at least one Engine instance and one Executor instance should be running so that workflow tasks are processed by Mistral.

Running Multiple Mistral Servers Under the Same Process

To run more than one server (API, Engine, or Task Executor) on the same process, perform the following command in a shell:

tox -evenv -- python mistral/cmd/launch.py --server api,engine --config-file path_to_config

The --server command line option can be a comma delimited list. The valid options are "all" (by default if not specified) or any combination of "api", "engine", and "executor". It's important to note that the "fake" transport for the rpc_backend defined in the config file should only be used if "all" the Mistral servers are launched on the same process. Otherwise, messages do not get delivered if the Mistral servers are launched on different processes because the "fake" transport is using an in process queue.

Debugging

To debug using a local engine and executor without dependencies such as RabbitMQ, create etc/mistral.conf with the following settings:

[DEFAULT]
rpc_backend = fake

[pecan]
auth_enable = False

and run in pdb, PyDev or PyCharm:

mistral/cmd/launch.py --server all --config-file etc/mistral.conf --use-debugger

Running examples

To run the examples find them in mistral-extra repository (https://github.com/stackforge/mistral-extra) and follow the instructions on each example.

Tests

Information about automated tests for Mistral can be found here: https://wiki.openstack.org/wiki/Mistral/Testing