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
|
2020-10-20 02:49:54 +02:00
|
|
|
include zulip::profile::memcached
|
2020-10-26 22:10:29 +01:00
|
|
|
include zulip::profile::rabbitmq
|
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
|
2020-10-20 03:29:55 +02:00
|
|
|
include zulip_ops::app_frontend_monitoring
|
2016-07-20 00:35:03 +02:00
|
|
|
$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' }
|
2021-03-10 00:35:32 +01:00
|
|
|
$redis_hostname = zulipconf('redis', 'hostname', undef)
|
2013-11-10 15:58:10 +01:00
|
|
|
|
2021-05-25 04:12:28 +02:00
|
|
|
zulip_ops::firewall_allow{ 'smtp': }
|
|
|
|
zulip_ops::firewall_allow{ 'http': }
|
|
|
|
zulip_ops::firewall_allow{ 'https': }
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2020-04-07 19:27:07 +02:00
|
|
|
# Each server does its own fetching of contributor data, since
|
|
|
|
# we don't have a way to synchronize that among several servers.
|
|
|
|
file { '/etc/cron.d/fetch-contributor-data':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
source => 'puppet:///modules/zulip_ops/cron.d/fetch-contributor-data',
|
|
|
|
}
|
2013-11-10 15:58:10 +01:00
|
|
|
}
|