More work on monitless installer

This commit is contained in:
Duncan Sommerville 2014-12-16 21:27:37 -05:00
parent 51a95fb989
commit eefe8910cf
9 changed files with 121 additions and 12 deletions

View File

@ -0,0 +1,64 @@
php-pear
php5-gd
odbc-postgresql
python
python-virtualenv
libsoundtouch-ocaml
libtaglib-ocaml
libao-ocaml
libmad-ocaml
ecasound
libesd0
libportaudio2
libsamplerate0
patch
php5-curl
mpg123
monit
libcamomile-ocaml-data
libpulse0
vorbis-tools
lsb-release
lsof
mp3gain
vorbisgain
flac
vorbis-tools
pwgen
libfaad2
php-apc
libmp3lame-dev
lame
libzend-framework-php
coreutils
php5-json
liquidsoap-plugin-alsa
liquidsoap-plugin-ao
liquidsoap-plugin-faad
liquidsoap-plugin-flac
liquidsoap-plugin-icecast
liquidsoap-plugin-lame
liquidsoap-plugin-mad
liquidsoap-plugin-ogg
liquidsoap-plugin-opus
liquidsoap-plugin-portaudio
liquidsoap-plugin-pulseaudio
liquidsoap-plugin-taglib
liquidsoap-plugin-voaacenc
liquidsoap-plugin-vorbis
sourcefabric-keyring
liquidsoap
silan
libopus0

View File

@ -0,0 +1,46 @@
php-pear
php5-gd
odbc-postgresql
python
python-virtualenv
libsoundtouch-ocaml
libtaglib-ocaml
libao-ocaml
libmad-ocaml
ecasound
libesd0
libportaudio2
libsamplerate0
patch
php5-curl
mpg123
monit
libcamomile-ocaml-data
libpulse0
vorbis-tools
lsb-release
lsof
mp3gain
vorbisgain
flac
vorbis-tools
pwgen
libfaad2
php-apc
libmp3lame-dev
lame
libzend-framework-php
coreutils
liquidsoap
silan
libopus0

View File

@ -525,7 +525,7 @@ if [ "$install_dependencies" = "t" ]; then
verbose "\n * Reading requirements-${dist,,}-${code,,}.apt..."
loudCmd "apt-get -y --force-yes install $(grep -vE '^\s*#' bin/requirements-${dist,,}-${code,,}.apt | tr '\n' ' ')"
loudCmd "apt-get -y -m --force-yes install $(grep -vE '^\s*#' bin/requirements-${dist,,}-${code,,}.apt | tr '\n' ' ')"
fi
verbose "\n * Restarting apache..."

View File

@ -213,7 +213,6 @@ class AirtimeApiClient(object):
try:
self.config = ConfigObj(config_path)
self.config.update(api_config)
self.logger.info(json.dumps(self.config))
self.services = RequestProvider(self.config)
except Exception, e:
self.logger.error('Error loading config file: %s', config_path)

View File

@ -38,9 +38,9 @@ class AirtimeNotifier(Loggable):
durable=True, auto_delete=True)
schedule_queue = Queue("media-monitor", exchange=schedule_exchange,
key="filesystem")
self.connection = BrokerConnection(self.cfg["rabbitmq"]["rabbitmq_host"],
self.cfg["rabbitmq"]["rabbitmq_user"], self.cfg["rabbitmq"]["rabbitmq_password"],
self.cfg["rabbitmq"]["rabbitmq_vhost"])
self.connection = BrokerConnection(self.cfg["rabbitmq"]["host"],
self.cfg["rabbitmq"]["user"], self.cfg["rabbitmq"]["password"],
self.cfg["rabbitmq"]["vhost"])
channel = self.connection.channel()
self.simple_queue = SimpleQueue(channel, schedule_queue)

View File

@ -28,5 +28,5 @@ class MMConfig(object):
def last_ran(self):
""" Returns the last time media monitor was ran by looking at
the time when the file at 'index_path' was modified """
return mmp.last_modified(self.cfg['index_path'])
return mmp.last_modified(self.cfg['media-monitor']['index_path'])

View File

@ -41,7 +41,7 @@ class AirtimeInstance(object):
def touch_file_path(self):
""" Get the path of the touch file for every instance """
touch_base_path = self.mm_config['index_path']
touch_base_path = self.mm_config['media-monitor']['index_path']
touch_base_name = basename(touch_base_path)
new_base_name = self.name + touch_base_name
return join(dirname(touch_base_path), new_base_name)

View File

@ -7,7 +7,7 @@ from media.monitor.config import MMConfig
def main(global_config, log_config):
""" function to run hosted install """
mm_config = MMConfig(global_config)
log = setup_logger( log_config, mm_config['logpath'] )
log = setup_logger( log_config, mm_config['media-monitor']['logpath'] )
setup_global(log)
launch_instance('hosted_install', '/', global_config)

View File

@ -36,10 +36,10 @@ class PypoMessageHandler(Thread):
try:
schedule_exchange = Exchange("airtime-pypo", "direct", durable=True, auto_delete=True)
schedule_queue = Queue("pypo-fetch", exchange=schedule_exchange, key="foo")
connection = BrokerConnection(self.config["rabbitmq_host"], \
self.config["rabbitmq_user"], \
self.config["rabbitmq_password"], \
self.config["rabbitmq_vhost"])
connection = BrokerConnection(self.config["host"], \
self.config["user"], \
self.config["password"], \
self.config["vhost"])
channel = connection.channel()
self.simple_queue = SimpleQueue(channel, schedule_queue)