Puppet Class: routinator

Defined in:
modules/routinator/manifests/init.pp

Overview

Parameters:

  • rtr_port (Stdlib::Port::Unprivileged)
  • proxy (Optional[String])


19
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
# File 'modules/routinator/manifests/init.pp', line 19

class routinator(
  Stdlib::Port::Unprivileged $rtr_port,
  Optional[String] $proxy,
  ){

    require_package('routinator', 'rsync')

    group { 'routinator':
        ensure  => present,
        require => Package['routinator'],
    }
    user { 'routinator':
        ensure     => present,
        gid        => 'routinator',
        home       => '/etc/routinator',
        system     => true,
        managehome => true,
    }

# 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',
    }

    systemd::service { 'routinator':
        content        => template('routinator/routinator.service.erb'),
        require        => [ File['/etc/routinator/tals'], File['/var/lib/routinator/repository'] ],
        restart        => true,
        service_params => {
            ensure     => 'running', # lint:ignore:ensure_first_param
        },
    }

    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',
    }
  }