Changes between Initial Version and Version 1 of Internal/Infrastructure/SetupTestbed/dummyCM2


Ignore:
Timestamp:
Nov 7, 2008, 5:48:08 PM (15 years ago)
Author:
korakis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/Infrastructure/SetupTestbed/dummyCM2

    v1 v1  
     1= How to replace CMC with CMC2 =
     2
     3There is a dummy CMC2 provided by Gridservices2. This service response any request from Nodehandler with a fake positive answer. For example, when Nodehandler inquiry dummy CMC2 the status of specific nodes, dummy CMC2 will always tell Nodehandler the nodes are on even no node is on in testbed. In this situation, dummy CMC2 is not able to reset, boot or turn off nodes and detect the real status of nodes like CMC does.[[BR]]
     4
     5In case you don't have CM cards installed on nodes, you can use dummy CMC2 to make Nodehandler work and manually reboot or nodes.[[BR]]
     6
     7To enable dummy CMC2, you need create a file named "cmcStub.yaml" under "/etc/gridservices2/enabled" or make a symbol link named "cmcStub.yaml" under this path to a real configuration file. Then edit this file like following.[[BR]]
     8{{{
     9  1 ---
     10  2 cmc:
     11  3   # listAll: return array of x/y coodinates of all nodes in '[x,y]' form.
     12  4   # listStatus: return array of x/y coodinates of all nodes in '[x, y, STAT    US]' form.
     13  5   #
     14  6   testbed:
     15  7
     16  8     # These are the configuration parameters for the default testbed
     17  9     # Currently the default testbed is the "indoor" one
     18 10     default:
     19 11       listAll: |
     20 12         (1..10).to_a.map {|i| [i, 2]}
     21 13       listStatus: |
     22 14         (1..10).to_a.map {|i| [i, 2, 'POWERON']}
     23 15
     24 16     # These are the configuration parameters for the "outdoor" testbed
     25 17     outdoor:
     26 18       listAll: |
     27 19         (100..107).to_a.map {|i| [i,0]}
     28 20       listStatus: |
     29 21         (100..107).to_a.map {|i| [i, 0, 'POWERON']}
     30}}}
     31
     32Dummy CMC2 supports node's IP like "10.10.'''x'''.2", which means only '''x''' can be changed to represent different nodes. You can set the other three number according your testbed configuration, such as 198.168.'''x'''.4. [[BR]]
     33Line 12 and 14 define the range of testbed which is from node1-2 to node10-2. You can change "10" to the actual number of nodes in your testbed.[[BR]]
     34
     35You also need to edit the configuration of DHCP and DNS to match nodes' name and IP address, you can refer link [wiki:BOOTB#DHCP here] and [wiki:BOOTB#DNS here]. Some examples are posted below.[[BR]]
     36
     37[[BR]]''/etc/bind/zone.orbit''[[BR]]
     38{{{
     39  1
     40  2 $TTL 3600
     41  3 @           IN SOA services.grid.poly.edu. root.services.grid.poly.edu. (
     42  4                                            2008021817    ; serial
     43  5                                            28800    ; refresh (8hours)
     44  6                                            900      ; retry (15 mins)
     45  7                                            604800   ; expire (1 week)
     46  8                                            86400    ; minimum (1 day)
     47  9                                     );
     48 10 @              IN    NS              services.grid.poly.edu.
     49 11 $ORIGIN in-addr.arpa.
     50 12 $ORIGIN 10.in-addr.arpa.
     51 13 $ORIGIN 0.10.10.in-addr.arpa.
     52 14 $TTL 129600
     53 15 10     IN  PTR    services.grid.poly.edu.
     54 16 10     IN  PTR    console.grid.poly.edu.
     55 17
     56 18 $ORIGIN 1.10.10.in-addr.arpa.
     57 19 9     IN  PTR   rxwarp.grid.poly.edu.
     58 20 8     IN  PTR   windows.grid.poly.edu.
     59 21 1     IN  PTR   node1-1.grid.poly.edu.
     60 22 2     IN  PTR   node1-2.grid.poly.edu.
     61 23 3     IN  PTR   node1-3.grid.poly.edu.
     62 24
     63 25
     64 26 2.2.10.10.in-addr.arpa. IN PTR node2-2.grid.poly.edu.
     65 27 2.3.10.10.in-addr.arpa. IN PTR node3-2.grid.poly.edu.
     66 28
     67 29 $ORIGIN 200.1.10.in-addr.arpa.
     68 30 1     IN  PTR   cmc.grid.poly.edu.
     69}}}
     70
     71[[BR]]''/etc/bind/orbit.zone''[[BR]]
     72{{{
     73  1 $TTL 3600
     74  2 @ IN  SOA services.grid.poly.edu.  root.services.grid.poly.edu. (
     75  3                           2008072501 ; serial
     76  4                           3600       ; refresh (1 hour)
     77  5                           600        ; retry (10 min)
     78  6                           10000      ; expire (2 hours)
     79  7                           3600    );
     80  8                                     ;
     81  9 @        IN    NS        services.grid.poly.edu.
     82 10 $ORIGIN grid.poly.edu.
     83 11 $TTL 129600
     84 12 windows      IN   A       10.10.1.8
     85 13 rxwarp       IN   A       10.10.1.9
     86 14 node1-2      IN   A       10.10.1.2
     87 15 node2-2      IN   A       10.10.2.2
     88 16 node3-2      IN   A       10.10.3.2
     89 17
     90 18 console      IN   A      10.10.0.10
     91 19 cmc          IN   A      10.1.200.1
     92 20
     93 21 services     IN   CNAME  console.grid.poly.edu.
     94 22 dhcp         IN   CNAME  console.grid.poly.edu.
     95 23 frisbee      IN   CNAME  console.grid.poly.edu.
     96 24 pxe          IN   CNAME  console.grid.poly.edu.
     97 25 oml          IN   CNAME  console.grid.poly.edu.
     98 26 repository   IN   CNAME  console.grid.poly.edu.
     99 27 repository1  IN   CNAME  console.grid.poly.edu.
     100 28 repository2  IN   CNAME  console.grid.poly.edu.
     101 29 ntp          IN   CNAME  console.grid.poly.edu.
     102 30 loghost      IN   CNAME  console.grid.poly.edu.
     103 31 idb1         IN   CNAME  console.grid.poly.edu.
     104 32 idb2         IN   CNAME  console.grid.poly.edu.
     105}}}
     106
     107[[BR]]''/etc/dhcp3/dhcpd.conf''
     108{{{
     109# The ddns-updates-style parameter controls whether or not the server will
     110# attempt to do a DNS update when a lease is confirmed. We default to the
     111# behavior of the version 2 packages ('none', since DHCP v2 didn't
     112# have support for DDNS.)
     113ddns-update-style interim;
     114use-host-decl-names on;
     115
     116allow booting;
     117allow bootp;
     118
     119# option definitions common to all supported networks...
     120option domain-name "grid.poly.edu";
     121
     122default-lease-time 259200;
     123max-lease-time 259200;
     124
     125# If this DHCP server is the official DHCP server for the local
     126# network, the authoritative directive should be uncommented.
     127#authoritative;
     128
     129# Use this to send dhcp log messages to a different log file (you also
     130# have to hack syslog.conf to complete the redirection).
     131log-facility local7;
     132
     133subnet 10.10.0.0 netmask 255.255.0.0 {
     134   range 10.10.1.1 10.10.255.254;
     135   option domain-name "grid.poly.edu";
     136   ddns-updates off;
     137   ddns-domainname "grid.poly.edu";
     138   ddns-rev-domainname "in-addr.arpa";
     139   option domain-name-servers 10.10.0.10;
     140   next-server 10.10.0.10;
     141   
     142   host services {hardware ethernet 00:1B:2F:BE:EF:94; fixed-address services.grid.poly.edu;}
     143   host console {hardware ethernet 00:1B:2F:BE:DF:6E; fixed-address console.grid.poly.edu;}
     144
     145  filename "/tftpboot/pxelinux.bin";
     146
     147#node 10.10.x.y
     148
     149   group {
     150       host node1-2 {
     151       hardware ethernet 00:03:2D:08:19:FE;
     152       fixed-address node1-2.grid.poly.edu;
     153       }
     154
     155       host node2-2 {
     156       hardware ethernet  00:03:2D:08:19:EE;
     157       fixed-address node2-2.grid.poly.edu;
     158       }
     159
     160       host node3-2 {
     161       hardware ethernet 00:03:2D:07:67:CE;
     162       fixed-address node1-3.grid.poly.edu;
     163       }
     164   }
     165}
     166}}}
     167
     168[[BR]]After all configuration is done, you need [wiki:resetGS stop Gridservice and reset Gridservice2]. You may also verify if dummy CMC2 is working by opening this URL in web browser.[[BR]]
     169'''http://cmc:5022/cmc/allStatus'''
     170
     171[[BR]]If you use dummy CMC2 to replace CMC, you will not be able to reboot or turn on nodes. Alternatively, you can boot nodes by hand or reboot them with command like "'''ssh root@10.10.1.2 'reboot''''". If nodeagent4 is launched on nodes, a more effective way to reboot them is executing a small experiment script with command "'''omf exec reboot'''". The script looks like following.[[BR]]
     172
     173''reboot.rb''
     174{{{
     175defGroup('mygroup',[1..10,2])
     176whenAllUp() {
     177  allGroups.exec("/sbin/reboot")
     178  wait 2 # wait 2 sec
     179  Experiment.done
     180}
     181}}}
     182
     183[[BR]]This scripts reboot 10 nodes, from node1-2 to node10-2 , at once.