2016-10-17 04:05:49 +02:00
|
|
|
class zulip_ops::app_frontend {
|
2015-12-26 06:07:15 +01:00
|
|
|
include zulip::app_frontend_base
|
2015-12-26 06:13:47 +01:00
|
|
|
include zulip::memcached
|
|
|
|
include zulip::rabbit
|
2014-02-06 21:10:00 +01:00
|
|
|
include zulip::postfix_localmail
|
2016-07-20 00:35:03 +02:00
|
|
|
include zulip::static_asset_compiler
|
|
|
|
$app_packages = [# Needed for the ssh tunnel to the redis server
|
2014-02-05 01:05:27 +01:00
|
|
|
"autossh",
|
2013-11-10 15:58:10 +01:00
|
|
|
]
|
|
|
|
package { $app_packages: ensure => "installed" }
|
2016-08-01 04:58:47 +02:00
|
|
|
$hosts_domain = zulipconf("nagios", "hosts_domain", undef)
|
2013-11-10 15:58:10 +01:00
|
|
|
|
2016-08-24 07:42:33 +02:00
|
|
|
file { "/etc/logrotate.d/zulip":
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
source => "puppet:///modules/zulip/logrotate/zulip",
|
|
|
|
}
|
|
|
|
|
2013-12-16 22:37:42 +01:00
|
|
|
file { '/etc/log2zulip.conf':
|
|
|
|
ensure => file,
|
|
|
|
owner => "zulip",
|
|
|
|
group => "zulip",
|
|
|
|
mode => 644,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/log2zulip.conf',
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/cron.d/log2zulip':
|
|
|
|
ensure => file,
|
2013-12-17 20:13:27 +01:00
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
2013-12-16 22:37:42 +01:00
|
|
|
mode => 644,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/cron.d/log2zulip',
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
2016-08-10 07:57:19 +02:00
|
|
|
file { '/etc/cron.d/check_send_receive_time':
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
source => 'puppet:///modules/zulip_ops/cron.d/check_send_receive_time',
|
|
|
|
}
|
|
|
|
|
2013-12-16 22:37:42 +01:00
|
|
|
file { '/etc/log2zulip.zuliprc':
|
|
|
|
ensure => file,
|
|
|
|
owner => "zulip",
|
|
|
|
group => "zulip",
|
|
|
|
mode => 600,
|
2016-10-17 04:05:49 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/log2zulip.zuliprc',
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
2014-01-08 18:00:31 +01:00
|
|
|
file { "/etc/cron.d/check-apns-tokens":
|
2017-08-19 00:09:26 +02:00
|
|
|
ensure => absent,
|
2014-01-08 18:00:31 +01:00
|
|
|
}
|
2016-08-01 04:58:47 +02:00
|
|
|
|
|
|
|
file { "/etc/supervisor/conf.d/redis_tunnel.conf":
|
|
|
|
require => Package["supervisor", "autossh"],
|
|
|
|
ensure => file,
|
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
|
|
|
mode => 644,
|
|
|
|
content => template("zulip_ops/supervisor/conf.d/redis_tunnel.conf.template.erb"),
|
|
|
|
notify => Service["supervisor"],
|
|
|
|
}
|
2016-08-01 05:24:55 +02:00
|
|
|
# Need redis_password in its own file for Nagios
|
|
|
|
file { '/var/lib/nagios/redis_password':
|
|
|
|
ensure => file,
|
|
|
|
mode => 600,
|
|
|
|
owner => "nagios",
|
|
|
|
group => "nagios",
|
|
|
|
content => zulipsecret('secrets', 'redis_password', ''),
|
|
|
|
}
|
|
|
|
|
2013-11-10 15:58:10 +01:00
|
|
|
}
|