mistral/doc/source/architecture.rst
junboli a2c1db4b14 Add doc8 rule and check doc/source files
doc8 is a linter for documents and used in openstack-manuals. It is better to enforce
document linters for simple checking. This change is to add doc8 in tox file and fix
line too long in some files.

The current rules are as bellow:
- invalid rst format - D000
- lines should not be longer than 79 characters - D001
- no trailing whitespace - D002
- no tabulation for indentation - D003
- no carriage returns (use unix newlines) - D004
- no newline at end of file - D005

Change-Id: Ibba3f0e1c3f724563deb27bbf4f13a8040799687
Closes-bug: #1709571
2017-08-09 16:50:33 +08:00

1.7 KiB

Mistral Architecture

Mistral is OpenStack workflow service. The main aim of the project is to provide capability to define, execute and manage tasks and workflows without writing code.

Basic concepts

A few basic concepts that one has to understand before going through the Mistral architecture are given below:

  • Workflow - consists of tasks (at least one) describing what exact steps should be made during workflow execution.
  • Task - an activity executed within the workflow definition.
  • Action - work done when an exact task is triggered.

Mistral components

Mistral is composed of the following major components:

  • API Server
  • Engine
  • Task Executors
  • Scheduler
  • Persistence

The following diagram illustrates the architecture of mistral:

image

API server

The API server exposes REST API to operate and monitor the workflow executions.

Engine

The Engine picks up the workflows from the workflow queue. It handles the control and dataflow of workflow executions. It also computes which tasks are ready and places them in a task queue. It passes the data from task to task, deals with condition transitions, etc.

Task Executors

The Task Executor executes task Actions. It picks up the tasks from the queue, run actions, and sends results back to the engine.

Scheduler

The scheduler stores and executes delayed calls. It is the important Mistral component since it interacts with engine and executors. It also triggers workflows on events (e.g., periodic cron event)

Persistence

The persistence stores workflow definitions, current execution states, and past execution results.