X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Fconfig_wifilab.py;h=4da5c9da43ed463cbbea7b8017d5f6345bb937c4;hb=daa6101bf7c504d89de2eb6bbd06821e2f550539;hp=28101c61697c11b9fc2dd1b228131bd8b95e6a16;hpb=2301e37599405f32fb2431c04ccc3d95ca15a920;p=tests.git diff --git a/system/config_wifilab.py b/system/config_wifilab.py index 28101c6..4da5c9d 100644 --- a/system/config_wifilab.py +++ b/system/config_wifilab.py @@ -1,3 +1,6 @@ +# Thierry Parmentelat +# Copyright (C) 2010 INRIA +# # a configuration module is expected: # (*) to define a config method # (*) that takes two arguments @@ -5,33 +8,98 @@ # (**) TestMain options field # (*) and that returns the new set of plc_specs -onelab="one-lab.org" +# archs & vrefs : +# current focus is to +########## myplc +# (*) run a 32bits myplc +########## multi-arch +# (*) run wlab02 as a plain 32bits node +# (*) try and run 64bits in wlab17 (i.e. bootcd & bootstrapfs) +# which should be achieved by simply adding this node in the 'x86_64' nodegroup +# (*) investigate what it takes to have the slivers on wlab17 run 32bits as well +########## multi-vref +# (*) define slice 'plain' without secific tuning, that should result in f8-based slivers +# (*) define slice 'centos' with its vref set to centos5 +########## manual stuff +# all this would require to +# (*) install bootcd f8-x86_64 +# (*) install bootstrapfs f8-x86_64 +# (*) install noderepo f8-x86_64 +# (*) install noderepo centos5-i386 +# (*) install noderepo centos5-x86_64 +# (*) install vserver centos5-i386 +# (*) and add that to yumgroups.xml +########## unclear stuff +# I'm pretty sure that yum.conf.php still needs hacking, at least for centos5 +########## unclear stuff -# use a model that contains "vmware" to get the node actually started +onelab="onelab.eu" + +# these are real nodes, they dont get started by the framework def nodes(): - return [ {'node_fields': {'hostname': 'wlab02.inria.fr', - 'model':'Dell Latitude 830'}, + node02 = {'name':'wlab02', + 'node_fields': {'hostname': 'wlab02.inria.fr', 'model':'Dell Latitude 830'}, 'owner' : 'pi', 'nodegroups' : 'wifi', - 'network_fields': { 'method':'dhcp', - 'type' : 'ipv4', - 'ip':'138.96.250.162', - }, - 'extra_interfaces' : [ { 'network_fields' : - { 'method' : 'dhcp', - 'type' : 'ipv4', - 'ip' : '138.96.250.212' }, - 'attributes' : - { 'hwaddr' : '00:1c:bf:51:2b:fd', - 'essid' : 'guest-inria-sophia', - }, + 'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.162',}, + 'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'dhcp', + 'type' : 'ipv4', + 'mac' : '00:1B:77:70:F4:C6', + 'ip' : '138.96.250.192', }, + 'settings' : { 'essid' : 'guest-inria-sophia', + 'ifname' : 'wlan0', }, }, ], - }, - ] + } + node17 = {'name':'wlab17', + 'node_fields': {'hostname': 'wlab17.inria.fr', 'model':'Dell Latitude 830'}, + 'owner' : 'pi', + 'nodegroups' : ['wifi','x86_64'] , + 'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.177',}, + 'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'dhcp', + 'type' : 'ipv4', + 'mac' : '00:1c:bf:51:3c:19', + 'ip' : '138.96.250.207',}, + 'settings' : { 'essid' : 'guest-inria-sophia', + 'ifname' : 'wlan0',}, + }, + ], + } + node05 = {'name':'wlab05', + 'node_fields': {'hostname': 'wlab05.inria.fr', 'model':'Dell Latitude 830'}, + 'owner' : 'pi', + 'nodegroups' : 'wifi', + 'interface_fields': { 'method':'dhcp', 'type' : 'ipv4', 'ip':'138.96.250.165',}, + 'extra_interfaces' : [ { 'interface_fields' : { 'method' : 'static', + 'type' : 'ipv4', + 'mac' : '00:1B:77:70:FC:84', + 'ip' : '138.96.250.215', + 'network' : '138.96.0.0', + 'dns1': '138.96.0.10', + 'dns2': '138.96.0.11', + 'broadcast' : '138.96.255.255', + 'netmask' : '255.255.0.0', + 'gateway' : '138.96.248.250',}, + 'settings' : { 'essid' : 'guest-inria-sophia', + 'ifname' : 'wlan0',}, + }, + { 'interface_fields' : { 'method' : 'dhcp', + 'type' : 'ipv4', + 'mac' : '00:20:A6:4E:FF:E6', + 'ip' : '138.96.250.50', + 'hostname' : 'radio40.inria.fr', }, + 'settings' : { 'essid' : 'guest-inria-sophia', + 'ifname' : 'wifi0',}, + }, + ], + } + + + # wlab05 not avail. for now + return [ node02 , node17 ] def all_nodenames (): - return [ node['node_fields']['hostname'] for node in nodes()] + return [ node['name'] for node in nodes()] def users (domain=onelab) : return [ {'name' : 'pi', 'keynames' : [ 'key1' ], @@ -75,7 +143,7 @@ def sites (): 'login_base':'wifi', 'abbreviated_name':'wifi', 'max_slices':100, - 'url':'http://onelab-test.inria.fr', + 'url':'http://test.onelab.eu', }, 'address_fields' : {'line1':'route des lucioles', 'city':'sophia', @@ -88,7 +156,7 @@ def sites (): }] ########## -public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.one-lab.org +public_key="""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFUYyIenmUaeTduMcSqvoYRQ4QnFR1BFdLG8XR9D6FWZ5zTKUgpkew22EVNeqai4IXeWYKyt1Qf3ehaz9E3o1PG/bmQNIM6aQay6TD1Y4lqXI+eTVXVQev4K2fixySjFQpp9RB4UHbeA8c28yoa/cgAYHqCqlvm9uvpGMjgm/Qa4M+ZeO7NdjowfaF/wF4BQIzVFN9YRhvQ/d8WDz84B5Pr0J7pWpaX7EyC4bvdskxl6kmdNIwIRcIe4OcuIiX5Z9oO+7h/chsEVJWF4vqNIYlL9Zvyhnr0hLLhhuk2bw== root@test.onelab.eu """ private_key="""-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEA4jNj8yT9ieEc6nSJz/ESu4fui9WrJ2y/MCfqIZ5WcdVKhBFU @@ -128,50 +196,67 @@ def keys (): def initscripts(): return [ { 'initscript_fields' : { 'enabled' : True, - 'name':'script1', - 'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 1; date) > /tmp/initscript1.log \n ', + 'name':'script_plain', + 'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 1; date) > /tmp/initscript_plain.log \n ', }}, { 'initscript_fields' : { 'enabled' : True, - 'name':'script2', - 'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 2; date) > /tmp/initscript2.log \n ', + 'name':'script_centos', + 'script' : '#! /bin/sh\n (echo Starting test initscript: Stage 2; date) > /tmp/initscript_centos.log \n ', }}, ] def slices (): - return [ { 'slice_fields': {'name':'wifi_slice1', + plain= { 'slice_fields': {'name':'wifi_plain', + 'instantiation':'plc-instantiated', + 'url':'http://foo@foo.com', + 'description':'plain slice', + 'max_nodes':10, + }, + 'usernames' : [ 'pi','tech','techuser' ], + 'nodenames' : all_nodenames(), + 'initscriptname' : 'script_plain', + 'sitename' : 'wifi', + 'owner' : 'pi', + } + centos= { 'slice_fields': {'name':'wifi_centos', 'instantiation':'plc-instantiated', 'url':'http://foo@foo.com', - 'description':'test slice', - 'max_nodes':2 + 'description':'centos slice', + 'max_nodes':10, }, 'usernames' : [ 'pi','tech','techuser' ], 'nodenames' : all_nodenames(), - 'initscriptname' : 'script1', + 'initscriptname' : 'script_centos', 'sitename' : 'wifi', 'owner' : 'pi', - }, + 'vref' : 'centos5', + } ] def plc () : return { + 'index' : index, 'name' : 'wifilab', # as of yet, not sure we can handle foreign hosts, but this is required though - 'hostname' : 'localhost', + 'hostname' : 'wlab24.inria.fr', # set these two items to run within a vserver - # 'vservername': '138.96.250.131' + # 'vservername': 'somename' # 'vserverip': '138.96.250.131' 'role' : 'root', - 'PLC_ROOT_USER' : 'root@bellami.inria.fr', - 'PLC_ROOT_PASSWORD' : 'test++', - 'PLC_NAME' : 'TestLab', - 'PLC_MAIL_ENABLED':'true', - 'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@sophia.inria.fr', - 'PLC_DB_HOST' : 'bellami.inria.fr', - 'PLC_API_HOST' : 'bellami.inria.fr', - 'PLC_WWW_HOST' : 'bellami.inria.fr', - 'PLC_BOOT_HOST' : 'bellami.inria.fr', - 'PLC_NET_DNS1' : '138.96.0.10', - 'PLC_NET_DNS2' : '138.96.0.11', + 'settings': { + 'PLC_ROOT_USER' : 'root@wlab24.inria.fr', + 'PLC_ROOT_PASSWORD' : 'test++', + 'PLC_NAME' : 'WifiLab', + 'PLC_MAIL_ENABLED':'true', + 'PLC_MAIL_SUPPORT_ADDRESS' : 'thierry.parmentelat@inria.fr', + 'PLC_DB_HOST' : 'wlab24.inria.fr', + 'PLC_API_HOST' : 'wlab24.inria.fr', + 'PLC_WWW_HOST' : 'wlab24.inria.fr', + 'PLC_BOOT_HOST' : 'wlab24.inria.fr', + 'PLC_NET_DNS1' : '138.96.0.10', + 'PLC_NET_DNS2' : '138.96.0.11', + 'PLC_DNS_ENABLED' : 'false', + }, 'sites' : sites(), 'keys' : keys(), 'initscripts': initscripts(), @@ -179,4 +264,7 @@ def plc () : } def config (plc_specs,options): + print "config_wifilab is obsolete .." + import sys + sys.exit(1) return plc_specs + [ plc() ]