Puppet Class: sonofgridengine::master

Defined in:
modules/sonofgridengine/manifests/master.pp

Overview

Parameters:

  • etcdir (Any) (defaults to: '/var/lib/gridengine/etc')


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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'modules/sonofgridengine/manifests/master.pp', line 3

class sonofgridengine::master (
    $etcdir  = '/var/lib/gridengine/etc',
){

    include ::sonofgridengine

    package { 'gridengine-master':
        ensure  => latest,
        require => Package['gridengine-common'],
    }

    # berkleydb utils for doing db recovery and other operations
    package {'db-util':
        ensure => latest,
    }

    file { "${etcdir}/tracker":
        ensure => directory,
        owner  => 'sgeadmin',
        group  => 'sgeadmin',
        mode   => '0775',
    }

    file { "${etcdir}/bin":
        ensure  => directory,
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        force   => true,
        recurse => true,
        purge   => true,
    }

    file { "${etcdir}/bin/tracker":
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/sonofgridengine/tracker',
    }

    file { "${etcdir}/bin/collector":
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/sonofgridengine/collector',
    }

    sonofgridengine::resourcedir { 'queues':
        addcmd => '/usr/bin/qconf -Aq',
        modcmd => '/usr/bin/qconf -Mq',
        delcmd => '/usr/bin/qconf -dq',
    }
    sonofgridengine::resourcedir { 'hostgroups':
        addcmd => '/usr/bin/qconf -Ahgrp',
        modcmd => '/usr/bin/qconf -Mhgrp',
        delcmd => '/usr/bin/qconf -dhgrp',
    }
    sonofgridengine::resourcedir { 'quotas':
        addcmd => '/usr/bin/qconf -Arqs',
        modcmd => '/usr/bin/qconf -Mrqs',
        delcmd => '/usr/bin/qconf -drqs',
    }
    sonofgridengine::resourcedir { 'checkpoints':
        addcmd => '/usr/bin/qconf -Ackpt',
        modcmd => '/usr/bin/qconf -Mckpt',
        delcmd => '/usr/bin/qconf -dckpt',
    }
    sonofgridengine::resourcedir { 'exechosts':
        addcmd => '/usr/bin/qconf -Ae',
        modcmd => '/usr/bin/qconf -Me',
        delcmd => '/usr/bin/qconf -de',
    }
    sonofgridengine::resourcedir { 'submithosts':
        addcmd => '/usr/bin/qconf -as',
        modcmd => '/bin/true',
        delcmd => '/usr/bin/qconf -ds',
    }

    sonofgridengine::resourcedir { 'adminhosts':
        addcmd => '/usr/bin/qconf -ah',
        modcmd => '/bin/true',
        delcmd => '/usr/bin/qconf -dh',
    }

    file { "${etcdir}/config":
        ensure  => directory,
        force   => true,
        owner   => 'sgeadmin',
        group   => 'sgeadmin',
        mode    => '0775',
        recurse => true,
        purge   => true,
    }

    file {'/usr/local/bin/grid-configurator':
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
        source => 'puppet:///modules/sonofgridengine/grid_configurator/grid_configurator.py',
    }

    # remove the sysvinit script and links shipped with the package
    file { '/etc/init.d/gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc0.d/K01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc1.d/K01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc6.d/K01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc2.d/S01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc3.d/S01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc4.d/S01gridengine-master':
        ensure => absent,
    }

    file { '/etc/rc5.d/S01gridengine-master':
        ensure => absent,
    }

    systemd::unit { 'gridengine-master.service':
        ensure   => present,
        content  => file('sonofgridengine/gridengine-master.service'),
        override => false,
        restart  => true,
        require  => Package['gridengine-master'],
    }
}