griffon.rb 16.8 KB
Newer Older
1 2 3 4 5
site :nancy do |site_uid|

  cluster :griffon do |cluster_uid|
    model "Carri System CS-5393B"
    created_at Time.parse("2009-04-10").httpdate
6
    kavlan true
7
    queues ['admin', 'default']
8
    ([*0..28]+[*57..59]).each do |i|
9
      node "#{cluster_uid}-#{i+1}" do |node_uid|
10

11
        performance({
12 13 14 15 16 17 18
        :core_flops => 7.963.G,
        :node_flops => 52.5.G
      })

        supported_job_types({
          :deploy       => true,
          :besteffort   => true,
19
          :max_walltime => 0,
20
          :virtual      => lookup(node_uid, node_uid, 'supported_job_types', 'virtual'),
21
          :queues       => ['admin', 'default']
22
        })
23

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

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

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

49
        operating_system({
50
          :name     => lookup(node_uid, node_uid, 'operating_system', 'name'),
51
          :release  => "Jessie",
52 53
          :version  => lookup(node_uid, node_uid, 'operating_system', 'version'),
          :kernel   => lookup(node_uid, node_uid, 'operating_system', 'kernel')
54
        })
55
        storage_devices [{
56
          :interface  => 'SATA II',
57
          :size       => lookup(node_uid, node_uid, 'block_devices', 'sda', 'size'),
58
          :driver     => "ahci",
59 60 61 62
          :device     => lookup(node_uid, node_uid, 'block_devices', 'sda', 'device'),
          :model      => lookup(node_uid, node_uid, 'block_devices', 'sda', 'model'),
          :vendor     => lookup(node_uid, node_uid, 'block_devices', 'sda', 'vendor'),
          :rev        => lookup(node_uid, node_uid, 'block_devices', 'sda', 'rev'),
63
          :storage    => 'HDD'
64
        }]
65

66 67
        if (11<=i+1 and i+1<=14) then
          network_adapters [{
68 69 70 71 72 73
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'rate'),
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mounted'),
74 75 76 77
            :bridged          => true,
            :device           => "eth0",
            :vendor           => "intel",
            :version          => "80003ES2LAN",
78
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'driver'),
79
            :network_address  => "#{node_uid}.#{site_uid}.grid5000.fr",
80 81
            :ip               => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'ip'),
            :ip6              => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'ip6'),
82 83
            :switch           => net_switch_lookup('nancy','griffon', node_uid),
            :switch_port      => net_port_lookup('nancy','griffon', node_uid),
84
            :mac              => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mac')
85 86
          },
          {
87
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'interface'),
88
            :rate             => 1.G,
89 90 91 92
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mounted'),
93 94 95 96
            :bridged          => false,
            :device           => "eth1",
            :vendor           => "intel",
            :version          => "BCM5721",
97 98
            :switch           => net_switch_lookup('nancy','griffon', node_uid, 'eth1'),
            :switch_port      => net_port_lookup('nancy','griffon', node_uid, 'eth1'),
99 100
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'driver'),
            :mac              => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mac')
101 102 103 104
          },
          {
            :interface        => lookup('griffon_manual', node_uid, 'network_interfaces', 'eth2', 'interface'),
            :rate             => 10.G,
105
            :enabled          => false, # see bug 6490,
106
            :management       => lookup('griffon_manual', node_uid, 'network_interfaces', 'eth2', 'management'),
107 108
            :mountable        => false, # see bug 6490,
            :mounted          => false, # see bug 6490,
109 110 111 112 113 114 115 116
            :bridged          => false,
            :device           => "eth2",
            :vendor           => "myrinet",
            :version          => "Myri-10G",
            :driver           => lookup('griffon_manual', node_uid, 'network_interfaces', 'eth2', 'driver'),
            :mac              => lookup('griffon_manual', node_uid, 'network_interfaces', 'eth2', 'mac')
          },
          {
117 118
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'rate'),
119
            :device           => "ib0",
120 121 122 123
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'mounted'),
124
            :vendor           => 'Mellanox',
125 126
            :version          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'version'),
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'driver'),
127
            :network_address  => "#{node_uid}-ib0.#{site_uid}.grid5000.fr",
128 129 130
            :ip               => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'ip'),
            :ip6               => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'ip6'),
            :guid             => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'guid'),
131 132 133 134 135 136
            :switch           => "sgriffonib",
            :ib_switch_card   => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'line_card'),
            :ib_switch_card_pos => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'position'),
            :hwid             => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'hwid')
          },
          {
137 138
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'rate'),
139
            :device           => "ib1",
140 141 142 143
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'mounted'),
144
            :vendor           => 'Mellanox',
145 146 147
            :version          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'version'),
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'driver'),
            :guid             => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'guid')
148 149 150 151 152
          },
          {
            :interface            => 'Ethernet',
            :rate                 => 100.M,
            :network_address      => "#{node_uid}-bmc.#{site_uid}.grid5000.fr",
153 154
            :ip                   => lookup(node_uid, node_uid, 'network_interfaces', 'bmc', 'ip'),
            :mac                  => lookup(node_uid, node_uid, 'network_interfaces', 'bmc', 'mac'),
155 156 157 158 159 160 161 162 163 164 165 166
            :switch               => lookup('griffon_manual', node_uid, 'network_interfaces', 'bmc', 'switch_name'),
            :switch_port          => lookup('griffon_manual', node_uid, 'network_interfaces', 'bmc', 'switch_port'),
            :enabled              => true,
            :mounted              => false,
            :mountable            => false,
            :management           => true,
            :device               => "bmc",
            :vendor               => "Tyan",
            :version              => "M3296"
          }]
	else
          network_adapters [{
167 168 169 170 171 172
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'rate'),
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mounted'),
173 174 175 176
            :bridged          => true,
            :device           => "eth0",
            :vendor           => "intel",
            :version          => "80003ES2LAN",
177
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'driver'),
178
            :network_address  => "#{node_uid}.#{site_uid}.grid5000.fr",
179 180
            :ip               => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'ip'),
            :ip6              => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'ip6'),
181 182
            :switch           => net_switch_lookup('nancy','griffon', node_uid),
            :switch_port      => net_port_lookup('nancy','griffon', node_uid),
183
            :mac              => lookup(node_uid, node_uid, 'network_interfaces', 'eth0', 'mac')
184 185
          },
          {
186
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'interface'),
187
            :rate             => 1.G,
188 189 190 191
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mounted'),
192 193 194 195
            :bridged          => false,
            :device           => "eth1",
            :vendor           => "intel",
            :version          => "BCM5721",
196 197
            :switch           => net_switch_lookup('nancy','griffon', node_uid, 'eth1'),
            :switch_port      => net_port_lookup('nancy','griffon', node_uid, 'eth1'),
198 199
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'driver'),
            :mac              => lookup(node_uid, node_uid, 'network_interfaces', 'eth1', 'mac')
200 201
          },
          {
202 203
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'rate'),
204
            :device           => "ib0",
205 206 207 208
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'mounted'),
209
            :vendor           => 'Mellanox',
210 211
            :version          => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'version'),
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'driver'),
212
            :network_address  => "#{node_uid}-ib0.#{site_uid}.grid5000.fr",
213 214 215
            :ip               => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'ip'),
            :ip6               => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'ip6'),
            :guid             => lookup(node_uid, node_uid, 'network_interfaces', 'ib0', 'guid'),
216 217 218 219 220 221
            :switch           => "sgriffonib",
            :ib_switch_card   => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'line_card'),
            :ib_switch_card_pos => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'position'),
            :hwid             => lookup('griffon_manual', node_uid, 'network_interfaces', 'ib0', 'hwid')
          },
          {
222 223
            :interface        => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'interface'),
            :rate             => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'rate'),
224
            :device           => "ib1",
225 226 227 228
            :enabled          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'enabled'),
            :management       => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'management'),
            :mountable        => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'mountable'),
            :mounted          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'mounted'),
229
            :vendor           => 'Mellanox',
230 231 232
            :version          => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'version'),
            :driver           => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'driver'),
            :guid             => lookup(node_uid, node_uid, 'network_interfaces', 'ib1', 'guid')
233 234 235 236 237
          },
          {
            :interface            => 'Ethernet',
            :rate                 => 100.M,
            :network_address      => "#{node_uid}-bmc.#{site_uid}.grid5000.fr",
238 239
            :ip                   => lookup(node_uid, node_uid, 'network_interfaces', 'bmc', 'ip'),
            :mac                  => lookup(node_uid, node_uid, 'network_interfaces', 'bmc', 'mac'),
240 241 242 243 244 245 246 247 248 249 250
            :switch               => lookup('griffon_manual', node_uid, 'network_interfaces', 'bmc', 'switch_name'),
            :switch_port          => lookup('griffon_manual', node_uid, 'network_interfaces', 'bmc', 'switch_port'),
            :enabled              => true,
            :mounted              => false,
            :mountable            => false,
            :management           => true,
            :device               => "bmc",
            :vendor               => "Tyan",
            :version              => "M3296"
          }]
	end
251

252
        chassis({
253 254 255
          :serial       => lookup(node_uid, node_uid, 'chassis', 'serial_number'),
          :name         => lookup(node_uid, node_uid, 'chassis', 'product_name'),
          :manufacturer => lookup(node_uid, node_uid, 'chassis', 'manufacturer')
256 257 258
        })

        bios({
259 260 261
          :version      => lookup(node_uid, node_uid, 'bios', 'version'),
          :vendor       => lookup(node_uid, node_uid, 'bios', 'vendor'),
          :release_date => lookup(node_uid, node_uid, 'bios', 'release_date')
262 263
        })

264 265 266 267 268 269
        gpu({
          :gpu  => false
        })

        sensors({
          :power => {
270
            :available => true, # Set to true when pdu resources will be declared
Emile Morel's avatar
Emile Morel committed
271 272 273
            :via => {
              :pdu => [ { :uid => lookup('griffon_manual', node_uid, 'pdu', 'pdu_name') } ]
            }
274 275
          }
        })
276

277 278 279
      end
    end
  end # cluster griffon
280
end # nancy