move vplc instances to buzzcocks - that is also the build box
[tests.git] / system / LocalSubstrate.inria.py
1 #!/usr/bin/python3 -u
2 # -*- python3 -*-
3 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
4 # Copyright (C) 2015 INRIA 
5 #
6 # this is only an example file
7 # the actual file is installed in your testmaster box as /root/LocalTestResources.py
8
9
10 if __name__ == '__main__':
11    import sys, os.path
12    sys.path.append(os.path.expanduser("~/git-tests/system"))
13
14 from Substrate import Substrate
15
16 # domain name .pl.sophia.inria.fr is implicit on our network
17 class OnelabSubstrate (Substrate):
18
19    def test_box_spec (self):
20       return 'testmaster'
21
22    # the experimental lxc-based build box
23    def build_lxc_boxes_spec (self):
24 # liquid only used for the last f18 build      
25       return [ 'buzzcocks', 'liquid' ]
26
27    # the lxc-capable box for PLCs
28    def plc_lxc_boxes_spec (self):
29       return [ 
30 # gotan looks in bad shape and I can't use its drac from the US
31 #         ('gotan', 20),         # how many plcs max in this box 
32          ('buzzcocks', 12),    
33          ]  
34
35    # vplc01 to 40
36    def vplc_ips (self):
37       return [  ( 'vplc{:02d}'.format(i),       # DNS name
38                   'unused')                     # MAC address 
39                 for i in range(1,41) ] 
40
41    def qemu_boxes_spec (self):
42       return [ # (hostname, how many qemus max in this box)
43          ('boxtops', 12),
44          ]
45
46 # these boxes are going on a well deserved retirement
47 # as of jan 2014 this is renumbered so that 1 is preferred
48 # speedball (1) - old school but robust and a big disk
49 #         ('speedball', 2), # 4 cores, 4Gb, 840 Gb
50 # used to have kruder too, but it is broken/dead
51 # dorfmeister (2)
52 #         ('dorfmeister', 2), # 4 cores, 4Gb
53 # enfoui - L119 as it won't work well under the KVM in L102A
54 # use F10 to enter BIOS setup
55 # nodes spawned in this box won't get network connectivity
56 #         ('enfoui', 4), # 4 cores, 8Gb
57 # estran (4) - big mem but small disk
58 # take it out because it takes much of the load and then gets full..
59 #         ('estran', 2), # 4 cores, 8Gb
60 # lodos (5) - rather old/small
61 #         ('lodos', 1), # 2 cores, 4Gb
62 # cyblok (6)        
63 #         ('cyblok', 1), # 2 cores, 4Gb
64
65    # the nodes pool has a MAC address as user-data (3rd elt in tuple)
66    def vnode_ips (self):
67       return [ ( 'vnode{:02d}'.format(i),            # DNS name               
68                  '02:34:56:00:00:{:02d}'.format(i))  # MAC address
69                for i in range(1,21) ] 
70    
71    # local network settings
72    def domain (self):
73       return 'pl.sophia.inria.fr'
74
75    def network_settings (self):
76       return { 'interface_fields:gateway':      '138.96.112.250',
77                'route_fields:next_hop':         '138.96.112.250',
78                'interface_fields:network':      '138.96.112.0',
79                'interface_fields:broadcast':    '138.96.119.255',
80                'interface_fields:netmask':      '255.255.248.0',
81                'interface_fields:dns1':         '138.96.112.1',
82                'interface_fields:dns2':         '138.96.112.2',
83                'node_fields_nint:dns':          '138.96.112.1,138.96.112.2',
84                'ipaddress_fields:netmask':      '255.255.248.0',
85                }
86
87 # the hostname for the testmaster - in case we'd like to run this remotely
88    def testmaster (self): 
89       return 'testmaster'
90
91 local_substrate = OnelabSubstrate ()
92
93 if __name__ == '__main__':
94    local_substrate.main()