Update Docker README

This patch updates the docker README file to include the --link arg
to the command for launching a Mistral container to ensure the
rabbitmq and mistral containers can communicate.

This patch also adds a new section that explains how and why to
mount the Mistral source code as a volume in a running container.

Change-Id: Iec25f7e7dfda0bc8c9b38fa37b048448d73f66e4
Co-Authored-By: Brad Crochet <brad@redhat.com>
This commit is contained in:
Ryan Brady 2017-05-17 12:02:22 -04:00
parent 1f9db4cd52
commit 67d9758162
1 changed files with 31 additions and 3 deletions

View File

@ -20,7 +20,6 @@ on this process, check out `the official guide at
<http://www.sqlite.org/omitted.html>`_.
Build the Mistral image
-----------------------
@ -36,7 +35,7 @@ Start a RabbitMQ container::
Start Mistral::
docker run -d -p 8989:8989 --name mistral mistral-all
docker run -d --link rabbitmq:rabbitmq -p 8989:8989 --name mistral mistral-all
To execute commands inside the container::
@ -47,11 +46,40 @@ E.g. to list workflows, issue::
mistral workflow-list
Running Mistral From A Volume
-----------------------------
A scenario you may find useful for development is to clone a Mistral git repo
and link it into the container via a volume. This will allow you to make changes
to the Mistral source on your local machine and execute them immediately in the
container.
The following example illustrates launching the container from the local
directory of a git repo clone of Mistral.::
docker run -d --link rabbitmq:rabbitmq -v $(pwd):/opt/stack/mistral:Z -p 8989:8989 --name mistral mistral-all
You might want to mount an additional drive to move files easily between your
development computer and the container. An easy way to do this is to mount an
additional volume that maps to /home/mistral/ in the container.
Since the directory is already being used to store the mistral.conf and
mistral.sqlite files, you will want to copy these to the local directory you
intend to use for the mount. This example assumes the directory to mount is
"/tmp/mistral". You should change this to the actual directory you intend to
use.::
docker cp mistral:/home/mistral/mistral.conf /tmp/mistral/mistral.conf
docker cp mistral:/home/mistral/mistral.sqlite /tmp/mistral/mistral.sqlite
docker run -d --link rabbitmq:rabbitmq -v $(pwd):/opt/stack/mistral:Z -v /tmp/mistral:/home/mistral:Z -p 8989:8989 --name mistral mistral-all
Running Mistral with MySQL
--------------------------
Other than the simplest use cases will very probably fail with various errors
due to the default Sqlight database. It is highly recommended that, for
due to the default Sqlite database. It is highly recommended that, for
example, MySQL is used as database backend.
The `start_mistral_rabbit_mysql.sh` script sets up a rabbitmq container, a