Skip to content
Michal Toman edited this page Jun 26, 2013 · 30 revisions

Installation Guide (draft)

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. Switch SELinux to permissive mode
    At the moment there is no way for FAF to work properly with SELinux in enforcing mode.

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

  3. 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 18, Fedora 19 and EPEL 6: http://somerepo/. These were tested on the appropriate systems.

    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.

  4. Configure FAF
    Open /etc/faf/faf.conf and edit ConnectString option within Storage section to reflect your actual database connection details. The connect string follows RFC1738 format: driver://user:password@host:port/database.

  5. Initialize FAF
    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 create all required tables, fill them 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

  6. Add repository definitions
    In order to process reports, FAF needs to have access to the packages reports are filed against. 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 f18 yum http://dl.fedoraproject.org/pub/fedora/linux/releases/18/Everything/x86_64/os/

    You can use $release 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 yum http://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ $ sudo -u faf faf repoassign fedora_repo fedora x86_64 i686

  7. 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 18 --opsys-release 19 --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

  8. 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.

  9. 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 at http://localhost/faf/.

  10. 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