2020-10-20 04:44:58 +02:00
|
|
|
class zulip_ops::profile::zmirror_personals {
|
|
|
|
include zulip_ops::profile::base
|
2013-11-01 20:28:03 +01:00
|
|
|
include zulip::supervisor
|
2013-08-23 23:38:39 +02:00
|
|
|
|
2013-11-08 21:16:02 +01:00
|
|
|
$zmirror_packages = [# Packages needed to run the mirror
|
2018-08-13 21:29:40 +02:00
|
|
|
'libzephyr4-krb5',
|
|
|
|
'zephyr-clients',
|
|
|
|
'krb5-config',
|
|
|
|
'krb5-user',
|
2018-08-13 21:27:41 +02:00
|
|
|
# Packages needed to build pyzephyr
|
2018-08-13 21:29:40 +02:00
|
|
|
'libzephyr-dev',
|
|
|
|
'comerr-dev',
|
|
|
|
'python3-dev',
|
2022-01-13 01:32:50 +01:00
|
|
|
'python2.7-dev',
|
2018-08-13 21:29:40 +02:00
|
|
|
'cython3',
|
|
|
|
'cython',
|
2018-08-13 21:27:41 +02:00
|
|
|
]
|
2018-12-06 02:56:46 +01:00
|
|
|
package { $zmirror_packages:
|
2022-03-16 01:23:53 +01:00
|
|
|
ensure => installed,
|
2013-08-23 23:38:39 +02:00
|
|
|
}
|
2018-12-06 02:56:46 +01:00
|
|
|
|
2022-01-13 02:27:30 +01:00
|
|
|
file { '/etc/krb5.conf':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
source => 'puppet:///modules/zulip_ops/krb5.conf',
|
|
|
|
}
|
|
|
|
|
2013-10-04 19:19:57 +02:00
|
|
|
file { ['/home/zulip/api-keys', '/home/zulip/zephyr_sessions', '/home/zulip/ccache',
|
|
|
|
'/home/zulip/mirror_status']:
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
|
|
|
mode => '0644',
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'zulip',
|
|
|
|
group => 'zulip',
|
2013-08-23 23:38:39 +02:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/cron.d/test_zephyr_personal_mirrors':
|
2013-08-26 21:43:29 +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_ops/cron.d/test_zephyr_personal_mirrors',
|
2013-08-26 21:43:29 +02:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/usr/lib/nagios/plugins/zulip_zephyr_mirror':
|
2020-06-29 23:15:37 +02:00
|
|
|
require => Package[$zulip::common::nagios_plugins],
|
2016-04-04 04:23:57 +02:00
|
|
|
recurse => true,
|
2018-08-13 21:20:34 +02:00
|
|
|
purge => true,
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0755',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/nagios_plugins/zulip_zephyr_mirror',
|
2016-04-04 04:23:57 +02:00
|
|
|
}
|
|
|
|
|
2021-05-25 04:12:28 +02:00
|
|
|
# Allow the relevant UDP ports
|
2021-08-24 20:43:23 +02:00
|
|
|
concat::fragment { 'iptables-zmirror.v4':
|
2021-05-25 04:12:28 +02:00
|
|
|
target => '/etc/iptables/rules.v4',
|
2021-08-24 20:43:23 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/iptables/zmirror.v4',
|
2021-05-25 04:12:28 +02:00
|
|
|
order => '20',
|
|
|
|
}
|
2021-08-24 23:11:36 +02:00
|
|
|
concat::fragment { 'iptables-zmirror.v6':
|
|
|
|
target => '/etc/iptables/rules.v6',
|
|
|
|
source => 'puppet:///modules/zulip_ops/iptables/zmirror.v6',
|
|
|
|
order => '20',
|
|
|
|
}
|
2021-05-25 04:12:28 +02:00
|
|
|
|
2013-08-23 23:38:39 +02:00
|
|
|
# TODO: Do the rest of our setup, which includes at least:
|
|
|
|
# Building patched libzephyr4-krb5 from davidben's roost branch and installing that
|
2020-05-16 01:45:03 +02:00
|
|
|
# (https://github.com/davidben/zephyr/commit/252258d38ebd0e79b261db336c1f74f261b77128)
|
2013-08-23 23:38:39 +02:00
|
|
|
# (to add ZLoadSession/ZDumpSession).
|
|
|
|
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
2020-05-16 01:45:03 +02:00
|
|
|
# (Patched with https://github.com/ebroder/python-zephyr/commit/d00cca474ed361439e68246e2687cdc4ea906de3)
|
2013-08-23 23:38:39 +02:00
|
|
|
}
|