Skip to content
Ernestas Kulik edited this page Apr 1, 2020 · 30 revisions

Using ansible

Preferred way to install and manage FAF instances is using ansible recipes available at https://github.com/abrt/abrt-ansible repository.

Manual installation

This guide will walk you through the installation of FAF assuming you need no special tweaks and you do not need to change default paths. The guide will focus on Fedora operating system as it is the only one supported at the moment. Every command will also be prepended with sudo -u faf so that it is clear that they should be executed with both user and group faf. It may work with other credentials as well, but executing as faf will prevent future permisson problems.

  1. Set up a database FAF requires a working relational database such as PostgreSQL. If not already done, set up a database for FAF and install the appropriate python connector package (e.g. python-psycopg2).

  2. Install FAF The preferred way of installing FAF is from packages. At the moment only RPM is supported. There are pre-built packages available for Fedora 21 and EPEL 7 (Contains a few custom packages that override the ones in EPEL 7). These were tested on the appropriate systems. Note: At the moment you probably want to install all FAF parts, so use

# dnf install "faf-*"

Other systems may also work, but have not been tested. These can build the packages directly from the git repository:

$ git clone git://github.com/abrt/faf 
$ cd faf
$ tito build --rpm --test
  1. Configure FAF Open /etc/faf/faf.conf and edit options starting with DB within Storage section to reflect your actual database connection details.

  2. Initialize FAF First create the database schema:

$ sudo -u faf faf-migrate-db --create-all
$ sudo -u faf faf-migrate-db --stamp-only

The majority of FAF is controlled by the script faf followed by the name of action. The faf script should always be executed with both user and group faf. The action init is designed to fill the database tables by pre-defined constants and enable all installed plugins. Become faf user and execute faf init command. One of the ways to do this is to use sudo command:

$ sudo -u faf faf init
  1. Add repository definitions In order to process reports, FAF needs to have the packages downloaded in its storage. FAF gets these packages from standard package repositories. You need to define the repositories that FAF should use. The repoadd and repoimport actions are handling this.
$ sudo -u faf faf repoadd f31 dnf http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_64/os/

You can use $releasever and $basearch variables in the repository definition. To make these expand correctly, you also need to assign your repository with an operating system and architecture with the repoassign action.

$ sudo -u faf faf repoadd fedora_repo dnf http://dl.fedoraproject.org/pub/fedora/linux/releases/\$releasever/Everything/\$basearch/os/
$ sudo -u faf faf repoassign fedora_repo "Fedora 31" x86_64 i686
  1. Pull data from remote services First you need to download operating system releases. There is pull-releases action which serves this purpose:
$ sudo -u faf faf pull-releases -o fedora

Then you need to download components for the releases. This is handled by pull-components action. You can specify the operating system with -o and the release with --opsys-release. If none of these are included, the script will iterate through all available operating systems and releases and download the components for each of them.

$ sudo -u faf faf pull-components -o fedora --opsys-release 31 --opsys-release 32 --opsys-release rawhide

Next you need to download packages from previously defined repositories using the reposync action. This may take quite a while depending on the size of repositories.

$ sudo -u faf faf reposync
  1. Ready to save reports Now the system is ready for saving reports. Incoming uReport files placed at /var/spool/faf/reports/incoming can be saved by calling save-reports action.
$ sudo -u faf faf save-reports

This iterates through all the incoming reports. If the report is valid it is saved into storage and the file is moved to /var/spool/faf/reports/saved. Otherwise the file is moved to /var/spool/faf/reports/deferred.

  1. WebUI If you have installed the web UI, Apache configs should be placed to the correct directory and you only need to (re)start Apache, which will start the webUI at http://localhost/faf/.

  2. Set up cron jobs As the system is quite dynamic, the synchronization with external services should be executed regularly. Server administrators are expected to put these command into faf user's crontab, which can result into something like

*/5 * * * * faf save-reports >> /var/log/faf/save-reports.log 2>&1

55 0 * * * faf pull-releases -o fedora >> /var/log/faf/pull-releases.log 2>&1
55 2 * * * faf pull-components -o fedora >> /var/log/faf/pull-components.log 2>&1

5 3 * * * faf reposync >> /var/log/faf/reposync.log 2>&1
Clone this wiki locally