This is a small tutorial on how to perform an OMF experiment in the CONFINE context making use of the OMF Debian/Openwrt Sliver images.
For these first steps about configuring the slivers, you can also find help on http://wiki.confine-project.eu/soft:node-system-a-hack?s=system&s=hack
1 First step is to allocate a new sliver:
$ confine_sliver_allocate 0123456789ff [sliver_description_filename] $ confine_sliver_allocate 0123456789ff [copy-paste-descr-to-stdin] config sliver '012345678902' option user_pubkey "MIIEogIBAAKCAQ..." option fs_template_url "http://188.8.131.52/images/rootfs-debian.tar.gz" option exp_data_url "http://184.108.40.206/images/omf-pats-experiment-data.tar.gz" option exp_name "hello-openwrt-experiment" option vlan_nr ffc # mandatory for if-types isolated option if00_type internal option if00_name priv option if01_type public # optional option if01_name pub0 option if01_ipv4_proto dhcp # mandatory for if-type public option if02_type isolated # optional option if02_name eth0 option if02_parent eth0 # mandatory for if-types isolated
2 Use the returned SLIVER_STATUS to determine the SLICE_ATTRIBUTES.
$ confine_sliver_deploy 012345678902 [slice_attributes_filename]
(Or you can use the stdin again)
config sliver '012345678902_abba' option user_pubkey 'MIIEogIBAAKCAQ.....' option exp_name 'hello-openwrt-experiment' option vlan_nr 'ffc' option fs_template_url 'http://220.127.116.11/images/rootfs-debian.tar.gz' option exp_data_url 'http://18.104.22.168/images/omf-pats-experiment-data.tar.gz' option sliver_nr '04' option if00_type 'internal' option if00_name 'priv' option if00_mac '54:c0:ab:ba:04:00' option if00_ipv4_proto 'static' option if00_ipv4 '192.168.241.4/25' option if00_ipv6_proto 'static' option if00_ipv6 'fdbd:e804:6aa9:0:0123:4567:8902:0/64' option if01_type 'public' option if01_name 'pub0' option if01_mac '54:c0:ab:ba:04:01' option if01_ipv6_proto 'static' option if01_ipv6 'fdf5:5351:1dfd:abba:0123:4567:8902:01/64' option if01_ipv4_proto 'dhcp' option if01_ipv4 '22.214.171.124/27' option if02_type 'isolated' option if02_name 'eth0' option if02_mac '54:c0:ab:ba:04:02' option if02_parent 'eth0'
3 Start the sliver
$ confine_sliver_start 012345678902
4 If you are using the Debian sliver, you need this little “hack”: instead of ssh’ing into the sliver by its public IP, you ssh to the priv IP and then perform a dhclient pub0 (to allocate a public IP). The problem is that for the Debian sliver the public IP passing received on the ffff…ff sliver the passing to the Debian sliver is not yet implemented well. That’s why u have to use this. Remember the public IP you get by dhclient will differ from the one in slice attributes! [I wrote a little hack which I was planning to commit, but this one was not semantically correct as it just asked for a new IP like this method and did not ask for the already allocated public IP by VCT].
In the OpenWRT sliver this may not be of any issue.
5 Do the same for the other node(s), using the same slice.
Now, when your XMPP server is running, your OMF AM is running, you can start running your OMF omf-resctl.
6 Start the up the OMF RC’s
$ omf-resctl &
7 If everything went well, you should now see your two slivers in Openfire (“Sessions”); something like “default_slice.omf.confine.xx” (Your OMF AM should also be there under the name aggmgr [if you did not change the username in the omf-aggmgr.yaml])
If something went wrong look into /var/log/omf-resctl.log to look at the logs.
8 Now you can execute an experiment by using the OMF EC
omf-5.4 exec EXPERIMENT.rb