2.2 KiB
Development
Vagrant environment
The Vagrant environment and the Ansible playbook is used only for local tests and development of the application.
The installation of Vagrant is described at https://docs.vagrantup.com/v2/installation/index.html.
The Vagrant plugin vagrant-hostmanager is required.
$ vagrant plugin install vagrant-hostmanager
To speedup the provisioning you can install the Vagrant plugin vagrant-cachier.
$ vagrant plugin install vagrant-cachier
Bootstrap the Vagrant environment.
$ vagrant up
The RabbitMQ server and the MySQL server are running on the machine
service.
There is a machine for each service of the tutorial application:
api
-vagrant ssh api
-sh run_api.sh
producer
-vagrant ssh producer
-sh run_producer.sh
tracker
-vagrant ssh tracker
-sh run_tracker.sh
worker
-vagrant ssh worker
-sh run_worker.sh
RabbitMQ server
The webinterface of the RabbitMQ server is reachable on TCP port
15672
. The login is possible with the user
guest
and the password secretsecret
.
MySQL server
The password of the user root
is
secretsecret
. The password of the user
tutorial
for the database tutorial
is also
secretsecret
.
Virtual environment
Create a new virtual environment, install all required dependencies and the application itself.
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ python setup.py install
Now open a new screen or tmux session. Aftwards run the api, worker, producer, and tracker services in the foreground, each service in a separate window.
$ source .venv/bin/activate; faafo-api
$ source .venv/bin/activate; faafo-worker
$ source .venv/bin/activate; faafo-tracker
$ source .venv/bin/activate; faafo-producer