| 150 | |
| 151 | == Manually adding non-standard nodes == |
| 152 | === Create the node type === |
| 153 | |
| 154 | See the section on node types |
| 155 | === Create the nodes manually === |
| 156 | |
| 157 | Connect to the MySQL database on boss (typically tbdb). |
| 158 | |
| 159 | {{{ |
| 160 | mysql> insert into nodes (node_id, type, phys_nodeid, role) values ("juniper1", "junpier", "juniper1", "testnode"); |
| 161 | }}} |
| 162 | |
| 163 | Update the other fields in the node table for this new type of node: |
| 164 | |
| 165 | {{{ |
| 166 | mysql> update nodes set inception=now(), def_boot_path='', def_boot_cmd_line='', next_boot_path='', pxe_boot_path='', rpms='', deltas='', tarballs='', startupcmd='', startstatus='none', bootstatus='unknown', status='', status_timestamp='', failureaction='fatal', eventstate='ISUP', state_timestamp=now(), op_mode='MINIMAL', op_mode_timestamp=now(), allocstate='FREE_DIRTY', allocstate_timestamp=now(), next_op_mode='', ipodhash='' where type="juniper"; |
| 167 | }}} |
| 168 | |
| 169 | Set the node status to up for the newly created nodes: |
| 170 | |
| 171 | {{{ |
| 172 | mysql> insert into node_status values ('juniper1', 'up', NULL); |
| 173 | }}} |
| 174 | |
| 175 | |
| 176 | === Create Interface Table Entries === |
| 177 | |
| 178 | Card is typically incremented and port is always 1 for testbed nodes (I know, confusing). |
| 179 | |
| 180 | {{{ |
| 181 | mysql> insert into interfaces (node_id, card, port, interface_type, iface, role) values ("juniper1", 1, 1, "fop", "eth0", "expt"); |
| 182 | mysql> insert into interfaces (node_id, card, port, interface_type, iface, role) values ("juniper1", 2, 1, "fop", "eth1", "expt"); |
| 183 | }}} |
| 184 | |
| 185 | We must also setup the interface state table: |
| 186 | |
| 187 | {{{ |
| 188 | mysql> insert into interface_state (node_id, card, port, iface) values (\"juniper1", 1, 1, "eth0"); |
| 189 | mysql> insert into interface_state (node_id, card, port, iface) values (\"juniper1", 2, 1, "eth1"); |
| 190 | }}} |
| 191 | |
| 192 | === Create the Wires Table Entries === |
| 193 | |
| 194 | Lets say our juniper has two ports on card 2 of our switch on ports 23 and 24: |
| 195 | |
| 196 | {{{ |
| 197 | mysql> insert into wires (node_id1, node_id2, type, card1, port1, card2, port2) values ("juniper1", "hp1", "Node", 1, 1, 2, 23); |
| 198 | mysql> insert into wires (node_id1, node_id2, type, card1, port1, card2, port2) values ("juniper1", "hp1", "Node", 2, 1, 2, 24); |
| 199 | }}} |
| 200 | |
| 201 | === Add in entries for power and serial connectivity === |
| 202 | |