20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'modules/routinator/manifests/init.pp', line 20
class routinator(
Stdlib::Port::Unprivileged $rtr_port,
Optional[String] $proxy,
){
ensure_packages('rsync')
apt::package_from_component { 'routinator':
component => 'thirdparty/routinator',
packages => ['routinator'],
}
systemd::sysuser { 'routinator':
home_dir => '/etc/routinator',
}
# Using the same paths as the Debian packaging efforts:
# https://salsa.debian.org/md/routinator/tree/master/debian
file {'/etc/routinator/tals':
ensure => directory,
source => 'puppet:///modules/routinator/tals/',
owner => 'routinator',
group => 'routinator',
mode => '0755',
recurse => true,
purge => true,
}
file {'/var/lib/routinator':
ensure => directory,
owner => 'routinator',
group => 'routinator',
mode => '0755',
}
file {'/var/lib/routinator/repository':
ensure => directory,
owner => 'routinator',
group => 'routinator',
mode => '0755',
}
mount { '/var/lib/routinator/repository':
ensure => 'mounted',
device => 'tmpfs',
fstype => 'tmpfs',
options => 'uid=routinator,gid=routinator,mode=755,size=4g,nr_inodes=2M',
atboot => true,
require => File['/var/lib/routinator/repository'],
before => Service['routinator'],
}
systemd::service { 'routinator':
override => true,
content => template('routinator/routinator.systemd_override.erb'),
restart => true,
service_params => {
ensure => 'running', # lint:ignore:ensure_first_param
},
}
profile::auto_restarts::service { 'routinator': }
nrpe::monitor_service { 'routinator-process':
description => 'Routinator process',
nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C routinator',
notes_url => 'https://wikitech.wikimedia.org/wiki/RPKI#Process',
}
}
|