Puppet Class: karapace

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

Overview

Parameters:

  • bootstrap_uri (String) (defaults to: '')
  • server_name (Stdlib::Host) (defaults to: $facts['networking']['fqdn'])


17
18
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
# File 'modules/karapace/manifests/init.pp', line 17

class karapace (
    String $bootstrap_uri = '',
    Stdlib::Host $server_name = $facts['networking']['fqdn'],
) {
    group { 'karapace':
        ensure => present,
        system => true,
    }

    user { 'karapace':
        gid     => 'karapace',
        system  => true,
        require => Group['karapace'],
    }

    ensure_packages('karapace')

    file { '/etc/karapace':
        ensure => 'directory',
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    file { '/etc/karapace/karapace.config.json':
        content => template('karapace/karapace.config.json.erb'),
        owner   => 'root',
        group   => 'karapace',
        mode    => '0550',
    }

    systemd::service { 'karapace':
        ensure    => 'present',
        restart   => true,
        content   => file('karapace/initscripts/karapace.service'),
        subscribe => File['/etc/karapace/karapace.config.json'],
    }

    monitoring::service { 'karapace':
        ensure        => present,
        description   => 'karapace http server',
        check_command => 'check_http_port_url!8081!/',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Karapace',
    }
}