You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

  1. Development
  2. ===========
  3. Vagrant environment
  4. -------------------
  5. The `Vagrant <https://www.vagrantup.com/>`_ environment and the `Ansible <http://www.ansible.com/home>`_
  6. playbook is used only for local tests and development of the application.
  7. The installation of Vagrant is described at https://docs.vagrantup.com/v2/installation/index.html.
  8. To speedup the provisioning you can install the Vagrant plugin `vagrant-cachier <https://github.com/fgrehm/vagrant-cachier>`_.
  9. .. code::
  10. $ vagrant plugin install vagrant-cachier
  11. Bootstrap the Vagrant environment.
  12. .. code::
  13. $ vagrant up
  14. Now it is possible to login with SSH.
  15. .. code::
  16. $ vagrant ssh
  17. Open a new screen or tmux session. Aftwards run the api, worker, and producer
  18. services in the foreground, each service in a separate window.
  19. * :code:`faafo-api`
  20. * :code:`faafo-worker`
  21. * :code:`faafo-producer`
  22. RabbitMQ server
  23. ~~~~~~~~~~~~~~~
  24. The webinterface of the RabbitMQ server is reachable on TCP port :code:`15672`. The login is
  25. possible with the user :code:`guest` and the password :code:`guest`.
  26. MySQL server
  27. ~~~~~~~~~~~~
  28. The password of the user :code:`root` is :code:`secretsecret`. The password of the user :code:`faafo`
  29. for the database :code:`faafo` is also :code:`secretsecret`.
  30. Virtual environment
  31. -------------------
  32. Create a new virtual environment, install all required dependencies and
  33. the application itself.
  34. .. code::
  35. $ virtualenv .venv
  36. $ source .venv/bin/activate
  37. $ pip install -r requirements.txt
  38. $ python setup.py install
  39. Open a new screen or tmux session. Aftwards run the api and worker
  40. services in the foreground, each service in a separate window.
  41. .. code::
  42. $ source .venv/bin/activate; faafo-api
  43. $ source .venv/bin/activate; faafo-worker