-
Notifications
You must be signed in to change notification settings - Fork 47
Installation Guide
Matej Marušák edited this page Mar 22, 2018
·
30 revisions
Preferred way to install and manage FAF instances is using ansible recipes available at https://github.com/abrt/abrt-ansible repository.
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.
-
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
).
-
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
# yum 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 && git checkout new && ./autogen.sh && ./configure && make rpm
$ make install
from git may work, but has not been tested either.
-
Configure FAF
Open/etc/faf/faf.conf
and edit options starting withDB
withinStorage
section to reflect your actual database connection details.
-
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 scriptfaf
followed by the name of action. Thefaf
script should always be executed with both user and groupfaf
.
The actioninit
is designed to fill the database tables by pre-defined constants and enable all installed plugins. Becomefaf
user and executefaf init
command. One of the ways to do this is to usesudo
command:
$ sudo -u faf faf init
-
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. Therepoadd
andrepoimport
actions are handling this.$ sudo -u faf faf repoadd f18 yum http://dl.fedoraproject.org/pub/fedora/linux/releases/18/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 therepoassign
action.$ sudo -u faf faf repoadd fedora_repo yum http://dl.fedoraproject.org/pub/fedora/linux/releases/\$releasever/Everything/\$basearch/os/
$ sudo -u faf faf repoassign fedora_repo Fedora x86_64 i686
-
Pull data from remote services
First you need to download operating system releases. There ispull-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 bypull-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 18 --opsys-release 19 --opsys-release rawhide
Next you need to download packages from previously defined repositories using thereposync
action. This may take quite a while depending on the size of repositories.
$ sudo -u faf faf reposync
-
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 callingsave-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
.
-
WebUI
If you have installed the webUI, Apache configs should be placed to the correct directory and you only need to (re)start Apache, which will start the webUI athttp://localhost/faf/
.
-
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 intofaf
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