2024-02-06 21:40:19 +01:00
|
|
|
class kandra::profile::zmirror inherits kandra::profile::base {
|
2024-02-02 15:08:49 +01:00
|
|
|
|
2013-11-01 20:28:03 +01:00
|
|
|
include zulip::supervisor
|
2013-02-07 22:20:10 +01: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',
|
2022-09-14 00:56:55 +02:00
|
|
|
# Packages needed to for ctypes access to Zephyr
|
2018-08-13 21:29:40 +02:00
|
|
|
'python3-dev',
|
2022-09-14 00:56:55 +02:00
|
|
|
'python3-typing-extensions',
|
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,
|
2018-12-06 02:56:46 +01:00
|
|
|
}
|
2013-02-07 22:20:10 +01:00
|
|
|
|
2021-06-11 22:37:36 +02:00
|
|
|
file { "${zulip::common::supervisor_conf_dir}/zmirror.conf":
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package[supervisor],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/supervisor/conf.d/zmirror.conf',
|
2018-08-13 21:29:40 +02:00
|
|
|
notify => Service['supervisor'],
|
2013-08-19 19:51:22 +02:00
|
|
|
}
|
2013-08-19 18:10:44 +02:00
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/cron.d/zephyr-mirror':
|
2013-08-19 19:54:08 +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',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/cron.d/zephyr-mirror',
|
2013-08-19 19:54:08 +02:00
|
|
|
}
|
|
|
|
|
2022-01-13 02:27:30 +01:00
|
|
|
file { '/etc/krb5.conf':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/krb5.conf',
|
2022-01-13 02:27:30 +01:00
|
|
|
}
|
|
|
|
|
2022-01-13 02:35:40 +01:00
|
|
|
file { '/etc/default/zephyr-clients':
|
2013-10-28 18:30:12 +01: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',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/zephyr-clients',
|
2013-10-28 18:30:12 +01: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',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/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',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/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',
|
2024-02-06 21:40:19 +01:00
|
|
|
source => 'puppet:///modules/kandra/iptables/zmirror.v6',
|
2021-08-24 23:11:36 +02:00
|
|
|
order => '20',
|
|
|
|
}
|
2021-05-25 04:12:28 +02:00
|
|
|
|
2013-02-07 22:20:10 +01:00
|
|
|
# TODO: Do the rest of our setup, which includes at least:
|
2013-10-04 19:19:57 +02:00
|
|
|
# Putting tabbott/extra's keytab on the system at /home/zulip/tabbott.extra.keytab
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|