econome.rb 8.61 KB
Newer Older
1
2
3
4
5
6
site :nantes do |site_uid|

  cluster :econome do |cluster_uid|
    model "Dell PowerEdge C6220"
    created_at Time.parse("2014-04-16").httpdate
    kavlan true
7
    production true
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

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

        performance({
          :core_flops => 0,
          :node_flops => 0
        })

        supported_job_types({
          :deploy       => true,
          :besteffort   => true,
          :virtual      => lookup('econome_generated', node_uid, 'supported_job_types', 'virtual')
        })

        architecture({
          :smp_size       => lookup('econome_generated', node_uid, 'architecture', 'smp_size'),
          :smt_size       => lookup('econome_generated', node_uid, 'architecture', 'smt_size'),
          :platform_type  => lookup('econome_generated', node_uid, 'architecture', 'platform_type')
        })

        processor({
          :vendor             => lookup('econome_generated', node_uid, 'processor', 'vendor'),
          :model              => lookup('econome_generated', node_uid, 'processor', 'model'),
          :version            => lookup('econome_generated', node_uid, 'processor', 'version'),
          :clock_speed        => lookup('econome_generated', node_uid, 'processor', 'clock_speed'),
          :instruction_set    => lookup('econome_generated', node_uid, 'processor', 'instruction_set'),
          :other_description  => lookup('econome_generated', node_uid, 'processor', 'other_description'),
          :cache_l1           => lookup('econome_generated', node_uid, 'processor', 'cache_l1'),
          :cache_l1i          => lookup('econome_generated', node_uid, 'processor', 'cache_l1i'),
          :cache_l1d          => lookup('econome_generated', node_uid, 'processor', 'cache_l1d'),
          :cache_l2           => lookup('econome_generated', node_uid, 'processor', 'cache_l2'),
          :cache_l3           => lookup('econome_generated', node_uid, 'processor', 'cache_l3')
        })

        main_memory({
          :ram_size     => lookup('econome_generated', node_uid, 'main_memory', 'ram_size'),
          :virtual_size => nil
        })

        operating_system({
49
50
51
52
          :name     => "debian",
          :release  => "Wheezy",
          :version  => "7",
          :kernel   => "3.2.0-4-amd64"
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
        })

        storage_devices [{
          :interface => 'SATA',
          :driver    => "ahci",
          :device    => lookup('econome_generated', node_uid, 'block_devices' ,'sda', 'device'),
          :size      => lookup('econome_generated', node_uid, 'block_devices' ,'sda', 'size'),
          :model     => lookup('econome_generated', node_uid, 'block_devices' ,'sda', 'model'),
          :rev       => lookup('econome_generated', node_uid, 'block_devices', 'sda', 'rev'),
        }]

        network_adapters [        {
          :interface        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'interface'),
          :network_address  => "#{node_uid}.#{site_uid}.grid5000.fr",
          :ip               => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'ip'),
          :rate             => 10.G,
          :device           => "eth0",
          :enabled          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'enabled'),
          :management       => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'management'),
          :mountable        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'mountable'),
          :mounted          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'mounted'),
          :bridged          => true,
          :vendor           => "Intel",
          :version          => '82599EB 10-Gigabit SFI/SFP+ Network Connection',
          :driver           => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'driver'),
          :mac              => lookup('econome_generated', node_uid, 'network_interfaces', 'eth0', 'mac'),
79
80
          :switch_port      => net_port_lookup('nantes', 'econome', node_uid, 'eth0'),
          :switch           => net_switch_lookup('nantes', 'econome', node_uid, 'eth0'),
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
        },
        {
          :interface        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'interface'),
          :rate             => 10.G,
          :rate             => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'rate'),
          :enabled          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'enabled'),
          :management       => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'management'),
          :mountable        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'mountable'),
          :mounted          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'mounted'),
          :bridged          => false,
          :device           => "eth1",
          :vendor           => "Intel",
          :version          => '82599EB 10-Gigabit SFI/SFP+ Network Connection',
          :driver           => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'driver'),
          :mac              => lookup('econome_generated', node_uid, 'network_interfaces', 'eth1', 'mac')
        },
        {
          :interface        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'interface'),
          :rate             => 1.G,
          :enabled          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'enabled'),
          :management       => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'management'),
          :mountable        => false,
          :mounted          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'mounted'),
          :bridged          => false,
          :device           => "eth2",
          :vendor           => "Intel",
          :version          => "Intel Corporation",
          :driver           => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'driver'),
          :mac              => lookup('econome_generated', node_uid, 'network_interfaces', 'eth2', 'mac'),
        },
        {
          :interface        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'interface'),
          :rate             => 1.G,
          :enabled          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'enabled'),
          :management       => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'management'),
          :mountable        => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'mountable'),
          :mounted          => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'mounted'),
          :bridged          => false,
          :device           => "eth3",
          :vendor           => "Intel",
          :version          => "Intel Corporation",
          :driver           => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'driver'),
          :mac              => lookup('econome_generated', node_uid, 'network_interfaces', 'eth3', 'mac')
        },
        {
          :interface            => 'Ethernet',
          :network_address  => "#{node_uid}-bmc.#{site_uid}.grid5000.fr",
          :rate                 => 1.G,
          :network_address      => "#{node_uid}-bmc.#{site_uid}.grid5000.fr",
          :ip                   => lookup('econome_generated', node_uid, 'network_interfaces', 'bmc', 'ip'),
          :mac                  => lookup('econome_generated', node_uid, 'network_interfaces', 'bmc', 'mac'),
          :enabled              => true,
          :mounted              => false,
          :mountable            => false,
          :management           => true,
          :device               => "bmc",
        }]


        chassis({
          :serial       => lookup('econome_generated', node_uid, 'chassis', 'serial_number'),
          :name         => lookup('econome_generated', node_uid, 'chassis', 'product_name'),
          :manufacturer => lookup('econome_generated', node_uid, 'chassis', 'manufacturer')
        })

        bios({
          :version      => lookup('econome_generated', node_uid, 'bios', 'version'),
          :vendor       => lookup('econome_generated', node_uid, 'bios', 'vendor'),
          :release_date => lookup('econome_generated', node_uid, 'bios', 'release_date')
        })

        gpu({
          :gpu => false
        })

        monitoring({
          :wattmeter => false,
        })

        sensors({
          :power => {
            :available => false,
          }
        })

      end
    end
  end
end