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
|
2018-08-13 21:29:40 +02:00
|
|
|
'autossh',
|
2018-08-13 21:27:41 +02:00
|
|
|
]
|
2018-08-13 21:29:40 +02:00
|
|
|
package { $app_packages: ensure => 'installed' }
|
|
|
|
$hosts_domain = zulipconf('nagios', 'hosts_domain', undef)
|
2013-11-10 15:58:10 +01:00
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/logrotate.d/zulip':
|
2016-08-24 07:42:33 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip/logrotate/zulip',
|
2016-08-24 07:42:33 +02:00
|
|
|
}
|
|
|
|
|
2013-12-16 22:37:42 +01:00
|
|
|
file { '/etc/log2zulip.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'zulip',
|
|
|
|
group => 'zulip',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
|
|
|
source => 'puppet:///modules/zulip_ops/log2zulip.conf',
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/etc/cron.d/log2zulip':
|
2018-12-18 01:50:02 +01:00
|
|
|
ensure => absent,
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
2016-08-10 07:57:19 +02:00
|
|
|
file { '/etc/cron.d/check_send_receive_time':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
|
|
|
source => 'puppet:///modules/zulip_ops/cron.d/check_send_receive_time',
|
2016-08-10 07:57:19 +02:00
|
|
|
}
|
|
|
|
|
2013-12-16 22:37:42 +01:00
|
|
|
file { '/etc/log2zulip.zuliprc':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'zulip',
|
|
|
|
group => 'zulip',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0600',
|
|
|
|
source => 'puppet:///modules/zulip_ops/log2zulip.zuliprc',
|
2013-12-16 22:37:42 +01:00
|
|
|
}
|
2018-08-13 21:29:40 +02: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
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/supervisor/conf.d/redis_tunnel.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
require => Package['supervisor', 'autossh'],
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
content => template('zulip_ops/supervisor/conf.d/redis_tunnel.conf.template.erb'),
|
|
|
|
notify => Service['supervisor'],
|
2016-08-01 04:58:47 +02:00
|
|
|
}
|
2016-08-01 05:24:55 +02:00
|
|
|
# Need redis_password in its own file for Nagios
|
|
|
|
file { '/var/lib/nagios/redis_password':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
|
|
|
mode => '0600',
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'nagios',
|
|
|
|
group => 'nagios',
|
2018-08-13 21:20:34 +02:00
|
|
|
content => zulipsecret('secrets', 'redis_password', ''),
|
2016-08-01 05:24:55 +02:00
|
|
|
}
|
|
|
|
|
2013-11-10 15:58:10 +01:00
|
|
|
}
|