Fatbuildrweb

Fatbuildrweb component is automatically installed with Fatbuildr, there is nothing more to install. However, it is not started by default. There are 2 supported ways to start the service:

  • In autonomous mode, where the application starts with its built-in HTTP server

  • As WSGI application integrated with an existing HTTP server

The autonomous mode is easy and straightforward to setup but it is not recommended for large setup with many users. The WSGI mode benefits from the better performances and scalability offered by advanced HTTP servers such as Apache2 and nginx.

Autonomous Service

Start fatbuildrweb service with this command as root (or sudo):

# systemctl start fatbuildrweb.service

The service is available at this URL: http://localhost:5000/

Please refer to the Administration Guide to configure an alternative listening interface and TCP port.

To automatically start the service on system start, enable the service with this command:

# systemctl enable fatbuildrweb.service

WSGI Application

Setting up a WSGI application depends on the HTTP server and the WSGI module. The following subsections provides installation instructions for some combinations of those.

If you need help to setup Fatbuildrweb as a WSGI application with a different combination of HTTP server and WSGI module, please open an issue. If you want to contribute documentation for an additional HTTP server or WSGI module, please open a pull request!

Apache2 and mod_wsgi

Install Apache2 HTTP service with WSGI module:

  • On Debian/Ubuntu:

    # apt install apache2 libapache2-mod-wsgi-py3
    # a2enmod wsgi  # The module must be enabled manually.
  • On RHEL:

    # dnf install httpd python3-mod_wsgi
    # systemctl enable httpd.service

Add the following lines in the most appropriate VirtualHost of your Apache2 configuration:

WSGIDaemonProcess fatbuildrweb-all user=fatbuildr group=fatbuildr locale=en_US.UTF-8
WSGIScriptAlias / /usr/share/fatbuildr/wsgi/fatbuildrweb.wsgi
WSGIPassAuthorization On

<Directory /usr/share/fatbuildr/wsgi>
  WSGIProcessGroup fatbuildrweb-all
  WSGIApplicationGroup %{GLOBAL}
  Require all granted
</Directory>

Finally, restart the service to enable modifications:

  • On Debian/Ubuntu:

    # systemctl restart apache2.service
  • On RHEL:

    # systemctl restart httpd.service

At this stage, Fatbuildrweb is available to the root path of your VirtualHost.

With the Apache2 configuration snippet provided, Fatbuildrweb application is started in multi-instances mode. Find out mono-instance mode configuration instructions to change this setting.

Nginx and uWSGI

Install Nginx HTTP server and uWSGI server with its Python plugin:

  • On Debian/Ubuntu:

    # apt install nginx uwsgi-core uwsgi-plugin-python3
  • On RHEL:

    # dnf install nginx uwsgi-core uwsgi-plugin-python3
    # systemctl enable nginx.service

Create a system service file /etc/systemd/system/fatbuildrweb-uwsgi.service with the following content:

[Unit]
Description=uWSGI instance for Fatbuildrweb
After=network.target

[Service]
User=fatbuildr
Group=fatbuildr
RuntimeDirectory=fatbuildrweb
ExecStart=/usr/bin/uwsgi --ini /usr/share/fatbuildr/wsgi/uwsgi/fatbuildrweb.ini

[Install]
WantedBy=multi-user.target
With this service file, Fatbuildrweb application is started in multi-instances mode. Find out mono-instance mode configuration instructions to change this setting.

Then load systemd service file changes:

# systemctl daemon-reload

Start the Fatbuildr uWSGI service:

# systemctl start fatbuildrweb-uwsgi.service

Optionally, enable the service to make it start automatically at server boot:

# systemctl enable fatbuildrweb-uwsgi.service

Edit your Nginx server serttings to add the following proxy settings snippet:

server {
    …

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/fatbuildrweb/uwsgi.sock;
    }
}

And restart Nginx to apply configuration changes:

# systemctl restart nginx.service

At this stage, Fatbuildrweb is available to the root path of your server.