Merge "Add docs on task-affinity and configuring MySQL"

This commit is contained in:
Jenkins 2014-12-10 09:29:03 +00:00 committed by Gerrit Code Review
commit df228e3d67

View File

@ -84,6 +84,33 @@ Mistral configuration is needed for getting it work correctly either with real O
auth_enable = False auth_enable = False
5. Also, configure rabbit properties: *rabbit_userid*, *rabbit_password*, *rabbit_host* in section *default*.
6. Configure database. **SQLite can't be used in production.** Use *MySQL* or *PostreSQL* instead. Here are the steps how to connect *MySQL* DB to Mistral:
* Make sure you have installed **mysql-server** package on your Mistral machine.
* Install *MySQL driver* for python:
pip install mysql-python
or, if you work in virtualenv, run
tox -evenv -- pip install mysql-python
* Create the database and grant privileges:
mysql -u root -p
CREATE DATABASE mistral;
USE mistral
GRANT ALL ON mistral.* TO 'root'@'localhost';
* Configure connection in Mistral config:
[database]
connection = mysql://root:@localhost:3306/mistral
Before the first run Before the first run
-------------------- --------------------
@ -122,6 +149,20 @@ To run Mistral Task Executor instance perform the following command in a shell:
Note that at least one Engine instance and one Executor instance should be running so that workflow tasks are processed by Mistral. Note that at least one Engine instance and one Executor instance should be running so that workflow tasks are processed by Mistral.
If it is needed to run some tasks on specific executor then *task affinity* feature can be used to send these tasks directly to this executor. In configuration file edit section "executor" *host* property:
[executor]
host = my_favorite_executor
Then start (restart) executor. Use *targets* task property to specify this executor:
... Workflow YAML ...
task1:
...
targets: ["my_favorite_executor"]
... Workflow YAML ...
Running Multiple Mistral Servers Under the Same Process 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: To run more than one server (API, Engine, or Task Executor) on the same process, perform the following command in a shell: