Changes between Version 45 and Version 46 of NeoContainers


Ignore:
Timestamp:
Jan 27, 2016 11:09:51 AM (8 years ago)
Author:
Geoff Lawler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NeoContainers

    v45 v46  
    695695source tb_compat.tcl
    696696
    697 tb-make-soft-vtype container0 {pc2133 MicroCloud dl380g3}
     697tb-make-soft-vtype container0 {pc2133 MicroCloud}
    698698
    699699set base1 [$ns node]
     
    717717Create a new experiment with the NS file above. *Do not* swap in the experiment.
    718718
    719 We run our own configuration database on the {{{chef}}} node. This is not required, but keeps our configuration separate from the "official" configuration database.
     719We run the configuration server on the {{{chef}}} node by hand in order to confirm things are working. Do the following in a separate window so we can see the log output and confirm things are working. If there is a {{{config_server}}} already running, kill it first.
    720720
    721721{{{
     
    724724chef: > cd src/config_server
    725725chef: > git pull ~chef-user/config_server   # grab the newest code from chef-user.
    726 chef: > ./runserver.py -l debug -p 5323 -d $(pwd)/config.db    # full path to DB and unused port.
     726chef: > ./runserver.py -l debug -d $(pwd)/config.db    # full path to DB
    727727}}}
    728728
     
    730730
    731731{{{
    732 #!json
     732#!python
    733733[
    734734        {
     
    759759Note that the Win7 nodes are in the same subnet at the physical nodes.
    760760
    761 Load the configuration into our configuration server running on {{{chef}}}. This must be done *before* swapping in the experiment as the configuration server must request control network addresses from DETER.
    762 
    763 {{{
    764 #!sh
    765 users: > /share/config_server/bin/initialize_containers.py -p deter -e neo-win7 -f neo-win7.nodes.json -P 5323 -l debug
    766 }}}
    767 
    768 Note that {{{neo-win7.nodes.json}}} is the JSON file above and we use the port of our own config_server.
     761Load the Win7 nodes' configuration into our configuration server running on {{{chef}}}. This must be done *before* swapping in the experiment as the configuration server must request control network addresses from DETER.
     762
     763{{{
     764#!sh
     765users: > /share/config_server/bin/initialize_containers.py -p deter -e neo-win7 -f neo-win7.nodes.json -l debug
     766}}}
     767
     768Note that {{{neo-win7.nodes.json}}} is the JSON file above and we use the port of our own config_server. You should see log activity in your {{{config_server}}} window.
    769769
    770770Output should not contain {{{[ERROR]}}} or {{{[WARN]}}} messages. Here's an example of a good run:
     
    77577501-27 09:29:11 __main__     DEBUG    using base url: /exp/deter/neo-win7/insert
    776776[OK   ] : Initializing containers from neo-win7.nodes.json for use in experiment deter/neo-win7
    777 01-27 09:29:11 __main__     DEBUG    sending url: http://chef:5323/exp/deter/neo-win7/insert/containers
    778 [OK   ] : upload_node_file: Connecting to server chef:5323
     77701-27 09:29:11 __main__     DEBUG    sending url: http://chef:5320/exp/deter/neo-win7/insert/containers
     778[OK   ] : upload_node_file: Connecting to server chef:5320
    779779[OK   ] : upload_node_file: Posting node data ... url=/exp/deter/neo-win7/insert/containers
    780780[OK   ] : Upload_node_file: Getting Response
     
    783783}}}
    784784
     785You should see the win7 nodes from your {{{nodes.json}}} file added. (This is the "Nodes added: billg, ballmer" above.)
     786
    785787Now swap in the experiment:
    786788
     
    790792}}}
    791793
    792 Once swapped in, we log into a base node and kick off the chef processes to create and start the Win7 node.
     794Once swapped in, we give the swap-in-specific details to the configuration database (groups, users, mounts, etc). This only needs to be done once per experiment swapin. We do this so the containers know the experiment/swapin specific information. We cannot do this before swapin as the information does not exist then!
     795
     796{{{
     797#!sh
     798users: > ssh base1
     799base1: >  /share/config_server/bin/initialize_configuration_database.py -p deter -e neo-win7 -l debug   # note same port and chef server. 
     800}}}
     801
     802You should see log messages in your {{{config_server}}} window, user ids, mounts, group information for the experiment will scroll by.
     803
     804Successful output will contain one {{{[WARN]}}} message. We get this warning because the script did not find a {{{proj/deter/exp/neo-win7/containers}}} directory. This directory is created by the old containers system. Because we're not using that system in this example, this warning is OK. Here is the successful output:
     805
     806{{{
     807#!sh
     808OK   ] : Initializing configuration database from experiment deter/neo-win7 data.
     809[OK   ] : Posting mounts data...
     81001-27 10:18:51 __main__     DEBUG    posting url: /exp/deter/neo-win7/insert/mounts
     811[OK   ] : Connecting to server
     812[OK   ] : Good response from server.
     813[OK   ] : Success loading mount information.
     814[OK   ] : Posting accounts data...
     81501-27 10:18:51 __main__     DEBUG    posting url: /exp/deter/neo-win7/insert/accounts
     816[OK   ] : Connecting to server
     817[OK   ] : Good response from server.
     818[OK   ] : Success loading account information.
     819[OK   ] : Posting physical node names data...
     82001-27 10:18:51 __main__     DEBUG    posting url: /exp/deter/neo-win7/insert/pnode_names
     821[OK   ] : Connecting to server
     822[OK   ] : Good response from server.
     823[OK   ] : Success loading physical node names.
     824[WARN ] : No containers information found at /proj/deter/exp/neo-win7/containers. Not loading containers information.
     825[OK   ] : All is well. Configuration database now contains information about experiment deter/neo-win7.
     826}}}
     827
     828Now we confirm that chef is ready to run, by confirming that the cookbooks are loaded into the running chef instance. (This does not need to be done if you know chef is configured properly. This is here for completeness.)
     829
     830{{{
     831#!sh
     832users: > ssh chef
     833chef: > sudo su - chef-user
     834chef: > cd ~/chef-repo
     835chef: > knife cookbook list
     836}}}
     837
     838This will show about 5 to 7 cookbooks loaded. If not, load them. (Note you can reload them if you want to be sure all is well.)
     839
     840{{{
     841#!sh
     842users: > ssh chef
     843chef: > sudo su - chef-user
     844chef: > cd ~/chef-repo
     845chef: > knife cookbook upload --all
     846}}}
     847
     848
     849Now everything is set to start chef on the base node. On each base node, run the {{{bootstrap_node.sh}}} script to bootstrap the base node into the chef system. Once bootstrapped, we can run {{{chef-client}}} to configure the base node.
     850
     851{{{
     852#!sh
     853users: > ssh base1
     854base1: > /share/config_server/bin/bootstrap_node.sh -s chef -p 5323 -r pnode
     855}}}
     856
     857When running, you should see logging in the {{{config_server}}} window.
     858
     859Now start chef-client on the base node.
     860
     861{{{
     862#!sh
     863users: > ssh base1
     864base1: > sudo chef-client
     865}}}
     866
     867
     868There will be a bunch of output. You can see various chef cookbooks loaded and executed. The output will pause for a long time on {{{execute[vagrant up --parallel] action run}}}. This statement is the virtual machines booting on the base node. This will take a *long* time, 10 minutes or more. This step is starting the win7 virtual nodes *and* having the win7 nodes also chef-bootstrap and chef-configure themselves. Unfortunately there is no easily observable log output for these events. Once {{{chef-client}}} completes, the Win7 nodes should be up and accessible in the experiment.
     869