server installation: introduce autotest-database-turnkey

A utility designed to perform a complete autotest database creation
and initialization at once.

Currently, to get an autotest server running one needs to either run
the "install-autotest-server.sh" script, or follow a long list of
steps. This tool will allow users of say, autotest-server distro
specific packages to just run a command and have it setup.

Changes from v1:
 * Use the global_config module AS-IS, reloading it completely.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
server installation: move firewalld_add_service to common location

"installation_support" directory is supposed to hold a collection
of tools useful during a server install, so move firewalld_add_service
there. Also, name it in such a way that it can be installed on the system
and obvious to a user that wants to setup an autotest server.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
server installation: matplotlib requires AFM fonts

matplotlib requires some AFM fonts, but there's no explicit dep.
IMHO, matplotlib should be more resilient to the failure, and
not throw a traceback at matplotlib.font_manager.

Anyway, this fixes the issue.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
database/migrate.py: clean up and minor adjustments

Signed-off-by: Cleber Rosa <crosa@redhat.com>
bit rot management: remove usage of functions deprecated on recent Django

setup_environ and execute_from_manager are deprecated starting on
Django 1.4, as described on release notes document:

   https://docs.djangoproject.com/en/dev/releases/1.4/

Also the recommended way to setup the django settings is via an
environment variable.

Changes from v1:
 * revert removal of enable_autocommit method

Signed-off-by: Cleber Rosa <crosa@redhat.com>
client/server: Do not install unnecessary files

Our autotest rpm packages carries out a nearly identical
patch. Turns out we don't ship tests anymore, and sample
files are not necessary on an installed system anyway.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.version: Update module

Make the version module more robust, in the sense that
you can call it from directories other than the autotest
root dir and still get it to correctly read RELEASE-VERSION.

Also, change the interface name get_git_version to get_version,
as it doesn't get version only from git (if running on
an sdist tarball, it'll only read RELEASE-VERSION).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup.py: Reorganize script flow

Instead of importing and executing setup directly,
split the actual execution to run() functions, then
call them from setup(). This is to prepare the script
to more changes required to generate a proper source
distribution from toplevel setup.py.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup.py: Fix generation of source distribution

Fix some issues with the setup.py script:

1) Distutils doesn't like abs paths when creating source
   distributions (setup.py sdist). So use only relative
   paths.

2) Put an appropriate maintainer name and email, as
   well as a proper URL

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
MANIFEST.in - Add more files

Add LICENSE and README.rst to the source dist manifest.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.version: When executing file, print only version

This will prove useful in Makefiles and other script
uses.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add a debian directory

So we can easily generate a debian package out of it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add a toplevel autotest Makefile

Add a Makefile, so we can comfortably generate debian
packages out of autotest.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib: Fixing location of redhat.cfg template file

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>