From 1b1353ecc8add2927a76d98c2dbd2caa7eb8641d Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Mon, 8 Dec 2014 17:13:35 +0300 Subject: [PATCH] Add docs on task-affinity and configuring MySQL Partially implements blueprint mistral-install-docs Change-Id: I1859742cabaa404e25354c036e555109e045c8da --- README.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.rst b/README.rst index 02ce8696..bff3451f 100644 --- a/README.rst +++ b/README.rst @@ -84,6 +84,33 @@ Mistral configuration is needed for getting it work correctly either with real O 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 -------------------- @@ -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. +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 ------------------------------------------------------- To run more than one server (API, Engine, or Task Executor) on the same process, perform the following command in a shell: