2016-10-17 04:05:49 +02:00
|
|
|
class zulip_ops::zmirror {
|
|
|
|
include zulip_ops::base
|
2018-12-06 02:56:46 +01:00
|
|
|
include zulip_ops::apt_repository_debathena
|
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',
|
|
|
|
'debathena-kerberos-config',
|
|
|
|
'debathena-zephyr-config',
|
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',
|
|
|
|
'python-dev',
|
|
|
|
'cython3',
|
|
|
|
'cython',
|
2018-08-13 21:27:41 +02:00
|
|
|
]
|
2018-12-06 02:56:46 +01:00
|
|
|
package { $zmirror_packages:
|
|
|
|
ensure => 'installed',
|
|
|
|
require => Exec['setup_apt_repo_debathena'],
|
|
|
|
}
|
2013-02-07 22:20:10 +01:00
|
|
|
|
2014-04-09 00:33:22 +02:00
|
|
|
apt::source {'debathena':
|
2014-01-30 21:12:11 +01:00
|
|
|
location => 'http://debathena.mit.edu/apt',
|
2016-08-15 01:35:01 +02:00
|
|
|
release => 'xenial',
|
2014-01-30 21:12:11 +01:00
|
|
|
repos => 'debathena debathena-config',
|
|
|
|
key => 'D1CD49BDD30B677273A75C66E4EE62700D8A9E8F',
|
|
|
|
key_source => 'https://debathena.mit.edu/apt/debathena-archive.asc',
|
|
|
|
include_src => true,
|
2013-08-19 18:10:44 +02:00
|
|
|
}
|
2014-01-30 21:12:11 +01:00
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/supervisor/conf.d/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',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/supervisor/conf.d/zmirror.conf',
|
|
|
|
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',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/cron.d/zephyr-mirror',
|
2013-08-19 19:54:08 +02:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/default/zephyr-clients.debathena':
|
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',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/zephyr-clients.debathena',
|
2013-10-28 18:30:12 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/usr/lib/nagios/plugins/zulip_zephyr_mirror':
|
2016-04-04 04:23:57 +02:00
|
|
|
require => Package[nagios-plugins-basic],
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2013-02-07 22:20:10 +01:00
|
|
|
# TODO: Do the rest of our setup, which includes at least:
|
|
|
|
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
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
|
|
|
}
|