Changes between Initial Version and Version 1 of BBN_Emulab


Ignore:
Timestamp:
07/15/09 15:32:08 (15 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BBN_Emulab

    v1 v1  
     1These pages describe integration work carried out by [mailto:czhang@bbn.com Chunhui (Evan) Zhang] as part of a GENI Internship at BBN Technologies.  Feedback and comments are welcome!
     2
     3
     4== Project Goals ==
     5
     6
     71. Set up a BBN Emulab instance as aggregate manager of BBN Emulab aggregate and associate with Utah ProtoGENI clearing house.
     8
     92. Evaluate the design and implementation of ProtoGENI in this environment, and document the experience for others in GENI.
     10
     11
     12== Related Documnets ==
     13
     14http://groups.geni.net/geni/wiki/ProtoGENI-1Q09-status
     15
     16https://www.protogeni.net/trac/protogeni/wiki/BecomingAProtoGENISite
     17
     18ProtoGENI Clearing House Installation Document: http://www.protogeni.net/trac/protogeni/wiki/InstallingAClearingHouse
     19
     20Instructions for enabling the AM APIs on an Emulab installation: https://www.protogeni.net/trac/protogeni/wiki/ProtoGENIInstall
     21
     22Emulab Installation Document: http://users.emulab.net/trac/emulab/wiki/InstallDocs
     23
     24
     25== Overall ProtoGENI Building Strategy ==
     26
     271. Run 'Boss' and 'Ops' as virtual machine on top of a physical machine.
     28
     292. Set up BBN Clearinghouse and BBN Emulab with one experiment node inside BBN firewall first.
     30
     313. Then rebuild the BBN Emulab outside the firewall with public IPs and federate it with Utah clearing house.
     32
     33
     34== Status Report and related instructions ==
     35
     361. '''Joined Utah 'geni' project on www.emulab.net''' -- ''Completed'' (5 June, 2009)
     37
     38   Became a member of ProtoGENI developer's group in order to get updated information and ability to login to www.protogeni.net
     39
     402. '''Requested for a account on Utah's CVS server''' -- ''Completed'' (8 June, 2009)
     41
     42   In order to check out the latest Emulab code(including the ProtoGENI code). Instructions.[http://users.emulab.net/trac/emulab/wiki/kb270]. 
     43
     443. '''Talked with Harry and Heidi to make concrete building plan and arrange the hardware resources''' -- ''Completed'' (22 June, 2009)
     45
     46   '''''First Stage BBN ProtoGENI Plan,'''''
     47
     48   [[Image(intern_plan.jpg)]]
     49[[BR]]
     50[[BR]]
     51
     52   '''''Second Stage BBN ProtoGENI Plan (May not necessary),'''''
     53
     54   [[Image(intern_plan2.jpg)]]
     55[[BR]]
     56[[BR]]
     57
     58   '''''Detailed Internal configuration for 'First Stage''''''
     59
     60   [[Image(protogeni_local_new.jpg)]]
     61[[BR]]
     62[[BR]]
     63
     64
     654. '''Basic software installation''' -- ''Completed'' (10 June, 2009)
     66
     67   Installed Fedora 10 x86_32bit (updated to kernel 2.6.27.24-170.2.68.fc10.i686) on host machine.[[BR]]
     68   Installed [http://www.virtualbox.org/wiki/Linux_Downloads VirtualBox] for Fedora 10 32bit on emulabhost machine.[[BR]]
     69 Step 1:  Download the software
     70 {{{
     71 [root@geni-emuhost software]# wget http://download.virtualbox.org/virtualbox/2.2.4/VirtualBox-2.2.4_47978_fedora9-1.i386.rpm
     72 }}}
     73
     74 Step 2: Install the dependencies
     75 {{{
     76 [root@geni-emuhost software]# yum -y install kernel-devel qt qt-x11
     77 }}}
     78
     79 Step 3: Install the Virtualbox
     80 {{{
     81 [root@geni-emuhost software]# rpm -ivh VirtualBox-2.2.4_47978_fedora9-1.i386.rpm
     82  Preparing...                ########################################### [100%]
     83    1:VirtualBox             ########################################### [100%]
     84
     85 Creating group 'vboxusers'. VM users must be member of that group!
     86
     87 No precompiled module for this kernel found -- trying to build one. Messages
     88 emitted during module compilation will be logged to /var/log/vbox-install.log.
     89
     90 Success!
     91
     92 }}}
     93[[BR]]
     94[[BR]]
     95
     96
     97   
     985. '''Virtual machine (FreeBSD guest) installation and virtual network design''' -- ''Completed'' (26 June, 2009)
     99   
     100   Reference:
     101              http://users.emulab.net/trac/emulab/wiki/install/fs-freebsd.html [[BR]]
     102              http://users.emulab.net/trac/emulab/wiki/install/ops-freebsd.html [[BR]]
     103              http://users.emulab.net/trac/emulab/wiki/install/boss-freebsd.html
     104
     105   Installed three freeBSD virtual machines:
     106
     107     'clearing house' with ip 192.168.56.2(em1),[[BR]]
     108     'boss'           with ip 192.168.56.3(em1),[[BR]]
     109     'ops'            with ip 192.168.56.4(em1)
     110
     111   '''Installation Instructions.''' [wiki:BBN_Emulab/freebsdInstall]
     112
     113   All above NICs 'em1' are bridged to the host machine's NIC eth1.
     114
     115   Now we need(required by the Emulab installation process) a network for above servers to access internet. So we do,
     116
     117     'clearing house' with ip 128.89.80.197(em0),[[BR]]
     118     'boss'           with ip 128.89.80.195(em0),[[BR]]
     119     'ops'            with ip 128.89.80.196(em0)
     120
     121   All above NICs 'em0' are bridged to the host machine's NIC eth0.
     122
     123   At this point, we still need a mechanism to allow those virtual machines to access the host's hard disk so that virtual machines can access the software they need.
     124   I plan to use the 'shared folder' function provided by [http://www.virtualbox.org VirtualBox].(Doesn't work with FreeBSD guest!!!). Other plans: use third virtual NIC to build a 'host-only' network.
     125   
     126     "host"           with ip 192.168.57.1(vboxnet0),[[BR]]
     127     'clearing house' with ip 192.168.57.2(em2),[[BR]]
     128     'boss'           with ip 192.168.57.3(em2),[[BR]]
     129     'ops'            with ip 192.168.57.4(em2)
     130
     131
     132   '''Tip 1:''' You have two ways to change the IP address permanently in FreeBSD.
     133     
     134      1) Use command 'sysinstall' --> 'Configure' --> 'Networking' --> 'Interfaces', then change the IP.[[BR]]
     135      2) Edit /etc/rc.conf, add 'ifconfig_em1="inet 192.168.57.2 netmask 255.255.255.0"' for example.
     136
     137      Finally, you need to do '/etc/rc.d/netif restart' to take the change into effect (You have to reboot if it failed to make change).
     138
     139   '''Tip 2:''' use 'scp root@192.168.57.1:/home/czhang/protogeni/software/testbed.tgz /root/protogeni' inside vm to copy stuff from host.
     140[[BR]]
     141[[BR]]
     142
     1436. '''Build Private BBN Emulab and federate with Utah Clearing House''' -- ''Completed'' (13 July, 2009)
     144[[BR]]
     145
     146 A). '''Build 'Ops' server'''
     147
     148 Reference:
     149
     150 http://users.emulab.net/trac/emulab/wiki/install/ops-emusoft.html
     151
     152 '''Step 1:''' Get the required software from http://users.emulab.net/trac/emulab/wiki/install/required_software.html and cvs-public.flux.utah.edu
     153 On host:
     154 {{{
     155 # cd /home/czhang/protogeni/software
     156 # wget http://www.emulab.net/downloads/FreeBSD-6.3-20080901.tar.gz
     157 # wget http://www.emulab.net/downloads/ports-20080901.tar.gz
     158 # cvs -d cvs-public.flux.utah.edu:/flux/CVS checkout testbed
     159 # tar zcvf testbed.tgz testbed //make it easier to copy to VM later
     160 }}}
     161
     162 '''Step 2:''' Make some required folders on 'Ops'
     163 {{{
     164 # mkdir /users /proj /groups
     165 }}}
     166 
     167 '''Step 3:''' Create a folder on 'Ops' to put the required software.
     168 {{{
     169 # mkdir /root/protogeni
     170 }}}
     171
     172 '''Step 4:''' Copy required software from host.
     173 {{{
     174 # scp root@192.168.57.1:/home/czhang/protogeni/software/testbed.tgz /root/protogeni
     175 # scp root@192.168.57.1:/home/czhang/protogeni/software/FreeBSD-6.3-20080901.tar.gz /root/protogeni
     176 # scp root@192.168.57.1:/home/czhang/protogeni/software/ports-20080901.tar.gz /root/protogeni 
     177 }}}
     178
     179 '''Step 5:''' Install perl and python on 'Ops'
     180 {{{
     181 # cd /root/protogeni
     182 # tar xvf FreeBSD-6.3-20080901.tar.gz //it produces folder 'packages'
     183 # cd /root/protogeni/packages
     184 # pkg_add perl-5.8.8_1.tbz
     185 # ln -s /usr/local/bin/perl5.8.8 /usr/bin/perl
     186 # pkg_add python25-2.5.1_1.tbz
     187 }}}
     188
     189 '''Step 6:''' Install 'ops' packages
     190 {{{
     191 # cd /root/protogeni
     192 # pkg_add emulab-ops-2.1.tbz
     193 }}}
     194 
     195 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     196
     197 '''Step 7:''' Prepare 'defs-bbn-emulab' file.
     198 {{{
     199 # mkdir -p /usr/testbed/src
     200
     201 # cd /usr/testbed/src
     202 # tar xvf /root/protogeni/testbed.tgz
     203
     204 # cd /usr/testbed/src/testbed
     205 # cp defs-example-privatecnet defs-bbn-emulab
     206 # vi defs-bbn-emulab
     207 }}}
     208 My ''''defs-bbn-emulab'''' [attachment:wiki:BBN_Emulab:defs-bbn-emulab].
     209
     210 '''Step 8:''' Run 'configure'.
     211 {{{
     212 # mkdir -p /usr/testbed/obj/testbed
     213 # cd /usr/testbed/obj/testbed
     214 # /usr/testbed/src/testbed/configure --with-TBDEFS=/usr/testbed/src/testbed/defs-bbn-emulab
     215 }}}
     216 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     217
     218 '''Step 9:''' Run the ops installation script
     219 {{{
     220 # cd /usr/testbed/obj/testbed/install
     221 # /usr/bin/perl ops-install -p /root/protogeni/packages
     222 }}}
     223 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     224
     225 '''Step 10:''' Install Emulab software from source
     226 {{{
     227 # cd /usr/testbed/obj/testbed
     228 # /usr/local/bin/gmake ops-install
     229 }}}
     230 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     231[[BR]]
     232
     233 B). '''Build 'Boss' server and protogeni support'''
     234
     235 Reference:
     236
     237 http://users.emulab.net/trac/emulab/wiki/install/boss-emusoft.html [[BR]]
     238 https://www.protogeni.net/trac/protogeni/wiki/ProtoGENIInstall
     239
     240 '''Step 1:''' Create a folder in 'Boss' VM to put the required software.
     241 {{{
     242 # mkdir /root/protogeni
     243 }}}
     244
     245 '''Step 2:''' Copy required software from host.
     246 {{{
     247 # scp root@192.168.57.1:/home/czhang/protogeni/software/testbed.tgz /root/protogeni
     248 # scp root@192.168.57.1:/home/czhang/protogeni/software/FreeBSD-6.3-20080901.tar.gz /root/protogeni
     249 # scp root@192.168.57.1:/home/czhang/protogeni/software/ports-20080901.tar.gz /root/protogeni
     250 }}}
     251
     252 '''Step 3:''' Install perl and python on 'Boss'.
     253 {{{
     254 # cd /root/protogeni
     255 # tar xvf FreeBSD-6.3-20080901.tar.gz //it produces folder 'packages'
     256 # cd /root/protogeni/packages
     257 # pkg_add perl-5.8.8_1.tbz
     258 # ln -s /usr/local/bin/perl5.8.8 /usr/bin/perl
     259 # pkg_add python25-2.5.1_1.tbz
     260 # pkg_add rsync-2.6.9_2.tbz
     261 }}}
     262
     263 '''Step 4:''' Prepare 'defs-bbn-emulab' file.
     264 {{{
     265 # mkdir -p /usr/testbed/src
     266
     267 # cd /usr/testbed/src
     268 # tar xvf /root/protogeni/testbed.tgz
     269
     270 # scp root@192.168.57.4:/usr/testbed/src/testbed/defs-bbn-emulab /usr/testbed/src/testbed/   //copy from 'Ops'
     271 }}}
     272 My ''''defs-bbn-emulab'''' [attachment:wiki:BBN_Emulab:defs-bbn-emulab].
     273
     274 '''Tips''': I choose to not enable ProtoGENI support when installing the regular Emulab. Enable it when installing ProtoGENI.
     275
     276 '''Step 5:''' Install 'boss' packages.
     277 {{{
     278 # cd /root/protogeni
     279 # pkg_add emulab-boss-2.1.tbz
     280 }}}
     281 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     282
     283
     284 '''Step 6:''' Run 'configure' and apply named patch.
     285 {{{
     286 # mkdir -p /usr/testbed/obj/testbed
     287 # cd /usr/testbed/obj/testbed
     288 # /usr/testbed/src/testbed/configure --with-TBDEFS=/usr/testbed/src/testbed/defs-bbn-emulab
     289 # patch -p0 < /usr/testbed/src/testbed/named/rc.named.6.3.patch
     290 }}}
     291 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     292
     293 '''Step 7:''' Run the boss installation script.
     294 {{{
     295 # cd /usr/testbed/obj/testbed/install
     296 # /usr/bin/perl boss-install -p /root/protogeni/packages
     297 }}}
     298 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     299
     300 At this point, we have a functional Emulab website up and runing, here is the screenshot,
     301
     302 [[Image(bbn_emulab_website.jpg)]]
     303
     304 '''Step 8:''' Deal with 'named' and 'dhcpd' configuration.
     305
     306 '''For 'named':'''
     307
     308 The configuration file is '/etc/namedb/named.conf' and other zone files in the same folder.[[BR]]
     309 The command to restart it is '/etc/rc.d/named restart'.[[BR]]
     310
     311 During the last step, I encountered a error with named setup. By temporarily ignore that error, I redid the last step and this time I successfully installed it.
     312 Then I checked /etc/namedb and found named configuration file:'named.conf'(created by the boss installation script with two 'views',
     313 one is for the internal network and the other one for the external network), 'bbn.com.db.head' and 'bbn.com.internal.db.head'. As the
     314 Utah Emulab document said, run /usr/testbed/sbin/named_setup should produces two zone files 'bbn.com.db' and 'bbn.com.internal.db'.
     315 Then I ran it but it did not produce the zone files. So I manually edited those two files. The file is here.[attachment:wiki:BBN_Emulab:bbn.com.db] and [attachment:wiki:BBN_Emulab:bbn.com.internal.db]   
     316 The named.conf is here. [attachment:wiki:BBN_Emulab:named.conf]
     317
     318 '''For 'dhcpd':'''
     319
     320 The configuration file is '/usr/local/etc/dhcpd.conf'[[BR]]
     321 The way to modify it is: edit '/usr/local/etc/dhcpd.conf.template' first, then run '/usr/testbed/sbin/dhcpd_makeconf -i -r'[[BR]]
     322 The command to start and stop it is '/usr/local/etc/rc.d/2.dhcpd.sh start/stop'  //2.dhcpd.sh is a dhcpd wrapper provided by Utah
     323
     324 When you done with the installation, the first thing to do is to add a option 'deny unknown-clients' to the dhcpd.conf. Because your dhcpd may cause conflict with other existing dhcp servers.
     325
     326 '''Step 9:''' Try to install protogeni(Failed!!! at this point)
     327 
     328 At this point, I did not go further with the testbed configuration including switch configuration and adding node to the testbed. I'd like to try if I could enable the protogeni support at this stage (Follow the wiki page https://www.protogeni.net/trac/protogeni/wiki/ProtoGENIInstall ).(However, this failed to install protogeni with the below error message:)
     329
     330 [[Image(no_osid_error.jpg)]]
     331
     332 It seems caused by the fact that I did not customize the disk images and put related information into the database. So I plan to go ahead to do it.
     333[[BR]]
     334
     335 C). '''Customize Memory Filesystem and continue to install protogeni''' (Do not "add node" and "customize the generic image" yet)
     336
     337 Reference:
     338
     339 http://users.emulab.net/trac/emulab/wiki/install/mfs.html
     340
     341 '''Step 1:''' Download tftpboot MFS tarball to host and copy to 'Boss'(I want to keep a copy on host for late use).
     342
     343 On Host:
     344 {{{
     345 # cd /home/czhang/protogeni/software
     346 # wget http://www.emulab.net/downloads/tftpboot-latest.tar.gz
     347 }}}
     348 On 'Boss'
     349 {{{
     350 # scp root@192.168.57.1:/home/czhang/protogeni/software/tftpboot-latest.tar.gz /root/protogeni
     351 # cd /tftpboot
     352 # tar xvf /root/protogeni/tftpboot-latest.tar.gz
     353 }}}
     354
     355 '''Step 2:''' Follow the 'README' extracted from tftpboot-latest.tar.gz to customize the mfs and add related information into database.
     356
     357 At this point, I tried to run 'sudo /usr/testbed/sbin/protogeni/initsite' again and was able to get federated with Utah Clearing House successfully!!
     358
     359 This is the output screenshot,
     360 
     361 [[Image(initsite_success.jpg)]]
     362
     363[[BR]]
     364[[BR]]
     365 
     366 D). '''Add a experiment node and customize generic images'''
     367
     368 Reference:
     369
     370 http://users.emulab.net/trac/emulab/wiki/install/switches-db.html [[BR]]
     371 http://users.emulab.net/trac/emulab/wiki/install/new_nodes.html [[BR]]
     372 http://users.emulab.net/trac/emulab/wiki/install/customize_images.html
     373 
     374 '''Step 1:''' Initial Switch Setup.
     375 {{{
     376 # mysql tbdb
     377 mysql> insert into node_types set class='switch', type='cisco2950-ios';  //Just assume our NEC switches are Cisco 2950
     378 mysql> insert into nodes set node_id='cisco1',phys_nodeid='cisco1',type='cisco2950-ios',role='ctrlswitch';
     379 mysql> insert into nodes set node_id='cisco2',phys_nodeid='cisco2',type='cisco2950-ios',role='testswitch';
     380 mysql> insert into switch_stack_types set stack_id='Control', stack_type='generic', supports_private=0, single_domain=0, min_vlan=20, max_vlan=64;
     381 mysql> insert into switch_stack_types set stack_id='Experiment', stack_type='generic', supports_private=0, single_domain=0, min_vlan=20, max_vlan=64;
     382 mysql> insert into switch_stacks values ('cisco1','Control',1),('cisco2','Experiment',1);
     383 }}}
     384
     385 At this point, we need to configure a vlan as IP interface for control switch and assign IP 192.168.56.5 to it. Then put lines '192.168.56.5    cisco1' and '192.168.56.6    cisco2' in file Boss:/etc/hosts.
     386
     387 As of now, we could ping from boss to both switches.
     388
     389 Detailed cable connection figure will be provided here.
     390
     391
     392 '''Step 2:''' Add a node.
     393 {{{
     394 }}}
     395 
     396 '''Step 3:''' Customize generic images
     397[[BR]]
     398[[BR]]
     399
     400
     4018. '''Build BBN Clearinghouse (Optional, not complete)'''
     402
     403  Reference: http://www.protogeni.net/trac/protogeni/wiki/InstallingAClearingHouse
     404
     405 '''Step 1:''' Create a folder in 'Clearinghouse' to put the required software.
     406 {{{
     407 # mkdir /root/protogeni
     408 }}}
     409
     410 '''Step 2:''' Copy required software from host.
     411 {{{
     412 # scp root@192.168.57.1:/home/czhang/protogeni/software/testbed.tgz /root/protogeni
     413 # scp root@192.168.57.1:/home/czhang/protogeni/software/FreeBSD-6.3-20080901.tar.gz /root/protogeni
     414 # scp root@192.168.57.1:/home/czhang/protogeni/software/ports-20080901.tar.gz /root/protogeni 
     415 }}}
     416
     417 '''Step 3:''' Install perl and python on 'Clearinghouse'
     418 {{{
     419 # cd /root/protogeni
     420 # tar xvf FreeBSD-6.3-20080901.tar.gz //it produces folder 'packages'
     421 # cd /root/protogeni/packages
     422 # pkg_add perl-5.8.8_1.tbz
     423 # ln -s /usr/local/bin/perl5.8.8 /usr/bin/perl
     424 # pkg_add python25-2.5.1_1.tbz
     425 }}}
     426
     427
     428 '''Step 4:''' Prepare 'defs-clrhouse' file.
     429 {{{
     430 # mkdir -p /usr/testbed/src
     431
     432 # cd /usr/testbed/src
     433 # tar xvf /root/protogeni/testbed.tgz
     434
     435
     436
     437
     438 # cd /usr/testbed/src/testbed/protogeni/install
     439 # cp defs-clrhouse defs-bbn-clrhouse
     440 # vi defs-bbn-clrhouse
     441 }}}
     442 My ''''defs-bbn-clrhouse'''' [attachment:wiki:BBN_Emulab:defs-bbn-clrhouse].
     443
     444 '''Step 5:''' Do configure.
     445 {{{
     446 # mkdir -p /usr/testbed/obj/testbed
     447 # cd /usr/testbed/obj/testbed
     448 # /usr/testbed/src/testbed/configure --with-TBDEFS=/usr/testbed/src/testbed/protogeni/install/defs-clrhouse
     449 }}}
     450 The '''output''' is here. [attachment:wiki:BBN_Emulab:BBN_Emulab_commandoutput.txt]
     451
     452 Problem: Configure did not produce 'clrhouse-install' script as indicated in the document from Utah(Solved! Do 'cvs up' and re-configure).
     453