Serve the statusbot alert file from eavesdrop

Change-Id: I5c1a4adc25bab62564effba527122e57c229d1c5
This commit is contained in:
James E. Blair 2013-12-06 10:44:29 -08:00
parent 5ad56c346e
commit 66faa9c340
5 changed files with 60 additions and 17 deletions

View File

@ -5,7 +5,8 @@ define meetbot::site(
$nickpass,
$server,
$use_ssl,
$vhost_name = $::fqdn
$vhost_name = $::fqdn,
$vhost_extra = '',
) {
$varlib = "/var/lib/meetbot/${name}"

View File

@ -22,6 +22,8 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
allow from all
</Directory>
<%= vhost_extra %>
ErrorLog /var/log/apache2/<%= name %>_error.log
LogLevel warn
CustomLog /var/log/apache2/<%= name %>_access.log combined

View File

@ -1,3 +1,5 @@
# Eavesdrop server
class openstack_project::eavesdrop (
$nickpass = '',
$sysadmins = [],
@ -15,13 +17,22 @@ class openstack_project::eavesdrop (
iptables_public_tcp_ports => [80],
sysadmins => $sysadmins
}
include apache
include meetbot
$vhost_extra = '
<Location /var/lib/statusbot/www >
Header set Access-Control-Allow-Origin "*"
</Location>
'
meetbot::site { 'openstack':
nick => 'openstack',
nickpass => $nickpass,
network => 'FreeNode',
server => 'chat.freenode.net:7000',
use_ssl => 'True',
vhost_extra => $vhost_extra,
channels => [
'#heat',
'#openstack',
@ -41,7 +52,6 @@ class openstack_project::eavesdrop (
'#storyboard',
'#tripleo',
],
use_ssl => 'True'
}
class { 'statusbot':
@ -55,6 +65,14 @@ class openstack_project::eavesdrop (
wiki_url => $statusbot_wiki_url,
wiki_pageid => $statusbot_wiki_pageid,
}
file { '/srv/meetbot-openstack/alert':
ensure => link,
target => '/var/lib/statusbot/www',
require => Class['statusbot'],
}
# vim:sw=2:ts=2:expandtab:textwidth=79
a2mod { 'headers':
ensure => present,
}
}

View File

@ -67,6 +67,7 @@ class statusbot(
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
require => User['statusbot'],
}
file { '/var/run/statusbot':
@ -74,6 +75,24 @@ class statusbot(
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
require => User['statusbot'],
}
file { '/var/lib/statusbot':
ensure => directory,
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
require => User['statusbot'],
}
file { '/var/lib/statusbot/www':
ensure => directory,
owner => 'statusbot',
group => 'statusbot',
mode => '0775',
require => [File['/var/lib/statusbot'],
User['statusbot']]
}
file { '/etc/statusbot/logging.config':

View File

@ -13,3 +13,6 @@ username=<%= wiki_user %>
password=<%= wiki_password %>
url=<%= wiki_url %>
pageid=<%= wiki_pageid %>
[alertfile]
dir=/var/lib/statusbot/www