Basically, ODENOS runs with redis-server and Java. If you want to use Python or Ruby environment, please see "Appendix A".
-
Install redis-server(version >= 2.8.4)
$ sudo apt-get install redis-server
-
Edit the following parameters in /etc/redis/redis.conf
- bind 0.0.0.0
- timeout 0
- client-output-buffer-limit pubsub 256mb 256mb 60
-
Restart redis-server
$ sudo service redis-server restart
-
Install java-1.8 and maven
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer $ sudo apt-get install oracle-java8-set-default $ export JAVA_HOME=/usr/lib/jvm/java-8-oracle $ sudo apt-get install maven curl
-
git clone
$ sudo apt-get install git $ git clone https://github.com/o3project/odenos.git $ cd odenos
-
Build
$ mvn package
-
Start odenos
$ ./odenos start
-
Stop odenos
$ ./odenos stop
-
run unit tests (if you want)
$ ./run-unittests.sh
-
run examples (if you want)
$ cd apps/example $ ./run-example.sh all
-
Install python packages
$ sudo apt-get install python-setuptools python-dev $ sudo -E easy_install msgpack-python==0.4.6 redis==2.10.3 futures==2.2.0 mock==1.0.1 coverage==4.0a5 kazoo==2.2.1
-
Add the following line to ./etc/odenos.conf
PROCESS romgr2,python,apps/python/sample_components
-
Start ODENOS
-
Install rvm, ruby2.0.0 and gem package
$ cd ./odenos $ sudo apt-get --purge remove ruby rubygems $ curl -L https://get.rvm.io | bash -s stable --ruby $ source ~/.rvm/scripts/rvm $ rvm install ruby-2.0.0-p643 $ rvm use --default ruby-2.0.0-p643 $ gem install bundler $ bundle install $ bundle update
-
Install openvswitch and trema-edge
$ sudo apt-get install libsqlite3-dev sqlite3 libpcap-dev libssl-dev openvswitch-common openvswitch-switch $ git clone http://github.com/trema/trema-edge.git $ mv trema-edge ~/ $ cd ~/trema-edge $ git checkout 148acb9cd7f654020098a5e769bfedad273a687b $ gem install bundler $ bundle install $ bundle update $ rake $ cd -
-
Start OpenFlowDriver
$ ./odenos start $ ~/trema-edge/trema run -d "./src/main/ruby/org/o3project/odenos/core/odenos.rb --cmpmgr=romgr3"
-
Stop OpenFlowDriver
$ ~/trema-edge/trema killall
If you want to output syslog, please configure syslog.
-
Install rsyslog package
$ sudo apt-get install rsyslog
-
Add the file odenos/etc/80-odenos.conf into /etc/rsyslog.d/, and customize this file.
-
To suppress ODENOS log output to default file, change the file /etc/rsyslog.d/50-default.conf. For example as following:
*.*;auth,authpriv.none,local1.none -/var/log/syslog
-
Enable ModLoad parameter in /etc/rsyslog.conf for java logging.
$ModLoad imudp $UDPServerRun 514
-
And then, restart rsyslog service
$ sudo service rsyslog restart
-
Enable syslog configuration in the following files of ODENOS.
- odenos/etc/log4j2_java.yaml
- odenos/etc/log_python.conf
- odenos/etc/log_ruby.conf
You can specify the following options:
'--cmpmgr=id' : "Trema ComponentManager's object ID"
'--rip=redis_server_id' : "Redis Server's ip address (default 127.0.0.1)"
'--rport=redis_server_port' : "Redis Server's port (default: 6379)"
'--vendor='VENDOR1' : "set VendorID (default 'OpenFlow')"
Try the following instruction:
-
Change source site (https --> http)
$ gem source -a http://rubygems.org/ $ gem source -r https://rubygems.org/
-
Check source site
$ gem source -l *** URRENT SOURCES *** http://rubygems.org/
-
Retry gem install
$ gem install bundler
Please start looking from here doc/api