Changes between Version 8 and Version 9 of ChefonDETER


Ignore:
Timestamp:
Jul 14, 2014 4:44:21 PM (10 years ago)
Author:
Geoff Lawler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChefonDETER

    v8 v9  
    9696}}}
    9797
     98Push testbed specific information to the chef server. The {{{deter_user}}} recipes look for this information to get testbed-specific instantiation information, like the name of the boss machine or which file systems to mount. Chef calls these collections of data, "data bags". We first create a named data bag, "testbed-defs" then populate it with the testbed-specific information.
     99
     100{{{
     101workstation$ cd /local/chef-repo
     102workstation$ knife data bag create testbed-defs
     103workstation$ # We only have an emulab-in-emulab data bag defined right now.
     104workstation$ knife data bag from file testbed-defs data_bags/testbed-defs/eine.json
     105workstation$ knife data bag show testbed-defs eine
     106binary_store_path: binaries                                   
     107bossnode:          myboss.eine.deter.isi.deterlab.net         
     108db_conf:                                                       
     109  host: myboss.eine.deter.isi.deterlab.net                     
     110  name: tbdb                                                   
     111  user: mysql                                                 
     112fsnode:            myops.eine.deter.isi.deterlab.net           
     113fsprojdir:         /q/proj                                     
     114fsuserdir:         /q/users                                   
     115id:                eine                                       
     116node_mounts:                                                   
     117  device:      myops.eine.deter.isi.deterlab.net:/share       
     118  fstype:      nfs                                             
     119  mount_point: /share                                         
     120  options:     ro                                             
     121projdir:           /proj                                       
     122scratch:           myboss.eine.deter.isi.deterlab.net:8000     
     123testbed_netmask:   255.255.0.0                                 
     124testbed_network:   192.168.0.0                                 
     125userdir:           /users                                     
     126usernode:          myops.eine.deter.isi.deterlab.net           
     127workstation$
     128}}}
     129
    98130We are now going to use {{{knife}}} to bootstrap Chef unto a client machine. The usual Chef assumes internet connectivity and asks you to download a script and pipe it to {{{sudo}}} on the client. We will not be doing that.
    99131
     
    143175}}}
    144176
     177Now we force  {{{chef-client}}} to run on the client by sshing to it and running {{{chef-client}}} by hand. The recipes assigned to the node will fail however as we've not installed the mysql2 libraries the recipes need to communicate with the DETER database. If they were installed though, it still would not work as the DETER database is not accessible remotely.
     178
     179Thus ends the tutorial.
     180
     181If you wanted to take it further, you can run an emulab-in-emulab experiment, install the mysql2 libraries on the client, and re-run {{{chef-client}}} on the client. If run you would see these recipes run in order.
     182 * {{{routing}}}: set default routes and route correctly for control net and data net.
     183 * {{{mounts}}}: look in the appropriate "data bag" for the test bed type the client is running on and mount the file systems found there. See {{{/local/chef-repo/data_bags/testbed-defs/eine.json}}} for a sample emulab-in-emulab testbed-specific configuration. (These testbed specific data bags take the place of the compile time *.DEF files in the testbed source tree.)
     184
    145185=== Chef Client(s) ===
    146186