= !OnTimeMeasure-GENI Installation Document = '''Prasad Calyam, Kunpeng Zhu''' '''Sep 23, 2010''' ''Software License:'' [http://www.geni.net/wp-content/uploads/2009/02/geniprojlic.pdf ''GENI Project License (GPL)''] == 1. Getting Started == This document describes the installation, configuration and usage of !OnTimeMeasure, which is a prototype measurement service for the GENI facility users. The measurement service can be used to perform centralized and distributed orchestration and provisioning of active measurements within experiment slices for purposes such as: * Network paths monitoring * Network weather forecasting * Network performance anomaly detection * Network-bottleneck fault-location diagnosis The [http://ontime.oar.net ''OnTimeMeasure researcher web-portal''] enables a ProtoGENI/Emulab and !PlanetLab user to register, create and monitor experiment slices on a geographically distributed resources in the GENI facility. Before proceeding further, we highly recommend reading the [http://groups.geni.net/geni/attachment/wiki/OnTimeMeasure/OnTimeMeasure-v1_Tutorial_061610.pdf Early Experimenter Tutorial]. == 2. Requirements == The !OnTimeMeasure software package has the following requirements: A. ''Operating System:'' Fedora 8 B. ''Open Ports:'' For !RootBeacon server: MySQL TCP/3306, Graphite TCP/2003 and TCP/17280, Collector TCP/7777, HTTP TCP/17290; For !NodeBeacon server: BWCTL TCP/4823, Nodescheduler TCP/17249, HTTP TCP/17290 C. ''User Accounts:'' User must have registered accounts in the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and [http://www.emulab.net Emulab Network Testbed] D. ''ProtoGENI slice:'' Create a new experimental slice in the [https://www.emulab.net/beginexp_html.php3 Emulab website] with at least 3 nodes. One is the root beacon. The others are node beacons. '''Note 1:''' To obtain detailed information about ProtoGENI slice creation, please refer to the [https://users.emulab.net/trac/protogeni/wiki/TutorialNew ''ProtoGENI Tutorial''][[BR]] '''Note 2:''' If you still use the command line Emulab test scripts to create a slice, see the end of this document for the example RSpec. '''Note 3:''' Following are the pre-requisite software and Perl modules, which will be installed automatically by the scripts delivered in the !OnTimeMeasure release package. ''Pre-requisite Software:'' MySQL, Graphite, Perl, Python, Iperf, Ruby, Bwctl-server, Bwctl-client, Cairo, Python_Twisted, Python_Piddle ''Perl Modules:'' Config::Natural, POSIX, DBI, IO::Socket::SSL, Log::Log4perl, Net::SSLeay, Math::Random == 3. Centralized Case Installation == === 3.1 Software Installation === Download the latest !OnTimeMeasure release package at http://ontime.oar.net/download/OnTimeMeasure_latest.php. Once you have downloaded the tar file, untar/unzip to see that it contains: * !NodeBeacon.tar.gz * !RootBeacon.tar.gz * README.txt Next, login using SSH to each of the servers, copy the appropriate tar files over, and run the following commands to install the measurement service: __'''''On the Root Beacon Server:'''''__ {{{ tar xzf RootBeacon.tar.gz cd RootBeacon/InstallScript chmod +x ontime_software_install.sh ./ontime_software_install.sh }}} __'''''On a Node Beacon Server:'''''__ {{{ tar xzf NodeBeacon.tar.gz cd NodeBeacon/InstallScript chmod +x ontime_software_install.sh ./ontime_software_install.sh }}} === 3.2 Software Configuration === __'''''On the Root Beacon Server:'''''__ __MySQL configuration__ {{{ mysql -u root < BuildWebServicesDatabase.sql mysql -u root < BuildMeasurementDatabase.sql mysql -u root }}} At the mysql prompt, type {{{ CREATE USER 'collector'@'%' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON `Measurements` . * TO 'collector'@'%'; GRANT ALL PRIVILEGES ON `WebServices` . * TO 'collector'@'%'; exit }}} '''Note 1:''' Please change the to a safe password. '''Note 2:''' If remote access to MySQL on the Root Beacon is disabled, please open the port TCP/3306 in the firewall and follow the tutorial at http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html __Invocation options configuration__ {{{ perl config_wizard.pl }}} Follow the steps as directed by the wizard script. __'''''On a Node Beacon Server:'''''__ __Invocation options configuration__ {{{ cd NodeBeacon/InstallScript perl config_wizard.pl }}} Follow the steps as directed by the wizard script. __'''''On the Web-portal:'''''__ Login to the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and provide the Slice RSpec information. === 3.3 Software Invocation === __'''''On the Root Beacon Server:'''''__ Go to "!RootBeacon/!RootScheduler/" and run {{{ screen /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite }}} If no error is reported, press '+a, c' sequence to open a new blank command window. {{{ perl file_server.pl }}} If no error is reported, press '+a, c' sequence to open a new blank command window. {{{ perl action_script.pl }}} If no error is reported, press '+a, c' sequence to open a new blank command window. {{{ cd ../Collector/ perl collector.pl }}} If no error is reported, press '+a, d' sequence in the SSH window to keep the service running in the background. __'''''On a Node Beacon Server:'''''__ Go to '!NodeBeacon/Datagen/' and run {{{ screen perl file_server.pl }}} If no error is reported, press '+a, c' sequence to open a new blank command window. {{{ perl node_scheduler.pl }}} If no error is reported, press '+a, d' sequence in the SSH window to keep the service running in the background. == 4. Distributed Case Installation == === 4.1 Software Installation === Download the latest !OnTimeMeasure release package at http://ontime.oar.net/download/OnTimeMeasure_latest.php. Once you have downloaded the tar file, untar/unzip to see that it contains: * !NodeBeacon.tar.gz * !RootBeacon.tar.gz * README.txt Only the !NodeBeacon.tar.gz is needed. Upload it to a node beacon server and run the following commands to install the measurement service: {{{ tar xzf NodeBeacon.tar.gz cd NodeBeacon/InstallScript chmod +x ontime_software_install.sh ./ontime_software_install.sh }}} === 4.2 Software Configuration === __NTP Configuration__ {{{ sudo vim /etc/ntp.conf }}} Edit the last line to: {{{ server owamp.newy.net.internet2.edu }}} Restart ntpd service {{{ sudo /etc/init.d/ntpd restart }}} __BWCTL Configuration__ Edit the BWCTL config: /etc/bwctld/bwctld.conf Remove the comments on the below lines and edit them as: {{{ allow_unsync sync_fuzz 5 }}} Edit the BWCTL limits: /etc/bwctld/bwctld.limits Change the regular limit to: {{{ limit regular with parent=root, \ duration=30, \ allow_tcp=on, \ allow_udp=on, \ allow_open_mode=on }}} Restart BWCTL: {{{ sudo /etc/init.d/bwctld restart }}} '''Note:''' For more detailed instructions to configure NTP and BWCTL, please refer to the BWCTL Tool website. (http://www.internet2.edu/performance/bwctl/) __Node Beacon invocation options configuration__ {{{ cd NodeBeacon/InstallScript perl config_wizard.pl }}} Follow the steps as directed by the wizard script. __'''''On the Web-portal:'''''__ Login to the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and provide the Slice information. === 4.3 Software Invocation === Go to '!NodeBeacon/Datagen/' and run {{{ screen perl file_server.pl }}} If no error is reported, press '+a, c' sequence to open a new blank command window. '''Note:'''Centralize and distributed share the same file server script. If you run both centralized and distributed on the same machine, you only need to run the file_server.pl once. {{{ perl dist_scheduler.pl }}} If no error is reported, press '+a, d' sequence in the SSH window to keep the service running in the background. == 5 Reference == === 5.1 Sample RSpec === An example of a centralized orchestration RSpec that consists of 3 nodes is as follows: {{{ 1000000 1000000 }}} === 2.3 Sliver Creation and Management === Create and manage a sliver by the Emulab test scripts. - Register a slice {{{ registerslice.py –n }}} - Create sliver inside slice {{{ createsliver.py –n }}} - Check sliver status {{{ sliverstatus –n }}} '''Note:''' You may need to renew your sliver just after successful creation. For this, {{{ renewsliver –n