Changes between Version 24 and Version 25 of NeoContainers
- Timestamp:
- Oct 7, 2015 2:38:21 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NeoContainers
v24 v25 15 15 }}} 16 16 17 2. Create a containerized experiment with an NS file and the {{{/share/containers/containerize.py}}} script. (There is a mode of neo-containers which does *not* require running the older containerization scripts. This will be documented.) 17 2. Create an experiment in which to run your containers. There are two modes: using the existing containers system or not using it. Neo-continainers uses the existing containers system to figure out more complex network topologies. If you just want containers "hanging off" your physical nodes and can compute IP addresses for your containers by hand, you do not need to use the existing containers system at all. 18 19 2a. Create an experiment using the existing containers system. Creat a containerized experiment with an NS file and the {{{/share/containers/containerize.py}}} script. 18 20 19 21 In your NS file for each container in the experiment, specify {{{image_os}}}, {{{image_type}}}, {{{image_name}}}, and {{{image_url}}} via the {{{tb-add-node-attribute}}} syntax. Details on each attribute is given below. … … 39 41 }}} 40 42 41 Currently Windows nodes do not get fully configured and a final script must be run by hand on the container. 43 2b. Create an experiment without using the existing containers system. Just create an NS file with a fully connected network. Use the PNODE-BASE image for all machines on which you want to run containers. 44 45 Create a JSON file which describes your containers. It's a list of containers. For each container you must specify the {{{host}}} (machine it runs on), {{{interfaces}}} in addition to the parameters from 2a above. 46 47 {{{ 48 [ 49 { 50 "host": "alice", 51 "name": "xanadu", 52 "image_url": "http://scratch/containers/deter_win7_candidate.box" 53 "image_os": "windows", 54 "image_type": "vagrant", 55 "image_name": "deter/win7", 56 "interfaces": [ 57 { "address": "10.1.1.200", "mac": "de:ad:be:ef:00:ae" } 58 ] 59 }, 60 { 61 "host": "alice", 62 "name": "grease", 63 "image_url": "http://scratch/containers/deter_win7_candidate.box" 64 "image_os": "windows", 65 "image_type": "vagrant", 66 "image_name": "deter/win7", 67 "interfaces": [ 68 { "address": "10.1.1.201", "mac": "de:ad:be:ef:00:af" } 69 ] 70 }, 71 { 72 "host": "bob", 73 "name": "maisie", 74 "image_url": "http://scratch/containers/deter_ub1404_64_vb.box", 75 "image_os": "ubuntu 14.04 64", 76 "image_type": "vagrant", 77 "image_name": "deter/ub14", 78 "interfaces": [ 79 { "address": "10.1.1.101", "mac": "de:ad:be:ef:00:be" } 80 ] 81 }, 82 { 83 "host": "bob", 84 "name": "olive", 85 "image_url": "http://scratch/containers/deter_ub1404_64_vb.box", 86 "image_os": "ubuntu 14.04 64", 87 "image_type": "vagrant", 88 "image_name": "deter/ub14", 89 "interfaces": [ 90 { "address": "10.1.1.102", "mac": "de:ad:be:ef:00:bf" } 91 ] 92 } 93 ] 94 }}} 95 96 This example creates four containers on two host nodes. 97 98 If using this mode, skip steps 3 and 4. 42 99 43 100 3. Use the NS file to create a containerized experiment using the existing containers scripts (on users): {{{/share/containers/containerize.py [group] [experiment] [ns file]}}}. Note that the experiment must currently be created in the {{{Deter}}} group as that's where the custom pnode disk images are. This will change. … … 66 123 }}} 67 124 68 5. Swap in the experiment. 69 70 6. Populate the configuration database that runs on {{{chef.isi.deterlab.net}}} by running the database population scripts {{{load_containers_db.sh}}} and {{{load_config_db.sh}}} (This will automated in the future.) This should be run from a physical node in the experiment. I use {{{pnode-0000}}} in the example below. 125 5. If your experiment does not rely on the existing containers system, you need to tell DETER about your containers before swapping in the experiment so that it can allocate control network addresses for your containers. (The existing containers system does this for you, but since you've not run {{{containerize.py}}}, you must do this yourself.) 126 127 On users (or anywhere that can talk to {{{chef.isi.deterlab.net}}}: 128 {{{ 129 > cd [your config_server repository]/bin 130 > ./load_containers_db.sh -f [path to your containers.json file] 131 }}} 132 133 Note that you only have to do this once per experiment. You do not have to do this before each swap in! Just once to reserve control net addresses from DETER. 134 135 136 6. Swap in the experiment. 137 138 7. Populate the configuration database that runs on {{{chef.isi.deterlab.net}}} by running the database population scripts {{{load_containers_db.sh}}} and {{{load_config_db.sh}}} (This will automated in the future.) This should be run from a physical node in the experiment. I use {{{pnode-0000}}} in the example below. 71 139 72 140 On a single pnode: … … 74 142 > ssh pnode-0000.${EXPID}.${PROJID} 75 143 > cd [your config_server repository]/bin 144 > ./load_config_db.sh 145 }}} 146 147 If you are using the existing containers system also load the containers information. 148 149 {{{ 76 150 > ./load_containers_db.sh -p ${PROJID} -e ${EXPID} 77 > ./load_config_db.sh78 151 }}} 79 152 80 153 At this point, the Chef server and configuration database knows everything it needs to about your experiment and the nodes within it. 81 154 82 7. Let Chef configure the nodes. Bootstrap and configure the pnodes. To configure/bootstrap the node use the {{{bootstrap_node.sh}}} script. The script needs to know which role the node plays in the experiment. There are currently three roles: {{{pnode}}}, {{{container}}}, and {{{win-container}}}.155 8. Let Chef configure the nodes. Bootstrap and configure the pnodes. To configure/bootstrap the node use the {{{bootstrap_node.sh}}} script. The script needs to know which role the node plays in the experiment. There are currently three roles: {{{pnode}}}, {{{container}}}, and {{{win-container}}}. 83 156 84 157 On all the pnodes: … … 93 166 Once nodes are bootstrapped, simply running {{{sudo chef-client}}} will re-configure the nodes (both pnodes and the containers) if something should go wrong. 94 167 95 8. Remove experiment data from the configuration database once the experiment is complete. 96 97 On a single pnode: 98 {{{ 99 > ssh pnode-0000.${EXPID}.${PROJID} 168 9. Remove experiment data from the configuration database once the experiment is complete. 169 170 On a machine that can talk to {{{chef.isi.deterlab.net}}}: 171 {{{ 100 172 > cd [your config_server repository]/bin 101 173 > ./rm_experiment_config.sh -p ${PROJID} -e ${EXPID}