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