Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To create the virtual machine which will host the flowvisor, run in your terminal the commands below. Pay attention to substitute the "XXX" for your Island ID and the "YYYY" for your Institution acronym.

Code Block
languagebash
themeMidnight
languagebash
xen-create-image --install-method=debootstrap --size 10G --memory 4098Mb --fs=ext3 --dist wheezy --pygrub --passwd --ip 10.XXX.0.101 --netmask=255.255.0.0 --gateway=10.XXX.0.30 --bridge=br_control --hostname=flowvisor.YYYY.org.br --mirror=http://archive.debian.org/debian/

 
xm create -c flowvisor.cfg

...

Installing the Flowvisor

Code Block
languagebash
themeMidnight
languagebash
wget -q http://updates.onlab.us/GPG-KEY-ONLAB -O- | apt-key add -
sh -c "echo 'deb http://updates.onlab.us/debian stable/' > /etc/apt/sources.list.d/flowvisor.list"
apt-get update
apt-get install flowvisor=0.8.17-3 sudo

Run the flowvisor configuration tool to set the password and create your certificate by changing the following parameters:

Code Block
languagebash
themeMidnight
languagebash
sudo -u flowvisor fvconfig generate /etc/flowvisor/config.json <hostname> <admin_passwd> [<of_port> <api_port>]

...

Note
As an example: in our case we used the following parameters (the hostname refers to the ip that will be used in the OCF and the password used to access it):


Code Block
languagebash
themeMidnight
languagebash
sudo -u flowvisor fvconfig generate /etc/flowvisor/config.json 10.XXX.0.101 ofelia

 


Enable the topology_server option in the  flowvisor  configuration file and then reload the configuration.

Code Block
languagebash
themeMidnight
languagebash
sudo -u flowvisor sed -i 's/"run_topology_server": false/"run_topology_server": true/' /etc/flowvisor/config.json
sudo -u flowvisor fvconfig load /etc/flowvisor/config.json

 


To correct the flowvisor log behavior, edit the /etc/init.d/flowvisor startup script and add the -l parameter in the call to run the flowvisor:

Code Block
languagebash
themeMidnight
languagebash
sed -i -e "s/\/sbin\/flowvisor /\/sbin\/flowvisor -l /ig" /etc/init.d/flowvisor

 


Start the Flowvisor service upon boot:

Code Block
languagebash
themeMidnight
languagebash
update-rc.d flowvisor defaults
 
/etc/init.d/flowvisor start

...

Note
In case of errors when stating the service, try the following solution.


Code Block
languagebash
themeMidnight
languagebash
rm /usr/local/share/db/flowvisor/FlowVisorDB/*.lck
 
/etc/init.d/flowvisor start

  Check the Flowvisor service status. 

Code Block
languagebash
themeMidnight
languagebash
# service flowvisor status
FlowVisor is running as PID 4263

...

After installing the Flowvisor service, configure the log level using this command:

Code Block
languagebash
themeMidnight
languagebash
sudo sed -i -e 's/log4j.rootCategory=[A-Z]*,/log4j.rootCategory=WARN,/' /etc/flowvisor/fvlog.config

...

Access the following directory:

Code Block
languagebash
themeMidnight
languagebash
cd /etc/logrotate.d

Create the following archive: flowvisor

And fill it with the following content:

Code Block
languagebash
themeMidnight
languagebash
/var/log/flowvisor/flowvisor-stderr.log {
daily
rotate 0
compress
copytruncate
}

After this step it will be necessary to configure the crontab:

Code Block
languagebash
themeMidnight
languagebash
crontab -e

Append the following line at the final:

Code Block
languagebash
themeMidnight
languagebash
0 12 * * * /usr/sbin/logrotate --force /etc/logrotate.d/flowvisor >/dev/null 2>$

...