mistral/doc/source/admin/install/install-ubuntu.rst
Renat Akhmerov 9fb213c315 The first iteration of restructuring Mistral doc
* Grouped documentation articles into several main parts: user docs,
  admin docs, developer docs.
* Changed the index page so that it contains links to the index pages
  of the main documentation parts like user docs, admin docs etc.
* Fixed all the broken links
* Removed index generation since it's not informative at all in its
  current form and it exposes code internals (REST controller class
  names)
* Removed obsolete properties that are no longer used by the
  "openstackdocstheme" project
* Removed obsolete static html files
* Moved part of the images to the folders where they are used

Further work:

* Refactor main chapters (user, admin, developer) one by one and
  make them look consistent. For example, there are several pages
  that provide similar kind of information: overview, quick start,
  main features etc. It is a mess that's been accumulated throughout
  the last 4-5 years.
* Fill the gaps. Add all missing pages like: event notifications,
  workflow environment, etc.
* Move cookbooks from Wiki to this doc.

Partially implements: blueprint mistral-restructure-docs
Change-Id: Ia722a6885ad2fb97d63a34285b0a5b1a23da79e8
2020-01-22 14:06:51 +07:00

5.7 KiB
Raw Blame History

Install and Configure for Ubuntu

This section describes how to install and configure the Workflow Service service for Ubuntu.

Prerequisites

  1. Install the packages:

    # apt-get update
    
    # apt-get install python-setuptools python-pip libffi-dev libxslt1-dev \
      libxml2-dev libyaml-dev libssl-dev python3-dev tox mistral-common

Installation

NOTE: For instructions on how to install Mistral using devstack, refer to Mistral Devstack Installation </developer/contributor/devstack>

Clone the repo and go to the repo directory:

$ git clone https://opendev.org/openstack/mistral
$ cd mistral

Generate the configuration file:

$ tox -egenconfig

Create the mistral directory and copy the example configuration file:

$ mkdir /etc/mistral
$ cp etc/mistral.conf.sample /etc/mistral/mistral.conf

Edit the configuration file:

$ vi /etc/mistral/mistral.conf

Virtualenv installation:

$ tox

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

Local installation:

$ pip install -e .

or:

$ pip install -r requirements.txt
$ python setup.py install

NOTE: There are some differences between pip install -e and setup.py install. pip install -e works similarly to setup.py install or the EasyInstall tool, however, it does not actually install anything. Instead, it creates a special .egg-link file in the deployment directory that links to your projects source code.

Configuring Mistral

Refer ../configuration/index to find general information on how to configure Mistral server.

Before The First Run

After the installation, you will see the mistral-server and mistral-db-manage commands in your environment, either in system or virtual environment.

NOTE: If you use virtualenv, all Mistral-related commands can be accessed with tox -evenv --. For example, mistral-server is available via tox -evenv -- mistral-server.

The mistral-db-manage command can be used for migrations.

Updating the database to the latest revision type:

$ mistral-db-manage --config-file <path-to-mistral.conf> upgrade head

Before starting the Mistral server, run the mistral-db-manage populate command. It creates the DB with all the standard actions and standard workflows that Mistral provides to all Mistral users.:

$ mistral-db-manage --config-file <path-to-mistral.conf> populate

For more detailed information on the mistral-db-manage script, see the Mistral Upgrade Guide </admin/upgrade_guide>.

NOTE: For users who want a dry run with an SQLite database backend (not used in production), the mistral-db-manage script is not recommended for database initialization because of SQLite limitations. Use the sync_db script described below for database initialization instead.

If you use virtualenv:

$ tools/sync_db.sh --config-file <path-to-mistral.conf>

Or run sync_db directly:

$ python tools/sync_db.py --config-file <path-to-mistral.conf>

Running Mistral API server

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

$ mistral-server --server api --config-file <path-to-mistral.conf>

Running Mistral Engines

To run the Mistral Engine, execute the following command in a shell:

$ mistral-server --server engine --config-file <path-to-mistral.conf>

Running Mistral Executors

To run the Mistral Executor instance, execute the following command in a shell:

$ mistral-server --server executor --config-file <path-to-mistral.conf>

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

Mistral Notifier

To run the Mistral Notifier, execute the following command in a shell:

$ mistral-server --server notifier --config-file <path-to-mistral.conf>

Running Multiple Mistral Servers Under the Same Process

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

$ mistral-server --server api,engine --config-file <path-to-mistral.conf>

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 is 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.

Mistral Client Installation

Refer /admin/install/mistralclient_guide to find out how to install Mistral Client.

Finalize installation

Restart the Workflow services:

# service openstack-mistral-api restart