| 1 |
=========================== |
| 2 |
Installing Aetos with uwsgi |
| 3 |
=========================== |
| 4 |
|
| 5 |
The module ``aetos.wsgi.api`` provides the function to set up the WSGI |
| 6 |
application. The module is installed with the rest of the Aetos application |
| 7 |
code, and should not need to be modified. |
| 8 |
|
| 9 |
Install uwsgi. |
| 10 |
|
| 11 |
On RHEL/CentOS/Fedora:: |
| 12 |
|
| 13 |
sudo dnf install uwsgi-plugin-python3 |
| 14 |
|
| 15 |
On Ubuntu/Debian:: |
| 16 |
|
| 17 |
sudo apt-get install uwsgi-plugin-python3 |
| 18 |
|
| 19 |
Create aetos-uwsgi.ini file:: |
| 20 |
|
| 21 |
[uwsgi] |
| 22 |
chmod-socket = 666 |
| 23 |
socket = /var/run/uwsgi/aetos.socket |
| 24 |
start-time = %t |
| 25 |
lazy-apps = true |
| 26 |
add-header = Connection: close |
| 27 |
buffer-size = 65535 |
| 28 |
hook-master-start = unix_signal:15 gracefully_kill_them_all |
| 29 |
thunder-lock = true |
| 30 |
plugins = http,python3 |
| 31 |
enable-threads = true |
| 32 |
worker-reload-mercy = 80 |
| 33 |
exit-on-reload = false |
| 34 |
die-on-term = true |
| 35 |
master = true |
| 36 |
processes = 2 |
| 37 |
module = aetos.wsgi.api:application |
| 38 |
|
| 39 |
Then start the uwsgi server:: |
| 40 |
|
| 41 |
uwsgi ./aetos-uwsgi.ini |
| 42 |
|
| 43 |
Or start in background with:: |
| 44 |
|
| 45 |
uwsgi -d ./aetos-uwsgi.ini |