wiki:OTM-Windows

Version 4 (modified by Prasad Calyam, 12 years ago) (diff)

--

OnTimeMeasure-GENI Installation Procedure on Windows XP

Prasad Calyam, Yingxiao Xu
February 10, 2012

Software License: 'GENI Project License (GPL)'

1. Getting Started

This document describes the installation, configuration and usage of OnTimeMeasure, which is a measurement service for windows XP users. The measurement service can be used to perform centralized and distributed orchestration and provisioning of measurements within experiment slices for purposes such as:

  • Network paths monitoring
  • Network weather forecasting
  • Network performance anomaly detection
  • Network-bottleneck fault-location diagnosis

2. Requirements

Note: We highly recommend you install and use OnTimeMeasure in Linux OS environment as much possible. However, if you need to install OnTimeMeasure in a Windows OS environment, the below steps might be useful.

The OnTimeMeasure software package has the following requirements:

  1. Open Ports: For Root Beacon server: MySQL TCP/3306, Graphite TCP/2003 and TCP/17280, Collector TCP/7777, HTTP TCP/17290, Supervisor TCP/17291; For Node Beacon server: Nodescheduler TCP/17249, HTTP TCP/17290, Supervisor TCP/17291 (Note: These ports are opened by default)
  1. User Accounts: User must have registered accounts in the OnTimeMeasure Researcher Web-portal

Note: Typically, two or more Node Beacons and one Root Beacon need to be installed on separate dedicated PCs. For windows users, the best way is to install Node Beacons on Windows, and install Root Beacon on Linux.

3. Node Beacon Installation

3.1 Install iperf

Download and install iperf 2.0.5 package in http://mayoxide.com/iperf/

3.2 Install Python-django

Download python 2.5.4 in http://www.python.org/download/releases/2.5.4/ (For other version, see - http://www.python.org/download/)

Download Django 1.0.2 in http://media.djangoproject.com/releases/1.0.2/Django-1.0.2-final.tar.gz (For other version, see - http://www.djangoproject.com/download/)

Install python. Then add path to python installation folder by right click My Computer -> Properties -> Advanced -> Environment Variables -> System Variables -> Path , and add path C:\Python25;C:\Python25\Scripts.

Extract Django, run the following command to install Django.

setup.py install

Aftar complete, type python, run the following command to check the installation.

 import django
 print django.get_version()

3.3 Install setuptools

Download and install setuptools for python 2.5 win 32 in http://pypi.python.org/pypi/django-supervisor/0.2.3#downloads. (For other version, see - http://pypi.python.org/pypi/setuptools)

Then navigate to the django-supervisor folder. Type

 easy_install django-supervisor 

Alternate links and methods:

3.4 Install Active-perl

Download and install Active-perl in http://www.dbatools.net/experience/install_active_perl_windows.html

3.5 Install Log4Perl

Run ppm tools of Active-perl. Install Log4Perl under ppm prompt by invoke the following command

ppm>  install Log-Log4perl

3.6 Install libio-socket-ssl-perl and libnet-ssleay-perl/

Download and install in http://www.apecity.com/net_smtp_ssl/ and http://www.perlmonks.org/?node_id=502856

3.7 Setup SSL

Under ppm prompt by invoke the following command

Ppm> install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd

Download http://perl.apache.org/dist/win32-bin/ppms/x86/IO-Socket-SSL.tar.gz and unzip folder auto and IO under folder lib to C:\perl\site\lib

Download openSSL from http://www.shininglightpro.com/products/Win32OpenSSL.html and extract it to c:\OpenSSL-Win32\

Add c:\OpenSSL-Win32\bin to system path.

Make a config.txt file for openssl. A sample config.txt file is as follows:

[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt=no
[ req_dn ]
O=oklahoma-5be661
OU=Automatically-generated SSL key
CN=Activemon
[ cert_type ]
nsCertType = server

Use the following command to generate cert and key
    openssl req -new -x509 -days 365 -nodes -config config.txt -out server-cert.pem -keyout server-key.pem

3.8 Copy NodeBeacon

Download and extract 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

Extract NodeBeacon to local disk.

Make two folder(tmp and log ) manually under folder NodeBeacon

4. NodeBeacon Adaption

4.1 Change file name to meet filename restriction of windows.

Change file Datagen\suppl.pm

Locate:

   my $CurrTestTs = sprintf('%04d-%02d-%02d.%02d:%02d:%02d',

change to:

   my $CurrTestTs = sprintf('%04d-%02d-%02d.%02dX%02dX%02d'

Change file Datagen\Run-tool.pl

Locate

   $tt1 =~ s/\.//g;

Add a line behind:

   $tt1 =~ s/X//g;

4.2 Change the folder path

Change the folder path / to \ in node_service.py and pythonlogger.conf

4.3 Change the Parser

In file parser.pm, for tool of each metric you want to measure, change the parser to extract the data from the raw data in windows.

A sample parser for Ping tool

sub ping # ($ts, $src, $dst, @data)
{
        shift @_; # remove method name.
        my ($tt, $src, $dst, @fData) = @_;
        my @t_line = split (/ms/, $fData[-1]);
        my @data_size = split (/= /, $t_line[0]);
        $min=$data_size[1];
        @data_size = split (/= /, $t_line[1]);
        $max=$data_size[1];
        @data_size = split (/= /, $t_line[2]);
        $avg=$data_size[1];
        my $dline = "ping\#$tt\#$min\#$max\#$avg\#$src\#$dst";
        return $dline;
}


5. NodeBeacon Startup

Run the following command to start NodeBeacon.

cd Datagen
perl file_server.pl

cd Datagen
perl node_scheduler.pl

cd Datagen
python node_service.py

6 Install Root Beacon

Choose a Linux machine as root beacon. SSH login into the root beacon.

Download and extract the latest OnTimeMeasure release package at http://ontime.oar.net/download/OnTimeMeasure_latest.php.

Invoke the following command to install RootBeacon.

tar xzf RootBeacon.tar.gz
cd RootBeacon/InstallScript
./ontime_software_install.sh

7 Software Invocation

Through OnTime Beacon web-portal

Login to the OnTimeBeacon. Setup resources (provide RSpec information) and control Node/Root Beacons within slice in an interactive manner. Video demos of these steps can be viewed at http://ontime.oar.net/demo/

Through OnTime Control command-line tools

Follow the 'OntimeControl Manual' to control Node/Root Beacons within slice in an automated manner.