Update license to LGPL2.1+ in spec and setup.py

Signed-off-by: Tim Serong <tserong@suse.com>
conf/salt.master.conf: Add SUSE apache user

Signed-off-by: Tim Serong <tserong@suse.com>
calamari/manage.py: Set a+x file permissions

Want this to have the executable bit set so it can be run directly from
the shell if necessary, rather than prefixing with python.

Signed-off-by: Tim Serong <tserong@suse.com>
Makefile: Add build-unpacked target

This installs calamari-common, rest-api, calamari-web and cthulhu to the
global python site dir, instead of having them installed in the venv.

Signed-off-by: Tim Serong <tserong@suse.com>
Makefile: Add install-suse targets

This also adds SUSE versions of the apache and calamari config files.

Signed-off-by: Tim Serong <tserong@suse.com>
carbon.conf: Set PID_DIR=/var/run

Without this, when carbon cache is run from /usr/bin/carbon, it thinks
GRAPHITE_ROOT is /usr, and tries to create pidfiles by default under
/usr/storage

Signed-off-by: Tim Serong <tserong@suse.com>
postgres.sql: Add SUSE support

Salt uses `systemctl --all list-units` to check if services exist.
systemd will only list services that have been loaded.  For LSB init
scripts (of which postgresql is one), it seems systemd won't load these
unless they've been invoked at least once somehow.  So this commit
ensures that the postgresql init script is actually invoked
(`rcpostgresql status`) prior to any other fiddling with postgresql.
This is a horrible hack.

Signed-off-by: Tim Serong <tserong@suse.com>
Add systemd service files for carbon and cthulhu

For SUSE, provide systemd service files for carbon and cthulhu.  This
means there's no need for supervisord, and systemd can take care of
starting everything nicely in the correct order.

Signed-off-by: Tim Serong <tserong@suse.com>
calamari_ctl.py: Use `systemctl restart cthulhu` on SUSE

Signed-off-by: Tim Serong <tserong@suse.com>
calamari_ctl.py: move get_user_model import to initialize function

Having 'from django.contrib.auth import get_user_model' at the top of
the file causes an exception with Django 1.6 on openSUSE, due to
DJANGO_SETTINGS_MODULE not being set yet.  Moving the import to the
initialize function fixes this (although it violates PEP-8).

Signed-off-by: Tim Serong <tserong@suse.com>
calamari_rest: OSDList: Skip OSDs with no hostname

With a somewhat broken ceph cluster, with 2 OSDs, but only 1 up and in,
somehow I ended up with service_to_server having:

[[['b021bf32-9218-40ba-928c-ac98862ed738', 'osd', '0'], None],
 [['b021bf32-9218-40ba-928c-ac98862ed738', 'osd', '1'], 'ceph-0']]

This commit prevents a KeyError: None fault in this case.

Signed-off-by: Tim Serong <tserong@suse.com>