| 1 | = !OnTimeMeasure-GENI Installation Document = |
| 2 | '''Prasad Calyam, Weiping Mandrawa, Kunpeng Zhu'''[[BR]] |
| 3 | '''May 31, 2010'''[[BR]] |
| 4 | |
| 5 | ''Software License:'' [http://www.geni.net/wp-content/uploads/2009/02/geniprojlic.pdf ''GENI Project License (GPL)''] [[BR]] |
| 6 | |
| 7 | == 1. System Requirements: == |
| 8 | A. Operating System: Fedora[[BR]] |
| 9 | |
| 10 | B. Software: MySQL, Graphite, Perl, Python, Iperf, Ruby, Bwctl-server, Bwctl-client, Twisted[[BR]] |
| 11 | |
| 12 | C. Perl Modules: Config::Natural, POSIX, Sys::HostIP, DBD::MySQL, IO::SOCKET::SSL, Log::Log4perl:Net::SSLeay, Math::Random[[BR]] |
| 13 | |
| 14 | |
| 15 | == 2. !OnTimeMeasure-GENI Installation: == |
| 16 | |
| 17 | === 2.1 ProtoGENI Slice Creation and Configuration === |
| 18 | |
| 19 | !OnTimeMeasure-GENI 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: |
| 20 | Get Started: |
| 21 | |
| 22 | * Network paths monitoring |
| 23 | * Network weather forecasting |
| 24 | * Network performance anomaly detection |
| 25 | * Network-bottleneck fault-location diagnosis |
| 26 | |
| 27 | The [http://ontime.oar.net ''OnTimeMeasure researcher web-portal''] enables a ProtoGENI/Emulab user to register, create and monitor experiment slices on a geographically distributed backbone encompassing Internet2 resources with experiment nodes at Kansas, Washington and Utah locations. |
| 28 | |
| 29 | An example deployment of centralized !OnTimeMeasure-GENI could feature 1 Root Beacon at Kansas, and 2 Node Beacons at Washington and Utah locations, respectively. |
| 30 | |
| 31 | An example deployment of distributed !OnTimeMeasure-GENI could feature Node Beacons at Kansas, Washington and Utah locations, respectively. |
| 32 | |
| 33 | In order to create slice, we need to define the corresponding RSpec. An example of a centralized orchestration RSpec that consists of 3 nodes is as follows: |
| 34 | {{{ |
| 35 | <rspec type="request" xmlns="http://www.protogeni.net/resources/rspec/0.1"> |
| 36 | |
| 37 | <!-- Fedora Backbone Node --> |
| 38 | <!-- Washington Location --> |
| 39 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg41" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 40 | virtual_id="ontime_nodebeacon1" virtualization_type="emulab-vnode" exclusive="1"> |
| 41 | <node_type type_name="pc" type_slots="1"/> |
| 42 | <interface virtual_id="virt-0"/> |
| 43 | </node> |
| 44 | |
| 45 | <!-- Fedora Backbone Node --> |
| 46 | <!-- Kansas Location --> |
| 47 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg43" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 48 | virtual_id="ontime_rootbeacon" virtualization_type="emulab-vnode" exclusive="1"> |
| 49 | <node_type type_name="pc" type_slots="1"/> |
| 50 | <interface virtual_id="virt-0"/> |
| 51 | <interface virtual_id="virt-1"/> |
| 52 | </node> |
| 53 | |
| 54 | <!-- Fedora Backbone Node --> |
| 55 | <!-- Utah Location --> |
| 56 | <node component_uuid="urn:publicid:IDN+emulab.net+node+pg45" component_manager_uuid="urn:publicid:IDN+emulab.net+authority+cm" |
| 57 | virtual_id="ontime_nodebeacon2" virtualization_type="emulab-vnode" exclusive="1"> |
| 58 | <node_type type_name="pc" type_slots="1"/> |
| 59 | <interface virtual_id="virt-1"/> |
| 60 | </node> |
| 61 | |
| 62 | <!-- Create link between root beacon located in Kansas to node beacon-1 located in Washington --> |
| 63 | <link virtual_id="root_beacon_to_node_beacon-1" link_type="ethernet"> |
| 64 | <interface_ref virtual_node_id="ontime_rootbeacon" virtual_interface_id="virt-0"/> |
| 65 | <interface_ref virtual_node_id="ontime_nodebeacon1" virtual_interface_id="virt-0"/> |
| 66 | <bandwidth>1000000</bandwidth> |
| 67 | </link> |
| 68 | |
| 69 | |
| 70 | <!-- Create link between root beacon located in Kansas to node beacon-2 located in Utah --> |
| 71 | <link virtual_id="root_beacon_to_node_beacon-2" link_type="ethernet"> |
| 72 | <interface_ref virtual_node_id="ontime_rootbeacon" virtual_interface_id="virt-1"/> |
| 73 | <interface_ref virtual_node_id="ontime_nodebeacon2" virtual_interface_id="virt-1"/> |
| 74 | <bandwidth>1000000</bandwidth> |
| 75 | </link> |
| 76 | |
| 77 | </rspec> |
| 78 | }}} |
| 79 | To check availability of nodes to include in an RSpec, please refer to the [https://www.emulab.net/nodecontrol_list.php3?showtype=widearea&typefilter=pcpg,pcpg-i2 ''Emulab web-page'']. Note that you will need to have an Emulab account to access the web-page.[[BR]] |
| 80 | |
| 81 | === 2.2 Sliver Creation and Management === |
| 82 | |
| 83 | - Register a slice |
| 84 | {{{ |
| 85 | registerslice.py –n <slice name> |
| 86 | }}} |
| 87 | |
| 88 | - Create sliver inside slice |
| 89 | {{{ |
| 90 | createssliver.py –n <slice name> <rspec file> |
| 91 | }}} |
| 92 | |
| 93 | - Start sliver |
| 94 | {{{ |
| 95 | startsliver –n <slice name> |
| 96 | }}} |
| 97 | |
| 98 | - Check sliver status |
| 99 | {{{ |
| 100 | sliverstatus –n <slice name> |
| 101 | }}} |
| 102 | |
| 103 | Note: You may need to renew your sliver just after successful creation. For this, |
| 104 | {{{ |
| 105 | renewsliver –n <slice name> <time> |
| 106 | }}} |
| 107 | |
| 108 | For more information on sliver creation and management, please refer to the [https://users.emulab.net/trac/protogeni/wiki/TutorialNew ''ProtoGENI Tutorial''] |
| 109 | |
| 110 | |
| 111 | === 2.3 Software Installation === |
| 112 | When all the slivers are "Ready", login to each of the servers and run the following commands to setup the environment: |
| 113 | |
| 114 | ''Get RPM key from Internet2''[[BR]] |
| 115 | Note: RPM key is needed to allow software installation through Internet2 network |
| 116 | |
| 117 | Software install on: [(Centralized: root beacon, node beacon), (Distributed: node beacon)] |
| 118 | |
| 119 | {{{ |
| 120 | sudo rpm --import http://software.internet2.edu/rpms/RPM-GPG-KEY-Internet2 |
| 121 | wget http://software.internet2.edu/Internet2-repo-0.1-2.noarch.rpm |
| 122 | sudo rpm -ivh Internet2-repo-0.1-2.noarch.rpm |
| 123 | sudo yum install perl-CPAN iperf ruby bwctl-server |
| 124 | }}} |
| 125 | |
| 126 | ''Perl CPAN Module Installation'' [[BR]] |
| 127 | Note: Installation must point to Internet2 Perl CPAN repository |
| 128 | |
| 129 | Software install on: [(Centralized: root beacon, node beacon), (Distributed: node beacon)] |
| 130 | |
| 131 | {{{ |
| 132 | sudo perl -MCPAN -e shell |
| 133 | conf urllist push ftp://cpan.uchicago.edu/pub/CPAN/ |
| 134 | conf commit |
| 135 | install YAML |
| 136 | install Sys::HostIP |
| 137 | install IO::Socket |
| 138 | force install Net::SSLeay |
| 139 | install IO::Socket::SSL |
| 140 | install Log::Log4perl |
| 141 | install Config::Natural |
| 142 | install Math::Random |
| 143 | exit |
| 144 | }}} |
| 145 | |
| 146 | Additional software install only on the [(Centralized: root beacon)] - |
| 147 | |
| 148 | |
| 149 | {{{ |
| 150 | sudo yum install mysql-server mysql-devel |
| 151 | sudo /sbin/service mysqld start |
| 152 | mysqladmin -u root password 'new-password' |
| 153 | }}} |
| 154 | |
| 155 | ''!OnTimeMeasure-GENI Software Installation'' |
| 156 | |
| 157 | Software install on: [(Centralized: root beacon, node beacon), (Distributed: node beacon)] |
| 158 | |
| 159 | Download [http://ontime.oar.net/download/Ontime-Geni-v1.0.tar.gz ''OnTimeMeasure-v1.0.tar.gz''] and untar/unzip on root beacon |
| 160 | and node beacons. |
| 161 | |
| 162 | === 2.4 Software Configuration === |
| 163 | |
| 164 | ''NTP Configuration'' |
| 165 | |
| 166 | Software configuration on: [(Distributed: node beacon)][[BR]] |
| 167 | |
| 168 | {{{ sudo vim /etc/ntp.conf }}} |
| 169 | Edit the last line to: |
| 170 | {{{ |
| 171 | server owamp.newy.net.internet2.edu |
| 172 | }}} |
| 173 | Restart ntpd service |
| 174 | {{{ |
| 175 | sudo /etc/init.d/ntpd restart |
| 176 | }}} |
| 177 | |
| 178 | ''BWCTL Configuration''[[BR]] |
| 179 | |
| 180 | |
| 181 | Software configuration on: [(Distributed: node beacon)] |
| 182 | |
| 183 | Edit the BWCTL config: /etc/bwctl/bwctl.conf [[BR]] |
| 184 | |
| 185 | Remove the comments on the below lines and edit them as: |
| 186 | {{{ |
| 187 | allow_unsync |
| 188 | sync_fuzz 5 |
| 189 | }}} |
| 190 | Edit the BWCTL limits: /etc/bwctl/bwctl.limits |
| 191 | Change the regular limit to: |
| 192 | {{{ |
| 193 | limit regular with parent=root, \ |
| 194 | duration=30, \ |
| 195 | allow_tcp=on, \ |
| 196 | allow_udp=on, \ |
| 197 | allow_open_mode=on |
| 198 | }}} |
| 199 | |
| 200 | ''Database Configuration''[[BR]] |
| 201 | |
| 202 | Software configuration on: [(Centralized: root beacon)] |
| 203 | {{{ |
| 204 | mysql -u root -p < BuildWebServicesDatabase.sql |
| 205 | mysql -u root -p < BuildMeasurementDatabase.sql |
| 206 | mysql -u root –p |
| 207 | }}} |
| 208 | At the mysql prompt, type |
| 209 | {{{ |
| 210 | CREATE USER 'collector'@'%' IDENTIFIED BY '<collector password>'; |
| 211 | GRANT ALL PRIVILEGES ON `Measurements` . * TO 'collector'@'%'; |
| 212 | GRANT ALL PRIVILEGES ON `WebServices` . * TO 'collector'@'%'; |
| 213 | }}} |
| 214 | |
| 215 | |
| 216 | ''Graphite and Twisted Installation''[[BR]] |
| 217 | |
| 218 | Software installation on: [(Centralized: root beacon)] |
| 219 | {{{ |
| 220 | sudo yum install Django mod_python python-memcached Twisted MySQL-python |
| 221 | sudo python setup.py install |
| 222 | }}} |
| 223 | |
| 224 | ''Graphite Configuration''[[BR]] |
| 225 | |
| 226 | Software configuration on: [(Centralized: root beacon)] |
| 227 | {{{ |
| 228 | sudo mv /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py |
| 229 | sudo vim /opt/graphite/webapp/graphite/local_settings.py |
| 230 | }}} |
| 231 | Uncomment and change TIME_ZONE='US/Eastern' Uncomment MEMCACHE_HOSTS |
| 232 | To initialize the Graphite database, type |
| 233 | {{{ |
| 234 | cd /opt/graphite/webapp/graphite |
| 235 | sudo python manage.py syncdb |
| 236 | }}} |
| 237 | Create the root user if asked. Then start the Graphite server - |
| 238 | {{{ |
| 239 | sudo chmod -R 777 /opt/graphite/storage |
| 240 | screen |
| 241 | /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite |
| 242 | Ctrl-a-d (key press sequence) |
| 243 | }}} |
| 244 | |
| 245 | Move the Carbon folder to opt[[BR]] |
| 246 | Software configuration on: [(Centralized: root beacon)] |
| 247 | {{{ |
| 248 | sudo cp -r carbon-0.9.6/* /opt/graphite/ |
| 249 | }}} |
| 250 | Go to /opt/graphite. Install and config Carbon by typing |
| 251 | {{{ |
| 252 | sudo python setup.py install |
| 253 | sudo chmod -R 777 /opt/graphite/storage |
| 254 | sudo mv /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf |
| 255 | sudo mv /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf |
| 256 | sudo vim /opt/graphite/conf/storage-schemas.conf |
| 257 | }}} |
| 258 | Change retentions to: retentions = 600:259200 |
| 259 | |
| 260 | Run Carbon by typing - |
| 261 | {{{ |
| 262 | python bin/carbon-cache.py --debug start |
| 263 | }}} |
| 264 | |
| 265 | |
| 266 | === 2.5 Software Invocation === |
| 267 | |
| 268 | Once all necessary software has been installed, please follow instructions as described below: |
| 269 | |
| 270 | ''On Node Beacons''[[BR]] |
| 271 | |
| 272 | Software invocation on: [(Centralized: node beacon)] |
| 273 | |
| 274 | Edit !NodeScheduler/etc/node.conf and go to 'Datagen/certs' run and type |
| 275 | {{{ |
| 276 | chmod +x createSSL.sh |
| 277 | ./createSSL.sh |
| 278 | }}} |
| 279 | Then go to the 'Datagen' folder and type |
| 280 | {{{ |
| 281 | perl node_scheduler.pl |
| 282 | }}} |
| 283 | |
| 284 | |
| 285 | ''On Root Beacon'' |
| 286 | |
| 287 | Software invocation on: [(Centralized: root beacon)] |
| 288 | |
| 289 | Edit !NodeScheduler/etc/root.conf and go to "Collector/" and type |
| 290 | {{{ |
| 291 | perl collector.pl |
| 292 | }}} |
| 293 | Next, go to "!RootScheduler/" |
| 294 | {{{ |
| 295 | perl action_script.pl |
| 296 | }}} |
| 297 | |
| 298 | ''On Node Beacons'' in the Distributed Orchestration Case - |
| 299 | |
| 300 | Software invocation on: [(Distributed: node beacon)] |
| 301 | |
| 302 | Edit Distributed/etc/node.conf and go to Distributed/Scheduler/ and type |
| 303 | {{{ |
| 304 | perl node_scheduler.pl |
| 305 | }}} |
| 306 | |
| 307 | |
| 308 | |
| 309 | |