Changes between Version 23 and Version 24 of Installation/Nodes


Ignore:
Timestamp:
Jul 25, 2011 7:02:50 AM (13 years ago)
Author:
jhickey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Installation/Nodes

    v23 v24  
    99 * [http://en.wikipedia.org/wiki/Preboot_Execution_Environment Preboot Execution Environment on Wikipedia]
    1010 * [http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=19186 Intel PXE firmware and utilities]
    11 
    12 = Adding information about your switch, power controller, and serial lines to the database =
    13 
    14 == Setting up your Switch ==
    15 
    16 === Creating switch node and interface types ===
    17 
    18 In order to add our switch to the database, we need to setup node and interface types for them.
    19 
    20 We provide some SQL to make this easy.  The script switch-types-create defines the following:
    21 
    22  * Node types for hp5412 (which included hp5406), hp2810, and nortel5510 switch types.
    23  * Interfaces for generic inter-switch trunks (if your site has more than one switch) named "trunk_100MbE", "trunk_1GbE", and "trunk_10GbE".
    24 
    25 For other switch types, please refer to the [https://users.emulab.net/trac/emulab/wiki/install/switches-db.html Emulab Documentation].
    26 
    27 These are now loaded by the boss-install script, but if you need to load them by hand:
    28 
    29 {{{
    30 mysql tbdb < ~<builduser>/testbed/sql/interface-types-create.sql
    31 mysql tbdb < ~<builduser>/testbed/sql/switch-types-create.sql
    32 }}}
    33 
    34 === Adding your switch to DNS ===
    35 
    36 Your switch needs a name that resolves.  You must add it either to /etc/hosts or to the name server running on boss.
    37 
    38 To add it to the name server, add it into /etc/namedb/<yoursitename>.internal.db.head. 
    39 You then refresh the DNS server by running /usr/testbed/sbin/named_setup. 
    40 
    41 For example, on mini-isi.deterlab.net we have our switch that we will name hp1 at 192.168.254.1 on the HARDWARE_CONTROL network.  So we add it to DNS as follows:
    42 
    43 {{{
    44 [jhickey@boss ~]$ sudo su -
    45 boss# echo "hp1    IN A 192.168.254.1" >> /etc/namedb/mini-isi.deterlab.net.internal.db.head
    46 boss# logout
    47 [jhickey@boss ~]$ /usr/testbed/sbin/named_setup
    48 [jhickey@boss ~]$ ping -c 1 hp1
    49 PING hp1.mini-isi.deterlab.net (192.168.254.1): 56 data bytes
    50 64 bytes from 192.168.254.1: icmp_seq=0 ttl=63 time=3.496 ms
    51 
    52 --- hp1.mini-isi.deterlab.net ping statistics ---
    53 1 packets transmitted, 1 packets received, 0.0% packet loss
    54 round-trip min/avg/max/stddev = 3.496/3.496/3.496/0.000 ms
    55 [jhickey@boss ~]$
    56 }}}
    57 
    58 
    59 === Adding in your switches to the database ===
    60 
    61 Using the hostname you have given your switch, insert a line in the the nodes table in the database.  If you are adding a dedicated control network switch, use '''ctrlswitch''' as the role.  Otherwise, the role is '''testswitch'''.
    62 
    63 {{{
    64 insert into nodes set node_id='hp1',phys_nodeid='hp1',type='hp2180',role='testswitch';
    65 }}}
    66 
    67 === Switch Interconnects ===
    68 
    69 If your installation has more than one switch, we need to tell the database about it so that vlan trunking can be enabled and so that it doesn't try to oversubscribe the link.  We created interface types earlier in this document.  Let's say we have hp1 and hp2 which are connected by a single 1GbE link.  hp2 module A, port 5 is connected to hp1 module B, port 23.  We need to add two lines to the interfaces table (note that current_speed is in Mbits now):
    70 
    71 {{{
    72 insert into interfaces set
    73           node_id='hp1',card=2,port=23,mac='000000000000',iface='B/23',role='other',
    74           current_speed='1000',interface_type='trunk_1GbE',uuid=UUID();
    75 insert into interfaces set
    76           node_id='hp2',card=1,port=5,mac='000000000000',iface='A/5',role='other',
    77           current_speed='1000',interface_type='trunk_1GbE',uuid=UUID();
    78 }}}
    79 
    80 We also need to add an entry to the wires table for these two switches:
    81 
    82 {{{
    83 insert into wires set
    84           node_id1='hp1',card1=2,port1=23,
    85           node_id2='hp2',card2=1,port2=5,
    86           type='Trunk';
    87 }}}
    88 
    89 '''Note:''' For switches that are not modular, set card to 1.  For Ethernet interfaces, card starts at (and typically is) 0.
    90 
    91 === Setting up Switch Stacks ===
    92 
    93 The idea of switch stacks comes from sites that run separate control and experimental networks.  In this scenario, it does not make sense to create experimental vlans on switches that function only as control network switches and vice versa.  The typical DETER deployment scenario will be a switch that handles both.  In this case, we add the same switch to the two different stacks ('Experiment' and 'Control' which we also have to setup in switch_stack_types).  We also make sure that is_primary is set to 1 for the Experimental stack line and 0 for the Control stack line (I assume so that we only try creating vlans once per switch).
    94 
    95 First, create our switch_stack_types.  For our mini-isi setup, we have the two types:
    96 
    97 {{{
    98 insert into switch_stack_types (stack_id, stack_type, snmp_community, leader) values ('Control', 'generic', 'private', 'hp1');
    99 insert into switch_stack_types (stack_id, stack_type, snmp_community, leader) values ('Experiment', 'generic', 'private', 'hp1');
    100 }}}
    101 
    102 So in our mini-isi example, we need to add in two entries for our switch hp1:
    103 
    104 {{{
    105 insert into switch_stacks (node_id,stack_id,is_primary)
    106 values
    107 ('hp1','Experiment',1),
    108 ('hp1','Control',0);
    109 }}}
    110 
    111 === Testing your switch stack ===
    112 
    113 On boss, run '''wap snmpit -l -l''' to list all vlans.  For example, your output should look something like this (right now there might be some MIB warnings):
    114 
    115 {{{
    116 
    117 [jhickey@boss ~]$ wap snmpit -l -l
    118 VLAN     Project/Experiment VName     Members
    119 --------------------------------------------------------------------------------
    120 CONTROLH                    CONTROLHW hp1.1/3 hp1.1/4 hp1.1/5
    121 CONTROL                     CONTROL   hp1.1/3 hp1.1/6 hp1.1/7 hp1.1/8 hp1.1/9
    122                                       hp1.1/10 hp1.1/11 hp1.1/12
    123 INTERNET                    INTERNET  hp1.1/1 hp1.1/2 hp1.1/3
    124 BOSS                        BOSS      hp1.1/3
    125 [jhickey@boss ~]$
    126 }}}
    127 
    128 
    129 == Setting up your power controller ==
    130 
    131 === Adding the power controller to DNS ===
    132 
    133 This is pretty much the same as with the switch above.  Technically, you can get away without this step since the IP address will also be in the database, but it is good housekeeping.
    134 
    135 For example, on mini-isi.deterlab.net we have our switch that we will name apc23 at 192.168.254.23 on the HARDWARE_CONTROL network.  So we add it to DNS as follows:
    136 
    137 {{{
    138 [jhickey@boss ~]$ sudo su -
    139 boss# echo "apc23    IN A 192.168.254.23" >> /etc/namedb/mini-isi.deterlab.net.internal.db.head
    140 boss# logout
    141 [jhickey@boss ~]$ /usr/testbed/sbin/named_setup
    142 [jhickey@boss ~]$ ping -c 1 apc23
    143 PING apc23.mini-isi.deterlab.net (192.168.254.23): 56 data bytes
    144 64 bytes from 192.168.254.23: icmp_seq=0 ttl=254 time=3.476 ms
    145 
    146 --- apc23.mini-isi.deterlab.net ping statistics ---
    147 1 packets transmitted, 1 packets received, 0.0% packet loss
    148 round-trip min/avg/max/stddev = 3.476/3.476/3.476/0.000 ms
    149 }}}
    150 
    151 === Adding the power controller to the database ===
    152 
    153 We assume you are using an APC 7902 networked power controller.  The default node_type for this is 'APC'.
    154 
    155 Now add in a node entry for the power controller.  For mini-isi, our power controller is named apc23:
    156 
    157 {{{
    158 insert into nodes set node_id='apc23', phys_nodeid='apc23', type='APC', role='powerctrl';
    159 }}}
    160 
    161 Now add a line to the interfaces table.  For mini-isi, the power controller is at 192.168.254.23:
    162 
    163 {{{
    164 insert into interfaces set node_id='apc23',
    165                            IP='192.168.254.23', mask='255.255.255.0',
    166                            interface_type='fxp', iface='eth0', role='other';
    167 }}}
    168 
    169 Now, finally we need a wires table entry:
    170 
    171 {{{
    172 insert into wires set node_id1='apc23', card1=0, port1=1,
    173                       node_id2='hp1', card2=1, port2=4,
    174                       type='Control';
    175 }}}
    176 
    177 === Telling the database about the power controller ports ===
    178 
    179 This is jumping the gun since we have not gotten to the point of adding PC type nodes to the testbed yet, but when we do, they will go in the '''outlets''' table.
    180 
    181 {{{
    182 mysql> describe outlets;
    183 +------------+---------------------+------+-----+-------------------+-------+
    184 | Field      | Type                | Null | Key | Default           | Extra |
    185 +------------+---------------------+------+-----+-------------------+-------+
    186 | node_id    | varchar(32)         | NO   | PRI |                   |       |
    187 | power_id   | varchar(32)         | NO   |     |                   |       |
    188 | outlet     | tinyint(1) unsigned | NO   |     | 0                 |       |
    189 | last_power | timestamp           | NO   |     | CURRENT_TIMESTAMP |       |
    190 +------------+---------------------+------+-----+-------------------+-------+
    191 4 rows in set (0.00 sec)
    192 }}}
    193 
    194 So to add, say pc001 which is on apc23 port 1, we would do:
    195 
    196 {{{
    197 insert into outlets set node_id='pc001', power_id='apc23', outlet=1;
    198 }}}
    199 
    200 You can add in a dummy entry and test if you like.
    201 
    202 == Setting up your serial server ==
    203 
    204 TBD.  We hope to have a VMWare image with the necessary software for DigiEtherlite devices soon.
    20511
    20612= Setting up the PXE environment on boss =