| 1 | = !OnTimeMeasure-GENI Installation Document = |
| 2 | '''Prasad Calyam, Kunpeng Zhu''' |
| 3 | '''Sep 23, 2010''' |
| 4 | |
| 5 | ''Software License:'' [http://www.geni.net/wp-content/uploads/2009/02/geniprojlic.pdf ''GENI Project License (GPL)''] |
| 6 | |
| 7 | == 1. Getting Started == |
| 8 | 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: |
| 9 | |
| 10 | * Network paths monitoring |
| 11 | * Network weather forecasting |
| 12 | * Network performance anomaly detection |
| 13 | * Network-bottleneck fault-location diagnosis |
| 14 | |
| 15 | 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. |
| 16 | |
| 17 | Before proceeding further, we highly recommend reading the [http://groups.geni.net/geni/attachment/wiki/OnTimeMeasure/OnTimeMeasure-v1_Tutorial_061610.pdf Early Experimenter Tutorial]. |
| 18 | |
| 19 | == 2. Requirements == |
| 20 | |
| 21 | The !OnTimeMeasure software package has the following requirements: |
| 22 | |
| 23 | A. ''Operating System:'' Fedora 8 |
| 24 | |
| 25 | 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 |
| 26 | |
| 27 | 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] |
| 28 | |
| 29 | 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. |
| 30 | |
| 31 | '''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]] |
| 32 | |
| 33 | '''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. |
| 34 | |
| 35 | '''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. |
| 36 | |
| 37 | ''Pre-requisite Software:'' MySQL, Graphite, Perl, Python, Iperf, Ruby, Bwctl-server, Bwctl-client, Cairo, Python_Twisted, Python_Piddle |
| 38 | |
| 39 | ''Perl Modules:'' Config::Natural, POSIX, DBI, IO::Socket::SSL, Log::Log4perl, Net::SSLeay, Math::Random |
| 40 | |
| 41 | |
| 42 | == 3. Centralized Case Installation == |
| 43 | |
| 44 | === 3.1 Software Installation === |
| 45 | Download the latest !OnTimeMeasure release package at http://ontime.oar.net/download/OnTimeMeasure_latest.php. |
| 46 | |
| 47 | Once you have downloaded the tar file, untar/unzip to see that it contains: |
| 48 | |
| 49 | * !NodeBeacon.tar.gz |
| 50 | * !RootBeacon.tar.gz |
| 51 | * README.txt |
| 52 | |
| 53 | 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: |
| 54 | |
| 55 | |
| 56 | __'''''On the Root Beacon Server:'''''__ |
| 57 | |
| 58 | {{{ |
| 59 | tar xzf RootBeacon.tar.gz |
| 60 | cd RootBeacon/InstallScript |
| 61 | chmod +x ontime_software_install.sh |
| 62 | ./ontime_software_install.sh |
| 63 | }}} |
| 64 | |
| 65 | |
| 66 | __'''''On a Node Beacon Server:'''''__ |
| 67 | {{{ |
| 68 | tar xzf NodeBeacon.tar.gz |
| 69 | cd NodeBeacon/InstallScript |
| 70 | chmod +x ontime_software_install.sh |
| 71 | ./ontime_software_install.sh |
| 72 | }}} |
| 73 | |
| 74 | === 3.2 Software Configuration === |
| 75 | |
| 76 | __'''''On the Root Beacon Server:'''''__ |
| 77 | |
| 78 | __MySQL configuration__ |
| 79 | |
| 80 | {{{ |
| 81 | cd RootBeacon/InstallScript |
| 82 | mysql -u root < BuildWebServicesDatabase.sql |
| 83 | mysql -u root < BuildMeasurementDatabase.sql |
| 84 | mysql -u root |
| 85 | }}} |
| 86 | At the mysql prompt, type |
| 87 | {{{ |
| 88 | CREATE USER 'collector'@'%' IDENTIFIED BY '<collector password>'; |
| 89 | GRANT ALL PRIVILEGES ON `Measurements` . * TO 'collector'@'%'; |
| 90 | GRANT ALL PRIVILEGES ON `WebServices` . * TO 'collector'@'%'; |
| 91 | exit |
| 92 | }}} |
| 93 | '''Note 1:''' Please change the <collector password> to a safe password. |
| 94 | |
| 95 | '''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 |
| 96 | |
| 97 | |
| 98 | __Invocation options configuration__ |
| 99 | |
| 100 | {{{ |
| 101 | cd RootBeacon/InstallScript |
| 102 | perl config_wizard.pl |
| 103 | }}} |
| 104 | Follow the steps as directed by the wizard script. |
| 105 | |
| 106 | __'''''On a Node Beacon Server:'''''__ |
| 107 | |
| 108 | __Invocation options configuration__ |
| 109 | |
| 110 | {{{ |
| 111 | cd NodeBeacon/InstallScript |
| 112 | perl config_wizard.pl |
| 113 | }}} |
| 114 | Follow the steps as directed by the wizard script. |
| 115 | |
| 116 | __'''''On the Web-portal:'''''__ |
| 117 | |
| 118 | Login to the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and provide the Slice RSpec information. |
| 119 | |
| 120 | |
| 121 | === 3.3 Software Invocation === |
| 122 | |
| 123 | __'''''On the Root Beacon Server:'''''__ |
| 124 | |
| 125 | |
| 126 | Go to "!RootBeacon/!RootScheduler/" and run |
| 127 | {{{ |
| 128 | screen |
| 129 | /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite |
| 130 | }}} |
| 131 | If no error is reported, press '<CTRL>+a, c' sequence to open a new blank command window. |
| 132 | {{{ |
| 133 | perl file_server.pl |
| 134 | }}} |
| 135 | If no error is reported, press '<CTRL>+a, c' sequence to open a new blank command window. |
| 136 | {{{ |
| 137 | perl action_script.pl |
| 138 | }}} |
| 139 | If no error is reported, press '<CTRL>+a, c' sequence to open a new blank command window. |
| 140 | {{{ |
| 141 | cd ../Collector/ |
| 142 | perl collector.pl |
| 143 | }}} |
| 144 | If no error is reported, press '<CTRL>+a, d' sequence in the SSH window to keep the service running in the background. |
| 145 | |
| 146 | |
| 147 | |
| 148 | __'''''On a Node Beacon Server:'''''__ |
| 149 | |
| 150 | Go to '!NodeBeacon/Datagen/' and run |
| 151 | |
| 152 | {{{ |
| 153 | screen |
| 154 | perl file_server.pl |
| 155 | }}} |
| 156 | If no error is reported, press '<CTRL>+a, c' sequence to open a new blank command window. |
| 157 | {{{ |
| 158 | perl node_scheduler.pl |
| 159 | }}} |
| 160 | If no error is reported, press '<CTRL>+a, d' sequence in the SSH window to keep the service running in the background. |
| 161 | |
| 162 | |
| 163 | == 4. Distributed Case Installation == |
| 164 | |
| 165 | === 4.1 Software Installation === |
| 166 | Download the latest !OnTimeMeasure release package at http://ontime.oar.net/download/OnTimeMeasure_latest.php. |
| 167 | |
| 168 | Once you have downloaded the tar file, untar/unzip to see that it contains: |
| 169 | |
| 170 | * !NodeBeacon.tar.gz |
| 171 | * !RootBeacon.tar.gz |
| 172 | * README.txt |
| 173 | |
| 174 | |
| 175 | Only the !NodeBeacon.tar.gz is needed. Upload it to a node beacon server and run the following commands to install the measurement service: |
| 176 | |
| 177 | {{{ |
| 178 | tar xzf NodeBeacon.tar.gz |
| 179 | cd NodeBeacon/InstallScript |
| 180 | chmod +x ontime_software_install.sh |
| 181 | ./ontime_software_install.sh |
| 182 | }}} |
| 183 | |
| 184 | === 4.2 Software Configuration === |
| 185 | |
| 186 | |
| 187 | __NTP Configuration__ |
| 188 | |
| 189 | {{{ |
| 190 | sudo vim /etc/ntp.conf |
| 191 | }}} |
| 192 | Edit the last line to: |
| 193 | {{{ |
| 194 | server owamp.newy.net.internet2.edu |
| 195 | }}} |
| 196 | Restart ntpd service |
| 197 | {{{ |
| 198 | sudo /etc/init.d/ntpd restart |
| 199 | }}} |
| 200 | |
| 201 | __BWCTL Configuration__ |
| 202 | |
| 203 | Edit the BWCTL config: /etc/bwctld/bwctld.conf |
| 204 | |
| 205 | Remove the comments on the below lines and edit them as: |
| 206 | {{{ |
| 207 | allow_unsync |
| 208 | sync_fuzz 5 |
| 209 | }}} |
| 210 | |
| 211 | Edit the BWCTL limits: /etc/bwctld/bwctld.limits |
| 212 | Change the regular limit to: |
| 213 | |
| 214 | {{{ |
| 215 | limit regular with parent=root, \ |
| 216 | duration=30, \ |
| 217 | allow_tcp=on, \ |
| 218 | allow_udp=on, \ |
| 219 | allow_open_mode=on |
| 220 | }}} |
| 221 | |
| 222 | Restart BWCTL: |
| 223 | {{{ |
| 224 | sudo /etc/init.d/bwctld restart |
| 225 | }}} |
| 226 | |
| 227 | '''Note:''' For more detailed instructions to configure NTP and BWCTL, please refer to the BWCTL Tool website. (http://www.internet2.edu/performance/bwctl/) |
| 228 | |
| 229 | __Node Beacon invocation options configuration__ |
| 230 | |
| 231 | {{{ |
| 232 | cd NodeBeacon/InstallScript |
| 233 | perl config_wizard.pl |
| 234 | }}} |
| 235 | Follow the steps as directed by the wizard script. |
| 236 | |
| 237 | __'''''On the Web-portal:'''''__ |
| 238 | |
| 239 | Login to the [http://ontime.oar.net OnTimeMeasure Researcher Web-portal] and provide the Slice information. |
| 240 | |
| 241 | |
| 242 | === 4.3 Software Invocation === |
| 243 | |
| 244 | Go to '!NodeBeacon/Datagen/' and run |
| 245 | {{{ |
| 246 | screen |
| 247 | perl file_server.pl |
| 248 | }}} |
| 249 | If no error is reported, press '<CTRL>+a, c' sequence to open a new blank command window. |
| 250 | |
| 251 | '''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. |
| 252 | {{{ |
| 253 | perl dist_scheduler.pl |
| 254 | }}} |
| 255 | If no error is reported, press '<CTRL>+a, d' sequence in the SSH window to keep the service running in the background. |
| 256 | |
| 257 | == 5 Reference == |
| 258 | |
| 259 | === 5.1 Sample RSpec === |
| 260 | |
| 261 | An example of a centralized orchestration RSpec that consists of 3 nodes is as follows: |
| 262 | |
| 263 | {{{ |
| 264 | <rspec type="request" xmlns="http://www.protogeni.net/resources/rspec/0.2"> |
| 265 | |
| 266 | <!-- Fedora Backbone Node --> |
| 267 | <!-- Washington Location --> |
| 268 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg41" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 269 | virtual_id="ontime_nodebeacon1" virtualization_type="emulab-vnode" exclusive="1"> |
| 270 | <node_type type_name="pc" type_slots="1"/> |
| 271 | <interface virtual_id="virt-0"/> |
| 272 | </node> |
| 273 | |
| 274 | <!-- Fedora Backbone Node --> |
| 275 | <!-- Kansas Location --> |
| 276 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg43" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 277 | virtual_id="ontime_rootbeacon" virtualization_type="emulab-vnode" exclusive="1"> |
| 278 | <node_type type_name="pc" type_slots="1"/> |
| 279 | <interface virtual_id="virt-0"/> |
| 280 | <interface virtual_id="virt-1"/> |
| 281 | </node> |
| 282 | |
| 283 | <!-- Fedora Backbone Node --> |
| 284 | <!-- Utah Location --> |
| 285 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg45" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 286 | virtual_id="ontime_nodebeacon2" virtualization_type="emulab-vnode" exclusive="1"> |
| 287 | <node_type type_name="pc" type_slots="1"/> |
| 288 | <interface virtual_id="virt-1"/> |
| 289 | </node> |
| 290 | |
| 291 | <!-- Create link between root beacon located in Kansas to node beacon-1 located in Washington --> |
| 292 | <link virtual_id="root_beacon_to_node_beacon-1" link_type="ethernet"> |
| 293 | <interface_ref virtual_node_id="ontime_rootbeacon" virtual_interface_id="virt-0"/> |
| 294 | <interface_ref virtual_node_id="ontime_nodebeacon1" virtual_interface_id="virt-0"/> |
| 295 | <bandwidth>1000000</bandwidth> |
| 296 | </link> |
| 297 | |
| 298 | |
| 299 | <!-- Create link between root beacon located in Kansas to node beacon-2 located in Utah --> |
| 300 | <link virtual_id="root_beacon_to_node_beacon-2" link_type="ethernet"> |
| 301 | <interface_ref virtual_node_id="ontime_rootbeacon" virtual_interface_id="virt-1"/> |
| 302 | <interface_ref virtual_node_id="ontime_nodebeacon2" virtual_interface_id="virt-1"/> |
| 303 | <bandwidth>1000000</bandwidth> |
| 304 | </link> |
| 305 | |
| 306 | </rspec> |
| 307 | }}} |
| 308 | |
| 309 | === 2.3 Sliver Creation and Management === |
| 310 | |
| 311 | Create and manage a sliver by the Emulab test scripts. |
| 312 | |
| 313 | - Register a slice |
| 314 | {{{ |
| 315 | registerslice.py –n <slice name> |
| 316 | }}} |
| 317 | |
| 318 | - Create sliver inside slice |
| 319 | {{{ |
| 320 | createsliver.py –n <slice name> <rspec file> |
| 321 | }}} |
| 322 | |
| 323 | - Check sliver status |
| 324 | {{{ |
| 325 | sliverstatus –n <slice name> |
| 326 | }}} |
| 327 | |
| 328 | '''Note:''' You may need to renew your sliver just after successful creation. For this, |
| 329 | {{{ |
| 330 | renewsliver –n <slice name> <time> |
| 331 | }}} |