parapluie.rb 12.3 KB
Newer Older
1
site :rennes do |site_uid|
2

3
  cluster :parapluie do |cluster_uid|
4
5
    model "HP ProLiant DL165 G7"
    created_at Time.parse("2010-11-02").httpdate
6
    kavlan true
7
8
9
10

    40.times do |i|
      node "#{cluster_uid}-#{i+1}" do |node_uid|

11
        performance({
12
13
14
15
16
17
18
        :core_flops => 4932000000,
        :node_flops => 121200000000
      })

        supported_job_types({
          :deploy       => true,
          :besteffort   => true,
19
          :virtual      => lookup('parapluie_generated', node_uid, 'supported_job_types', 'virtual')
20
        })
21

22
        architecture({
23
24
25
          :smp_size       => lookup('parapluie_generated', node_uid, 'architecture', 'smp_size'),
          :smt_size       => lookup('parapluie_generated', node_uid, 'architecture', 'smt_size'),
          :platform_type  => lookup('parapluie_generated', node_uid, 'architecture', 'platform_type')
26
27
28
        })

        processor({
29
30
31
32
33
34
35
36
37
38
39
          :vendor             => lookup('parapluie_generated', node_uid, 'processor', 'vendor'),
          :model              => lookup('parapluie_generated', node_uid, 'processor', 'model'),
          :version            => lookup('parapluie_generated', node_uid, 'processor', 'version'),
          :clock_speed        => lookup('parapluie_generated', node_uid, 'processor', 'clock_speed'),
          :instruction_set    => lookup('parapluie_generated', node_uid, 'processor', 'instruction_set'),
          :other_description  => lookup('parapluie_generated', node_uid, 'processor', 'other_description'),
          :cache_l1           => lookup('parapluie_generated', node_uid, 'processor', 'cache_l1'),
          :cache_l1i          => lookup('parapluie_generated', node_uid, 'processor', 'cache_l1i'),
          :cache_l1d          => lookup('parapluie_generated', node_uid, 'processor', 'cache_l1d'),
          :cache_l2           => lookup('parapluie_generated', node_uid, 'processor', 'cache_l2'),
          :cache_l3           => lookup('parapluie_generated', node_uid, 'processor', 'cache_l3')
40
41
42
        })

        main_memory({
43
          :ram_size     => lookup('parapluie_generated', node_uid, 'main_memory', 'ram_size'),
44
45
46
47
          :virtual_size => nil
        })

        operating_system({
48
          :name     => lookup('parapluie_generated', node_uid, 'operating_system', 'name'),
49
          :release  => "Squeeze",
50
51
          :version  => lookup('parapluie_generated', node_uid, 'operating_system', 'version'),
          :kernel   => lookup('parapluie_generated', node_uid, 'operating_system', 'kernel')
52
53
54
55
        })

        storage_devices [{
          :interface  => 'SATA',
56
          :size       => lookup('parapluie_generated', node_uid, 'block_devices', 'sda', 'size'),
57
          :driver     => "ahci",
58
59
60
61
          :device     => lookup('parapluie_generated', node_uid, 'block_devices', 'sda', 'device'),
          :model      => lookup('parapluie_generated', node_uid, 'block_devices', 'sda', 'model'),
          :vendor     => lookup('parapluie_generated', node_uid, 'block_devices', 'sda', 'vendor'),
          :rev        => lookup('parapluie_generated', node_uid, 'block_devices', 'sda', 'rev')
62
63
64
        }]

        network_adapters [{
65
66
67
68
69
70
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'interface'),
          :rate             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'rate'),
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'mounted'),
71
          :device           => "eth0",
72
73
74
          :bridged          => false,
          :vendor           => "Intel",
          :version          => "82576",
75
76
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'driver'),
          :mac              => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth0', 'mac')
77
78
        },
        {
79
80
81
82
83
84
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'interface'),
          :rate             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'rate'),
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'mounted'),
85
          :bridged          => true,
86
          :device           => "eth1",
87
88
          :vendor           => "Intel",
          :version          => "82576",
89
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'driver'),
90
          :network_address  => "#{node_uid}.#{site_uid}.grid5000.fr",
91
92
93
94
95
          :ip               => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'ip'),
          :ip6              => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'ip6'),
          :switch           => lookup('parapluie_manual', node_uid, 'network_interfaces', 'eth1', 'switch_name'),
          :switch_port      => lookup('parapluie_manual', node_uid, 'network_interfaces', 'eth1', 'switch_port'),
          :mac              => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth1', 'mac')
96
97
        },
        {
98
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'interface'),
99
          :rate             => 1.G,
100
101
102
103
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'mounted'),
104
          :device           => "eth2",
105
106
107
          :bridged          => false,
          :vendor           => "Intel",
          :version          => "82576",
108
109
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'driver'),
          :mac              => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth2', 'mac')
110
111
        },
        {
112
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'interface'),
113
          :rate             => 1.G,
114
115
116
117
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'mounted'),
118
          :device           => "eth3",
119
120
121
          :bridged          => false,
          :vendor           => "Intel",
          :version          => "82576",
122
123
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'driver'),
          :mac              => lookup('parapluie_generated', node_uid, 'network_interfaces', 'eth3', 'mac')
124
125
        },
        {
126
127
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'interface'),
          :rate             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'rate'),
128
          :device           => "ib0",
129
130
131
132
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'mounted'),
133
          :vendor           => 'Mellanox',
134
          :version          => "MT25418",
135
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'driver'),
136
          :network_address  => "#{node_uid}-ib0.#{site_uid}.grid5000.fr",
137
138
139
          :ip               => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'ip'),
          :ip6               => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'ip6'),
          :guid             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib0', 'guid')
140
141
        },
        {
142
143
          :interface        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'interface'),
          :rate             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'rate'),
144
          :device           => "ib1",
145
146
147
148
          :enabled          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'enabled'),
          :management       => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'management'),
          :mountable        => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'mountable'),
          :mounted          => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'mounted'),
149
          :vendor           => 'Mellanox',
150
          :version          => "MT25418",
151
152
          :driver           => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'driver'),
          :guid             => lookup('parapluie_generated', node_uid, 'network_interfaces', 'ib1', 'guid')
153
154
155
156
157
        },
        {
          :interface            => 'Ethernet',
          :rate                 => 1.G,
          :network_address      => "#{node_uid}-bmc.#{site_uid}.grid5000.fr",
158
159
          :ip                   => lookup('parapluie_generated', node_uid, 'network_interfaces', 'bmc', 'ip'),
          :mac                  => lookup('parapluie_generated', node_uid, 'network_interfaces', 'bmc', 'mac'),
160
161
162
163
164
          :enabled              => true,
          :mounted              => false,
          :mountable            => false,
          :management           => true,
          :device               => "bmc"
165
166
        }]

167
        chassis({
168
169
170
          :serial       => lookup('parapluie_generated', node_uid, 'chassis', 'serial_number'),
          :name         => lookup('parapluie_generated', node_uid, 'chassis', 'product_name'),
          :manufacturer => lookup('parapluie_generated', node_uid, 'chassis', 'manufacturer')
171
172
173
        })

        bios({
174
175
176
          :version      => lookup('parapluie_generated', node_uid, 'bios', 'version'),
          :vendor       => lookup('parapluie_generated', node_uid, 'bios', 'vendor'),
          :release_date => lookup('parapluie_generated', node_uid, 'bios', 'release_date')
177
178
        })

179
        bios({
180
181
182
          :version      => lookup('parapluie_generated', node_uid, 'bios', 'version'),
          :vendor       => lookup('parapluie_generated', node_uid, 'bios', 'vendor'),
          :release_date => lookup('parapluie_generated', node_uid, 'bios', 'release_date')
183
184
185
186
187
188
189
190
191
192
        })

        gpu({
          :gpu  => false
        })

        monitoring({
          :wattmeter    => false,
          :temperature  => true,
        })
193

194
195
196
197
        sensors({
          :power => {
            :available => true,
            :via => {
198
              :pdu      => [{
199
200
                :uid  => lookup('parapluie_manual', node_uid, 'pdu', 'pdu_name'),
                :port => lookup('parapluie_manual', node_uid, 'pdu', 'pdu_position'),
201
             }],
202
              :api      => { :metric => "pdu" }
203
204
205
206
207
            }
          },
          :temperature => {
            :available => true,
            :via => {
Pascal Morillon's avatar
Pascal Morillon committed
208
209
              :api      => { :metric => "ambient_temp" },
              :ipmi     => { :sensors => { :ambient => "Inlet Ambient" } }
210
211
212
            }
          }
        })
213

214
        chassis({:serial_number => lookup('parapluie_generated', node_uid, 'chassis', 'serial_number')})
215

216
217
218
      end
    end
  end
219
end