Puppet Class: profile::dumps::distribution::nfs

Defined in:
modules/profile/manifests/dumps/distribution/nfs.pp

Overview

Parameters:

  • nfs_clients (Any) (defaults to: hiera('profile::dumps::distribution::nfs_clients'))


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
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
# File 'modules/profile/manifests/dumps/distribution/nfs.pp', line 4

class profile::dumps::distribution::nfs (
    $nfs_clients = hiera('profile::dumps::distribution::nfs_clients')
  ) {

    require_package('nfs-kernel-server', 'nfs-common', 'rpcbind')

    file { '/etc/default/nfs-common':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/profile/dumps/distribution/nfs-common',
    }

    file { '/etc/default/nfs-kernel-server':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/profile/dumps/distribution/nfs-kernel-server',
    }

    file { '/etc/modprobe.d/nfs-lockd.conf':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => 'options lockd nlm_udpport=32768 nlm_tcpport=32769',
    }

    file { '/etc/exports':
        mode    => '0444',
        owner   => 'root',
        group   => 'root',
        content => template('profile/dumps/distribution/nfs-exports.erb'),
        require => Package['nfs-kernel-server'],
    }

    # Manage state manually
    service { 'nfs-kernel-server':
        enable  => false,
        require => Package['nfs-kernel-server'],
    }

    ferm::service { 'labstore_analytics_nfs_portmapper_udp':
        proto  => 'udp',
        port   => '111',
        srange => '$ANALYTICS_NETWORKS',
    }

    ferm::service { 'labstore_analytics_nfs_portmapper_tcp':
        proto  => 'tcp',
        port   => '111',
        srange => '$ANALYTICS_NETWORKS',
    }

    ferm::service { 'labstore_analytics_nfs_nfs_service':
        proto  => 'tcp',
        port   => '2049',
        srange => '$ANALYTICS_NETWORKS',
    }

    ferm::service { 'labstore_analytics_nfs_rpc_statd_tcp':
        proto  => 'tcp',
        port   => '55659',
        srange => '$ANALYTICS_NETWORKS',
    }

    ferm::service { 'labstore_analytics_nfs_rpc_statd_udp':
        proto  => 'udp',
        port   => '55659',
        srange => '$ANALYTICS_NETWORKS',
    }

    ferm::service { 'labstore_analytics_nfs_rpc_mountd':
        proto  => 'tcp',
        port   => '38466',
        srange => '$ANALYTICS_NETWORKS',
    }

    monitoring::service { 'nfs':
        description   => 'NFS',
        check_command => 'check_tcp!2049',
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Labstore',
    }
}