Puppet Class: role::labs::nfs::misc

Defined in:
modules/role/manifests/labs/nfs/misc.pp

Overview

Parameters:

  • dump_servers_ips (Any)
  • maps_project_internal_ips (Any)
  • statistics_servers (Any) (defaults to: hiera('statistics_servers'))


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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'modules/role/manifests/labs/nfs/misc.pp', line 6

class role::labs::nfs::misc(
    $dump_servers_ips,
    $maps_project_internal_ips,
    $statistics_servers = hiera('statistics_servers'),
    ) {

    system::role { 'labs::nfs::misc':
        description => 'Labs NFS service (misc)',
    }

    include ::standard
    include labstore
    include rsync::server
    include labstore::backup_keys
    include labstore::monitoring::interfaces
    # to be included post ldap integration
    # include labstore::monitoring::ldap

    # some files will be owned by this user
    include ::profile::dumps::web::dumpsuser

    rsync::server::module { 'pagecounts':
        path        => '/srv/dumps/pagecounts',
        read_only   => 'no',
        hosts_allow => $dump_servers_ips,
        auto_ferm   => true,
    }

    rsync::server::module { 'dumps':
        path        => '/srv/dumps',
        read_only   => 'no',
        hosts_allow => $dump_servers_ips,
        auto_ferm   => true,
    }


    # This also exports /srv/statistics to allow statistics servers
    # a way to rsync public data in from production.
    rsync::server::module { 'statistics':
        path        => '/srv/statistics',
        read_only   => 'no',
        hosts_allow => $statistics_servers,
        require     => File['/srv/statistics'],
        auto_ferm   => true,
    }

    # This has a flat exports list
    # because it only exports data
    # available to all
    file { '/etc/exports':
        ensure  => present,
        content => template('labstore/exports.labs_extras.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0444',
    }

    file { '/srv/scratch':
        ensure => 'directory',
    }

    file { '/srv/dumps':
        ensure => 'directory',
    }

    file { '/srv/statistics':
        ensure => 'directory',
    }

    file {'/srv/maps':
        ensure => 'directory',
    }

    mount { '/srv/dumps':
        ensure  => mounted,
        fstype  => ext4,
        options => 'defaults,noatime',
        atboot  => true,
        device  => '/dev/srv/dumps',
        require => File['/srv/dumps'],
    }

    mount { '/srv/scratch':
        ensure  => mounted,
        fstype  => ext4,
        options => 'defaults,noatime',
        atboot  => true,
        device  => '/dev/srv/scratch',
        require => File['/srv/scratch'],
    }

    mount { '/srv/statistics':
        ensure  => mounted,
        fstype  => ext4,
        options => 'defaults,noatime',
        atboot  => true,
        device  => '/dev/srv/statistics/',
        require => File['/srv/statistics'],
    }

    mount { '/srv/maps':
        ensure  => mounted,
        fstype  => ext4,
        options => 'defaults,noatime',
        atboot  => true,
        device  => '/dev/srv/maps/',
        require => File['/srv/maps'],
    }
}