= !OnTimeMeasure Installation Procedure on !PlanetLab = '''Prasad Calyam, Rohit Patali, Kunpeng Zhu'''[[BR]] '''Aug 18, 2010'''[[BR]] ''For questions regarding this document, please contact - Rohit Patali rpatali@oar.net'' == 1. Overview == This document describes the installation, configuration and usage of !OnTimeMeasure-v1.0 on !PlanetLab. !OnTimeMeasure 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. [[BR]] Before proceeding further, we highly recommend reading the [http://groups.geni.net/geni/attachment/wiki/OnTimeMeasure/OnTimeMeasure-v1_Tutorial_061610.pdf OnTimeMeasure Tutorial] and [https://www.planet-lab.org/tutorial PlanetLab Tutorial]. For details regarding !OnTimeMeasure, please visit [http://groups.geni.net/geni/wiki/OnTimeMeasure OnTimeMeasure Wiki].[[BR]] For details regarding !PlanetLab, please visit [http://groups.geni.net/geni/wiki/PlanetLab PlanetLab Wiki] == 2. !OnTimeMeasure Installation Steps on !PlanetLab: == === 2.1 Requirements === The !OnTimeMeasure software package has the following requirements: A. ''Operating System:'' Fedora 8 B. ''Pre-requisite Software:'' MySQL, Graphite, Perl, Python, Iperf, Ruby, Bwctl-server, Bwctl-client, Cairo, Python_Twisted, Python_Piddle, perl-CPAN C. ''Perl Modules:'' Config::Natural, POSIX, Sys::HostIP, DBI, IO::Socket::SSL, Log::Log4perl, Net::SSLeay, Math::Random, YAML, HTTP::Daemon '''Note:''' The Pre-requisite Software and Perl Modules installation is handled by the scripts delivered in the !OnTimeMeasure-v1.0 package. See following sections for details. D. ''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 E. ''User Accounts:'' User must have registered accounts in the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and [https://www.planet-lab.org/ PlanetLab]. === 2.2 !PlanetLab Slice Creation and Configuration === '''Note:''' To obtain detailed information about !PlanetLab slice creation, please refer to the [https://www.planet-lab.org/tutorial ''PlanetLab Tutorial''][[BR]] !PlanetLab slice can be created using the web interface by logging into your account or by using the sfi-client (CLI). === 2.3 Software Installation === Login using SSH to '''each of the servers''', and install the following packages which might not have come pre-installed on a Fedora Core 8 (default OS for !PlanetLab) '''Note:''' In order to install any software using yum, use --nogpgcheck, otherwise installation will fail on !PlanetLab nodes. Install make and gcc {{{ yum --nogpgcheck install make yum --nogpgcheck install gcc }}} __'''''On the Root Beacon:'''''__ __Software installation__ {{{ wget http://ontime.oar.net/download/OnTimeMeasure-v1.0.tar.gz tar xzf OnTimeMeasure-v1.0.tar.gz tar xzf RootBeacon.tar.gz cd RootBeacon/InstallScript chmod +x ontime_software_install.sh }}} Edit “ontime_software_install.sh” and add --nogpgcheck in all occurrences of “yum install” statements. Your yum install statements should look like this:[[BR]] yum --nogpgcheck install packagename {{{ ./ontime_software_install.sh }}} If some perl module fails to install, force install the module using CPAN, otherwise you may receive errors while trying to run file_server.pl and node_scheduler.pl later. {{{ sudo perl –MCPAN –e shell cpan> force install modulename }}} __MySQL Initialization__ {{{ mysqladmin -u root password '' }}} __'''''On a Node Beacon:'''''__ __Software installation__ {{{ wget http://ontime.oar.net/download/OnTimeMeasure-v1.0.tar.gz tar xzf OnTimeMeasure-v1.0.tar.gz tar xzf NodeBeacon.tar.gz cd NodeBeacon/InstallScript chmod +x ontime_software_install.sh }}} Edit ontime_graphite_install.sh to add --nogpgcheck in all the “yum install” statements {{{ ./ontime_software_install.sh }}} If some perl module fails to install, force install the module using CPAN as explained earlier. === 2.4 Software Configuration === '''Centralized Case:''' __'''''On the Root Beacon:'''''__ __MySQL configuration__ {{{ cd RootBeacon/InstallScript mysql -u root -p < BuildWebServicesDatabase.sql mysql -u root -p < BuildMeasurementDatabase.sql mysql -u root –p }}} 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 use the provided as part of the Slice information at Step 2 in the Researcher Web-portal. '''Note 2:''' If remote access to MySQL on the Root Beacon is disabled, please open the port TCP/3306 and follow the tutorial at http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html __Graphite Configuration__ Initialize the graphite: {{{ cd /opt/graphite/webapp/graphite/ sudo python manage.py syncdb }}} '''Note:''' For the first time execution, you will be prompted for creating a 'root' user. Run the graphite and carbon daemons {{{ cd /opt/graphite/ python bin/carbon-cache.py start sudo chmod -R 777 /opt/graphite/storage nohup /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite & }}} '''Note:'''For some reason screen fails to work on !PlanetLab Then open :17280 in browser. No Error message should be received in order to proceed. __Root Beacon invocation options configuration__ {{{ cd RootBeacon/InstallScript perl config_wizard.pl }}} Follow the steps as directed by the wizard script. __'''''On a Node Beacon:'''''__ __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 RSpec information. === 2.5 Software Invocation === '''Centralized Case:''' __'''''On the Root Beacon:'''''__ Go to "Collector/" and run {{{ nohup perl collector.pl & }}} Then, go to "../!RootScheduler/" {{{ nohup perl file_server.pl & nohup perl action_script.pl & }}} No error should be reported. If you see errors while trying to run any of the scripts, it is likely that the depend perl modules are not installed correctly. A good way to check if the above scripts work is to run them without nohup to see the output and after making sure they work correctly, the scripts can be stopped and re-run using nohup. In case, an error occurs, you can install the missing modules (module name will appear in the error message) using procedure explained in the beginning. __'''''On a Node Beacon:'''''__ Go to 'Datagen/' run {{{ nohup perl file_server.pl & nohup perl node_scheduler.pl & }}}