User Tools

Site Tools


soft:omftutorial

How to Set up an OMF experiment in a CONFINE context

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.

Additional information:

Prerequisites

Configure Slivers

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://143.129.80.193/images/rootfs-debian.tar.gz"
	option exp_data_url "http://143.129.80.193/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
  • rootfs-debian.tar.gz: The Debian [Wheezy?] OMF Sliver image. You could also take the OpenWRT OMF Sliver image which will work the same.
  • omf-pats-experiment-data.tar.gz : Contains omf-resctl.yaml which has the right configuration for this experiment (You may need to change the pubsub_gateway to the hostname of your XMPP server)

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://143.129.80.193/images/rootfs-debian.tar.gz'
		option exp_data_url 'http://143.129.80.193/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 '143.129.77.60/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.

This is a good time to configure your inventory service and add your pubsub nodes as for now all the information is known [see top].

Start omf-resctl

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
soft/omftutorial.txt · Last modified: 2016/01/21 16:09 by leandro