Meta

Maintainers

Project description

Mistral=======

Workflow Service for OpenStack cloud.

Installation~~~~~~~~~~~~

Prerequisites-------------

It is necessary to install some specific system libs for installing Mistral.They can be installed on most popular operating systems using their packagemanager (for Ubuntu - *apt*, for Fedora, CentOS - *yum*, for Mac OS - *brew*or *macports*).

[database] # Use the following line if *PostgreSQL* is used # connection = postgresql://<DB_USER>:<DB_PASSWORD>@localhost:5432/mistral connection = mysql://<DB_USER>:<DB_PASSWORD>@localhost:3306/mistral

#. If you are not using OpenStack, add the following entry to the ``/etc/mistral.conf`` file and **skip the following steps**::

#. Update the ``mistral/actions/openstack/mapping.json`` file which contains all available OpenStack actions, according to the specific client versions of OpenStack projects in your deployment. Please find more detailed information in the ``tools/get_action_list.py`` script.

Before the First Run~~~~~~~~~~~~~~~~~~~~

After local installation you will find the commands ``mistral-server`` and``mistral-db-manage`` available in your environment. The ``mistral-db-manage``command can be used for migrating database schema versions. If Mistral is notinstalled in system then this script can be found at``mistral/db/sqlalchemy/migration/cli.py``, it can be executed using Pythoncommand line.

To update the database schema to the latest revision, type::

$ mistral-db-manage --config-file <path_to_config> upgrade head

For more detailed information about ``mistral-db-manage`` script please checkfile ``mistral/db/sqlalchemy/migration/alembic_migrations/README.md``.

** NOTE: For users want a dry run with SQLite backend(not used in production),``mistral-db-manage`` is not recommended for database initialization due to`SQLite limitations <http://www.sqlite.org/omitted.html>`_. Please use``sync_db`` script described below instead for database initialization.

Before starting Mistral server, run ``sync_db`` script. It prepares the DB,creates in it with all standard actions and standard workflows which Mistralprovides for all mistral users.

Note that at least one Engine instance and one Executor instance should berunning in order for workflow tasks to be processed by Mistral.

If you want to run some tasks on specific executor, the *task affinity* featurecan be used to send these tasks directly to a specific executor. You can editthe following property in your mistral configuration file for this purpose::

[executor] host = my_favorite_executor

After changing this option, you will need to start (restart) the executor. Usethe ``target`` property of a task to specify the executor::

The value for the ``--server`` option can be a comma-delimited list. The validoptions are ``all`` (which is the default if not specified) or any combinationof ``api``, ``engine``, and ``executor``.

It's important to note that the ``fake`` transport for the ``rpc_backend``defined in the configuration file should only be used if ``all`` Mistralservers are launched on the same process. Otherwise, messages do not getdelivered because the ``fake`` transport is using an in-process queue.

Mistral Client~~~~~~~~~~~~~~

The Mistral command line tool is provided by the ``python-mistralclient``package which is available`here <https://git.openstack.org/openstack/python-mistralclient>`__.

Debugging~~~~~~~~~

To debug using a local engine and executor without dependencies such asRabbitMQ, make sure your ``etc/mistral.conf`` has the following settings::