comparison README.txt @ 1:63b00c10ada8

Add Configuration support, warning when in DEBUG mode, and Deployment instruction
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 24 Sep 2014 15:04:19 +0200
parents 4a9f23230eba
children
comparison
equal deleted inserted replaced
0:4a9f23230eba 1:63b00c10ada8
11 11
12 Introduction 12 Introduction
13 ------------ 13 ------------
14 14
15 Farol is a web platform dedicated to the management of Security Advisories. 15 Farol is a web platform dedicated to the management of Security Advisories.
16
17 Dependencies
18 ------------
19
20 Farol has a dependency on FarolLuz, Flask, and (obviously) Python.
21
22 Python can be either 2 or 3. 2.7 has been tested, as well as 3.3. 3.2 will not
23 work due to Flask (and dependencies) not being compatible with it.
24
25 Configuration
26 -------------
27
28 Configuration of Farol is done through a ``farol.cfg`` file that has to be set in the application *instance path*.
29
30 Deployment
31 ----------
32
33 .. note:: While there are dozen of ways to deploy a WSGI application, this
34 section documents a simple yet working and scalable way of doing it.
35
36 0. Get ``farol`` and ``farolluz`` source code.
37
38 1. Start with a virtualenv::
39
40 virtualenv farol_env
41
42 2. Install FarolLuz and Farol in the virtualenv::
43
44 farol_env/bin/pip install ./farolluz
45 farol_env/bin/pip install ./farol
46
47 3. Install gunicorn in the virtualenv::
48
49 farol_env/bin/pip install gunicorn
50
51 3b. (Optional) Test that farol can run in the virtualenv::
52
53 farol_env/bin/gunicorn farol.main:app
54
55 Visit the page http://localhost:8000 in a Web browser.
56
57 4. Configure Farol: set ``DEBUG`` to ``False``, and set the SECRET_KEY to
58 something stable (and secret), so that it remains between reboot. The path
59 to the configuration file can be found on the About page in the Debug
60 Section.
61
62 4. Setup ``supervisord`` (that has previously been installed) to monitor the
63 gunicorn process.
64
65 5. Setup ``nginx`` (that has previously also been installed) to proxy the
66 gunicorn socket.
67
68 It is most probable that supervisord and nginx will also be used for other
69 services in your server.
70
71 Upgrade
72 -------
73
74 When new version are available, the following can be done:
75
76 Upgrade FarolLuz and Farol installation in the virtualenv::
77
78 farol_env/bin/pip install --upgrade ./farolluz ./farol
79
80 Restart the gunicorn process::
81
82 supervisorctl farol restart
83

http://farol.wald.intevation.org