Puppet Class: role::authdns::server

Defined in:
modules/role/manifests/authdns/server.pp

Overview

This is for an authdns server to use



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
# File 'modules/role/manifests/authdns/server.pp', line 2

class role::authdns::server {
    system::role { 'authdns': description => 'Authoritative DNS server' }

    include ::profile::standard
    include ::profile::base::firewall
    include prometheus::node_gdnsd
    include role::authdns::data
    include ::profile::authdns::acmechief_target

    create_resources(
        interface::ip,
        $role::authdns::data::ns_addrs,
        { interface => 'lo' }
    )

    $authdns_servers = hiera('authdns_servers')

    class { 'authdns':
        nameservers        => $authdns_servers,
        gitrepo            => $role::authdns::data::gitrepo,
        lvs_services       => hiera('lvs::configuration::lvs_services'),
        discovery_services => hiera('discovery::services'),
    }

    ferm::service { 'udp_dns_auth':
        proto   => 'udp',
        notrack => true,
        port    => '53',
    }

    ferm::service { 'tcp_dns_auth':
        proto => 'tcp',
        port  => '53',
    }

    $authdns_ns_ferm = join($authdns_servers, ' ')
    ferm::service { 'authdns_update_ssh':
        proto  => 'tcp',
        port   => '22',
        srange => "(@resolve((${authdns_ns_ferm})) @resolve((${authdns_ns_ferm}), AAAA))",
    }

    # Enable TFO, which gdnsd-3.x supports by default if enabled
    sysctl::parameters { 'TCP Fast Open for AuthDNS':
        values => {
            'net.ipv4.tcp_fastopen' => 3,
        },
    }

    # Enable RPS/RSS stuff.  Current authdns hosts have tg3 or bnx2 1G cards,
    # but it still helps!
    interface::rps { 'primary':
        interface => $facts['interface_primary'],
    }
}