| 1 | [[PageOutline]] |
| 2 | = Experimenter Workflow = |
| 3 | [[br]] |
| 4 | = Prework = |
| 5 | 1. Download and install [http://www.virtualbox.org/ VirtualBox] on your |
| 6 | machine, we have tested versions 4.1.8 |
| 7 | * If you run Ubuntu 10.04, it comes with !VirtualBox 3.1.6_OSE, which will |
| 8 | not work, please download the latest version. |
| 9 | 2. [https://www.planet-lab.org/GEC11/ UPDATE Download] the VM image |
| 10 | 3. Run !VirtualBox and Import Appliance (File->Import Ampliance), accept the |
| 11 | default settings for the VM. |
| 12 | * If you are using a FAT32 filesystem you will NOT be able to load the |
| 13 | image. |
| 14 | 4. Start the VM and log in |
| 15 | 5. Change the default password, click on the getversion task bar on the top, |
| 16 | on the right on the user 'geni', and choose the Change Password button. |
| 17 | 6. Verify that the VM has connectivity. Start Firefox (shortcut on the top |
| 18 | bar) and try to load Google. If you can't reach any website, restore VM's |
| 19 | Network connection. |
| 20 | * On the far right on the top bar, there is the network icon (two opposite |
| 21 | facing arrows). |
| 22 | * Click that icon and choose 'Auto eth0'. |
| 23 | * Try loading the webpage again. |
| 24 | |
| 25 | = Useful Tips = |
| 26 | * You '''can copy-paste''' between the host and the guest VM. |
| 27 | * In the terminal within the VM, use '''Ctrl-Shift-C to copy''' and |
| 28 | '''Ctrl-Shift-V to paste'''. |
| 29 | * vim and emacs editors are installed on the VM, so feel free to use them for |
| 30 | editing your files |
| 31 | To replace a pattern within the file: |
| 32 | * If you are using vim, while in command mode, type: |
| 33 | {{{ |
| 34 | %s/pattern/replace_text/gc |
| 35 | }}} |
| 36 | And press 'y' for the instances of the pattern you want replaced, 'n' |
| 37 | otherwise. |
| 38 | * If you are using emacs, press Alt-x and then type: |
| 39 | {{{ |
| 40 | query-replace |
| 41 | }}} |
| 42 | and press ENTER. Enter the pattern to be replaced, press ENTER, enter the |
| 43 | text you want to replace it with and press ENTER. Press 'y' for the instances of |
| 44 | the pattern you want replaced, 'n' otherwise. |
| 45 | * If you want to have a shared folder between your machine and the VM so that |
| 46 | it's easier to transfer files during the tutorial, you have to do this before |
| 47 | starting the VM. Follow |
| 48 | [http://ozz314.wordpress.com/2008/05/08/virtualbox-shared-folders-between-ubuntu-guest-and-mac-host/ |
| 49 | these instructions] |
| 50 | * If you get an error running Omni, look at the |
| 51 | [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot troubleshoot page] for |
| 52 | help. |
| 53 | |
| 54 | = Overview of Alice's Experiment = |
| 55 | Alice and Bob, two GENI experimenters, have volunteered to help us write these |
| 56 | instructions. They are going to reserve separate hosts but they will be sharing |
| 57 | the network infrastructure. |
| 58 | |
| 59 | [[Image(alice-bob-setup.png, 60%)]] |
| 60 | |
| 61 | Alice's information for the tutorial is : |
| 62 | || '''<USERNAME>''' || alice || The user name for the tutorial's GPO ProtoGENI |
| 63 | account || |
| 64 | ||'''ProtoGENI host''' || pg46.emulab.net (@clemson)|| Node controlled by Utah's |
| 65 | ProtoGENI AM || |
| 66 | ||'''<PCNAME>''' || pg46 || For PG rspec || |
| 67 | ||'''MyPLC host''' || of-planet1.stanford.edu || Node controlled by Stanford's |
| 68 | MyPLC AM || |
| 69 | ||'''Backup MyPLC host''' || navis.gpolab.bbn.com || Node controlled by GPO's |
| 70 | MyPLC AM, if you run into problems with the first MyPLC host, you can try again |
| 71 | with this host|| |
| 72 | ||'''<SUBNET>''' || 10.42.122.0/24 || The subnet to use for Layer3 ping || |
| 73 | ||'''<SUBNET-OCT>''' || 122 || For the OF rspec || |
| 74 | ||'''<ETH-TYPE>''' || 10122 || The ethernet type for Layer2 ping, for the OF |
| 75 | rspec|| |
| 76 | ||'''<PORT>''' || 10122 || The port that the OpenFlow controller is listening on |
| 77 | || |
| 78 | |
| 79 | And after Alice and Bob completed the tutorial, Alice's scratchpad is : |
| 80 | |
| 81 | || '''SCRATCHPAD''' ||'''Complete this info''' || || |
| 82 | ||'''My MyPLC host IP(131)''' || 10.42.131. '''90''' || IP address of your |
| 83 | MyPLC host on the pre-configured subnet || |
| 84 | ||'''MyPLC login name''' ||'''pgenigpolabbbncom_aliceslice '''|| Your login name |
| 85 | to the MyPLC hosts || |
| 86 | ||'''Neighbor's MyPLC host IP(131)''' || 10.42.131. '''52'''|| IP address of |
| 87 | your neighbor's MyPLC host on the pre-configured subnet || |
| 88 | ||'''My MyPLC host IP(your subnet)''' || 10.42 . '''122''' . '''90'''|| The IP |
| 89 | address of your MyPLC host on your subnet || |
| 90 | ||'''Neighbor's MyPLC host IP(your subnet)''' || 10.42 . '''122''' . '''52'''|| |
| 91 | IP address of your neighbor's MyPLC host on the your subnet || |
| 92 | |
| 93 | = I. Getting Started = |
| 94 | |
| 95 | == 1. Firewalls == |
| 96 | Some of the compute resources are behind a firewall. |
| 97 | To avoid any firewall problems, please first login to |
| 98 | "ops.pgeni.gpolab.bbn.com", since we might |
| 99 | need to tunnel some traffic through this connections. |
| 100 | |
| 101 | To do that : |
| 102 | * '''Open a terminal window ''' (there is a shortcut on the top bar). |
| 103 | * ''' Change to the directory of your team '''. Substitute ## with the number of your team. |
| 104 | {{{ |
| 105 | cd Tutorials/ExptWorkflow/gpousr## |
| 106 | }}} |
| 107 | |
| 108 | * '''Connect to ops.pgeni.gpolab.bbn.com ''' |
| 109 | {{{ |
| 110 | xterm -e ssh -i ssh/geni_key -F ssh/config gpousr##@ops & |
| 111 | }}} |
| 112 | |
| 113 | == 1. Configure Omni == |
| 114 | The purpose of this first exercise is to setup |
| 115 | [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] to use your credentials and |
| 116 | keys. |
| 117 | |
| 118 | === 1a. Setup omni === |
| 119 | Omni uses as input a configuration file, where you can specify information such |
| 120 | as which clearinghouse to use, where your certificate and keys are located, etc. |
| 121 | Under the ''Tutorials/Omni/<username>'' directory (where <username> is your |
| 122 | username on the piece of paper you were given upon entering the room), there is |
| 123 | a configuration file, ''omni_config''. |
| 124 | |
| 125 | * '''Open a terminal''' (there is a shortcut on the top bar). |
| 126 | * First lets update the files that are on the VM: |
| 127 | {{{ |
| 128 | cd Tutorials/Omni/ |
| 129 | downloadRSpecs.sh |
| 130 | }}} |
| 131 | |
| 132 | * The rest of the tutorial assumes that you are under the |
| 133 | ''Tutorials/Omni/<username>'' directory : |
| 134 | {{{ |
| 135 | cd <username> |
| 136 | }}} |
| 137 | * '''Remove the passphrase''' from your certificate. For security best |
| 138 | practices you should keep a passphrase on your certificate. To avoid typing the |
| 139 | passphrase throughout the tutorial, we will temporarily remove the passphrase. |
| 140 | Run |
| 141 | {{{ |
| 142 | clear_cert.sh <username> |
| 143 | }}} |
| 144 | It will prompt you for the passphrase which should be included on the slip |
| 145 | that was given to you. |
| 146 | * Verify that you have the necessary credential and key files |
| 147 | {{{ |
| 148 | ls ssh |grep <username> |
| 149 | }}} |
| 150 | For gpousr21 the output looks like : |
| 151 | {{{ |
| 152 | geni@geni-vm:~/omni_tutorial$ ls ssh | grep gpousr21 |
| 153 | gpousr21_cert_ct.pem |
| 154 | gpousr21_cert.pem |
| 155 | gpousr21_key |
| 156 | gpousr21_key.pub |
| 157 | }}} |
| 158 | |
| 159 | || gpousr21_cert_ct.pem || Cleartext certificate for gpousr21, i.e. does not |
| 160 | require any passphrase || |
| 161 | || gpousr21_cert.pem || Encrypted certificate for gpousr21 || |
| 162 | || gpousr21_key || The private key that gpousr21 would use to login to the |
| 163 | nodes || |
| 164 | || gpousr21_key.pub || The corresponding public key that gpousr21 will ask to |
| 165 | be loaded to the nodes || |
| 166 | |
| 167 | * '''Look at the omni_config'''. Open omni_config. For the tutorial you |
| 168 | should use the cleartext certificate, but when running your own experiments, for |
| 169 | security best practices always use your encrypted certificate. |
| 170 | |
| 171 | For ''gpousr21'' using a cleartext certificate the omni_config file looks |
| 172 | like : |
| 173 | |
| 174 | {{{ |
| 175 | # This file is the omni_config for GEC 12 tutorial |
| 176 | # Experimental topologies on the GENI Mesoscale network with Omni |
| 177 | |
| 178 | # General section of omni config |
| 179 | [omni] |
| 180 | default_cf = pgeni |
| 181 | users = gpousr21 |
| 182 | |
| 183 | # ---------- Users ---------- |
| 184 | [gpousr21] |
| 185 | # Make sure the urn matches the URN of the credential |
| 186 | urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21 |
| 187 | |
| 188 | # Public key to be installed in compute resources. For multiple |
| 189 | # keys use a comma separated file |
| 190 | keys = ~/Tutorials/Omni/gpousr20/ssh/gpousr21_key.pub |
| 191 | |
| 192 | # If -a option is not specified the omni command will by run against all |
| 193 | # the following AMs |
| 194 | aggregates = http://emulab.net/protogeni/xmlrpc/am, |
| 195 | https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am, |
| 196 | http://myplc.gpolab.bbn.com:12346/, http://myplc.clemson.edu:12346/, |
| 197 | https://myplc.stanford.edu:12346/, |
| 198 | https://wings-openflow-1.wail.wisc.edu:12346/, |
| 199 | https://of.cs.washington.edu:12346/, https://plc.orbit-lab.org:12346/, |
| 200 | https://myplc.grnoc.iu.edu:12346/, https://myplc.cip.gatech.edu:12346/, |
| 201 | https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1 |
| 202 | |
| 203 | # ---------- Frameworks ---------- |
| 204 | [pgeni] |
| 205 | type = pg |
| 206 | ch = https://www.emulab.net:443/protogeni/xmlrpc/ch |
| 207 | sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa |
| 208 | |
| 209 | # Use the following two lines if you are using |
| 210 | # a certificate with a passphrase |
| 211 | #cert = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert.pem |
| 212 | #key = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert.pem |
| 213 | |
| 214 | # Use the following two lines if you are using |
| 215 | # a cleartext cert. |
| 216 | cert = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert_ct.pem |
| 217 | key = ~/Tutorials/Omni/gpousr21/ssh/gpousr21_cert_ct.pem |
| 218 | |
| 219 | #------AM nicknames---------------- |
| 220 | # Instead of typing the whole url of an AM in the -a option you can |
| 221 | # specify a nickname in this section and use the nickname instead |
| 222 | |
| 223 | # Format : |
| 224 | # Nickname=URN, URL |
| 225 | # URN is optional |
| 226 | [aggregate_nicknames] |
| 227 | # ProtoGENI AMs and PlanetLab central |
| 228 | pg-gpo=urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+am,https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am |
| 229 | pg-utah=,https://www.emulab.net/protogeni/xmlrpc/am |
| 230 | pg-ky=urn:publicid:IDN+uky.emulab.net+authority+am,https://www.uky.emulab.net/protogeni/xmlrpc/am |
| 231 | plc=,https://www.planet-lab.org:12346 |
| 232 | |
| 233 | # Private myplc installations |
| 234 | pl-gpo=,http://myplc.gpolab.bbn.com:12346/ |
| 235 | pl-clemson=,http://myplc.clemson.edu:12346/ |
| 236 | pl-stanford=,https://myplc.stanford.edu:12346/ |
| 237 | pl-wisconsin=,https://wings-openflow-1.wail.wisc.edu:12346/ |
| 238 | pl-washington=,https://of.cs.washington.edu:12346/ |
| 239 | pl-rutgers=,https://plc.orbit-lab.org:12346/ |
| 240 | pl-indiana=,https://localhost:1234/ |
| 241 | pl-gatech=,https://localhost:2346/ |
| 242 | |
| 243 | |
| 244 | # Tutorial OpenFlow AM |
| 245 | of-tut=,https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1 |
| 246 | |
| 247 | # Other OpenFlow AMs |
| 248 | of-gpo=,https://foam.gpolab.bbn.com:3626/foam/gapi/1 |
| 249 | }}} |
| 250 | |
| 251 | Note, the pgeni framework definition includes the Utah Emulab clearinghouse, |
| 252 | which is the only clearinghouse for ProtoGENI aggregates. For additional |
| 253 | configuration details please see the [http://trac.gpolab.bbn.com/gcf/wiki/Omni |
| 254 | Omni] page for more details. The omni_configuration parameters shown define the |
| 255 | following: [[BR]] |
| 256 | || '''Parameter''' || ''' Use''' || |
| 257 | || default_cf|| Default Clearinghouse and credentials used if not specified |
| 258 | on the command line. || |
| 259 | || users|| users setting used when reserving slices. || |
| 260 | || urn|| The username URN || |
| 261 | || keys|| A comma separated list of public ssh key files to be uploaded to |
| 262 | the Clearinghouse and to your resources || |
| 263 | || type|| Clearinghouse/credentials type "pg" indicates ProtoGENI, see the |
| 264 | [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] page. || |
| 265 | || ch|| ProtoGENI Clearinghouse URL. || |
| 266 | || sa|| Slice Authority URL. || |
| 267 | || cert|| Location of your SSL encrypted certificate (contains both a |
| 268 | certificate and a key). || |
| 269 | || key|| Location of your SSL encrypted key (contains both a certificate and |
| 270 | a key). || |
| 271 | || <AM nickname>|| Optional URN, required URL of an Aggregate Manager. || |
| 272 | |
| 273 | * Verify that the user URN is correct. |
| 274 | Get the URN from your omni config |
| 275 | {{{ |
| 276 | grep urn omni_config |
| 277 | }}} |
| 278 | Verify that it matches the urn in your cert (disregard the leading URI:) |
| 279 | {{{ |
| 280 | openssl x509 -noout -text -in ./ssh/<username>_cert_ct.pem | grep |
| 281 | 'urn:publicid' |
| 282 | }}} |
| 283 | For gpousr21 the output looks like |
| 284 | {{{ |
| 285 | geni@geni-vm:~/omni_tutorial$ grep urn omni_config |
| 286 | urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21 |
| 287 | geni@geni-vm:~/omni_tutorial$ openssl x509 -noout -text -in |
| 288 | ./ssh/gpousr21_cert_ct.pem | grep 'urn:publicid' |
| 289 | URI:urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21, |
| 290 | email:gpousr21@pgeni.gpolab.bbn.com |
| 291 | }}} |
| 292 | |
| 293 | === 1b. Test configuration === |
| 294 | In order to test that our configuration is correct, you can issue a getversion |
| 295 | command. For this step we have used !PlanetLab's AM, but you can use any |
| 296 | Aggregate Manager(AM). |
| 297 | {{{ |
| 298 | omni.py getversion -a http://www.planet-lab.org:12346 |
| 299 | }}} |
| 300 | |
| 301 | Or equivalently using the !PlanetLab nickname: |
| 302 | {{{ |
| 303 | omni.py getversion -a plc |
| 304 | }}} |
| 305 | |
| 306 | gpousr21 decided to use !PlanetLab central : |
| 307 | {{{ |
| 308 | #!xml |
| 309 | geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py getversion -a plc |
| 310 | INFO:omni:Loading config file omni_config |
| 311 | INFO:omni:Using control framework pgeni |
| 312 | INFO:omni:Substituting AM nickname plc with URL |
| 313 | https://www.planet-lab.org:12346, URN unspecified_AM_URN |
| 314 | INFO:omni:AM URN: unspecified_AM_URN (url: https://www.planet-lab.org:12346) has |
| 315 | version: |
| 316 | INFO:omni:{ 'ad_rspec_versions': [ { 'extensions': [ |
| 317 | 'http://www.protogeni.net/resources/rspec/ext/gre-tunnel/1', |
| 318 | 'http://www.protogeni.net/resources/rspec/ext/other-ext/3'], |
| 319 | 'namespace': |
| 320 | 'http://www.protogeni.net/resources/rspec/2', |
| 321 | 'schema': |
| 322 | 'http://www.protogeni.net/resources/rspec/2/ad.xsd', |
| 323 | 'type': 'ProtoGENI', |
| 324 | 'version': '2'}, |
| 325 | { 'extensions': [], |
| 326 | 'namespace': None, |
| 327 | 'schema': None, |
| 328 | 'type': 'SFA', |
| 329 | 'version': '1'}], |
| 330 | 'code_tag': '1.0-35', |
| 331 | 'code_url': 'git://git.onelab.eu/sfa.git@sfa-1.0-35', |
| 332 | 'default_ad_rspec': { 'extensions': [], |
| 333 | 'namespace': None, |
| 334 | 'schema': None, |
| 335 | 'type': 'SFA', |
| 336 | 'version': '1'}, |
| 337 | 'geni_api': 1, |
| 338 | 'hostname': 'www.planet-lab.org', |
| 339 | 'hrn': 'plc', |
| 340 | 'interface': 'aggregate', |
| 341 | 'request_rspec_versions': [ { 'extensions': [ |
| 342 | 'http://www.protogeni.net/resources/rspec/ext/gre-tunnel/1', |
| 343 | 'http://www.protogeni.net/resources/rspec/ext/other-ext/3'], |
| 344 | 'namespace': |
| 345 | 'http://www.protogeni.net/resources/rspec/2', |
| 346 | 'schema': |
| 347 | 'http://www.protogeni.net/resources/rspec/2/request.xsd', |
| 348 | 'type': 'ProtoGENI', |
| 349 | 'version': '2'}, |
| 350 | { 'extensions': [], |
| 351 | 'namespace': None, |
| 352 | 'schema': None, |
| 353 | 'type': 'SFA', |
| 354 | 'version': '1'}], |
| 355 | 'sfa': 1, |
| 356 | 'testbed': 'myplc'} |
| 357 | INFO:omni: ------------------------------------------------------------ |
| 358 | INFO:omni: Completed getversion: |
| 359 | |
| 360 | Options as run: |
| 361 | aggregate: plc |
| 362 | framework: pgeni |
| 363 | native: True |
| 364 | |
| 365 | Args: getversion |
| 366 | |
| 367 | Result Summary: |
| 368 | Got version for 1 out of 1 aggregates |
| 369 | |
| 370 | INFO:omni: ============================================================ |
| 371 | }}} |
| 372 | |
| 373 | == 2. Make a slice == |
| 374 | Before we continue with the rest of the tutorial, we need to create a slice that |
| 375 | will contain all our slivers with the different AMs. |
| 376 | Since the omni_config specifies using GPO's ProtoGENI as the Slice Authority |
| 377 | (SA), your slice will be created in the pgeni.gpolab.bbn.com namespace. |
| 378 | |
| 379 | === 2a. Createslice === |
| 380 | For this tutorial we will create a slice named ''gposlice##'' (where ## matches |
| 381 | your username); you should always choose a slice name that is meaningful to you. |
| 382 | To avoid confusion, avoid creating a slice with the same name as your username |
| 383 | (i.e. if your username is ''alice'', don't name your slice ''alice'' too). |
| 384 | {{{ |
| 385 | omni.py createslice gposlice## |
| 386 | }}} |
| 387 | |
| 388 | |
| 389 | === 2b. Renew Slice === |
| 390 | Note in the above output that our new slice expires soon. Your slivers can not |
| 391 | last longer then your slice, and your resources will go away when the |
| 392 | reservation expires. For your experiments be sure to renew your slice for the |
| 393 | duration of your experiment. For the tutorial you don't need to extend the |
| 394 | lifetime, but if you wanted to, this is what it would look like: |
| 395 | |
| 396 | {{{ |
| 397 | omni.py renewslice gposlice## 20111105T00:00:00 |
| 398 | }}} |
| 399 | |
| 400 | For Alice the output would like: |
| 401 | {{{ |
| 402 | geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py renewslice gposlice21 |
| 403 | 20111105T00:00:00 |
| 404 | INFO:omni:Loading config file omni_config |
| 405 | INFO:omni:Using control framework pgeni |
| 406 | INFO:omni.protogeni:Requesting new slice expiration '2011-11-05T00:00:00' |
| 407 | INFO:omni:Slice gposlice21 now expires at 2011-11-05 00:00:00 UTC |
| 408 | INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21 expires |
| 409 | on 2011-11-05 00:00:00 UTC |
| 410 | INFO:omni: ------------------------------------------------------------ |
| 411 | INFO:omni: Completed renewslice: |
| 412 | |
| 413 | Options as run: |
| 414 | framework: pgeni |
| 415 | native: True |
| 416 | |
| 417 | Args: renewslice gposlice21 20111105T00:00:00 |
| 418 | |
| 419 | Result Summary: Slice gposlice21 now expires at 2011-11-05 00:00:00 UTC |
| 420 | Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21 expires on |
| 421 | 2011-11-05 00:00:00 UTC |
| 422 | INFO:omni: ============================================================ |
| 423 | |
| 424 | }}} |
| 425 | |
| 426 | '''Note:''' You can not renew the slice expiration time to an earlier time that |
| 427 | its current expiration time. Also there is no deleteslice operation. However, |
| 428 | you can delete all the slivers in your slice and let the slice expire. |
| 429 | |
| 430 | |
| 431 | === 2c. List your Slices === |
| 432 | If you want to find out what slices you currently have, you can use an Omni |
| 433 | command to {{{listmyslices}}}. |
| 434 | {{{ |
| 435 | omni.py listmyslices <username> |
| 436 | }}} |
| 437 | |
| 438 | We've pre-reserved resources in a second slice (ctrl##) in advance of the |
| 439 | tutorial for each user. |
| 440 | |
| 441 | So for gpousr21 the output would look like : |
| 442 | {{{ |
| 443 | geni@geni-tutorial:~/Tutorials/Omni/gpousr21$ omni.py listmyslices gpousr21 |
| 444 | INFO:omni:Loading config file omni_config |
| 445 | INFO:omni:Using control framework pgeni |
| 446 | INFO:omni:User 'gpousr21' has slices: |
| 447 | urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+gposlice21 |
| 448 | urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ctrl21 |
| 449 | INFO:omni: ------------------------------------------------------------ |
| 450 | INFO:omni: Completed listmyslices: |
| 451 | |
| 452 | Options as run: |
| 453 | framework: pgeni |
| 454 | native: True |
| 455 | |
| 456 | Args: listmyslices gpousr21 |
| 457 | |
| 458 | Result Summary: Found 2 slices for user 'gpousr21'. |
| 459 | |
| 460 | INFO:omni: ============================================================ |
| 461 | |
| 462 | }}} |
| 463 | |
| 464 | == 3. Make a ProtoGENI sliver == |
| 465 | The first resource we are going to add to our slice is a ProtoGENI host. |
| 466 | |
| 467 | === 3a. Createsliver === |
| 468 | Under the ''Tutorials/Omni/<username>'' directory, there is a directory called |
| 469 | ''rspecs'' that has all the necessary RSpecs for the tutorial. For this tutorial |
| 470 | we are going to use ProtoGENI hosts from GPO's ProtoGENI, as well as Wide Area |
| 471 | ProtoGENI hosts from Utah's ProtoGENI cluster. |
| 472 | * If your ProtoGENI host is in the '''emulab.net'''(e.g. pg30.emulab.net), |
| 473 | namespace then it belongs to Utah's cluster and you should use Utah's AM |
| 474 | (nickname: pg-utah), and use '''rspecs/final/protogeni_utah_<username>.rspec''' |
| 475 | |
| 476 | * If your ProtoGENI host is in the '''pgeni.gpolab.bbn.com'''(e.g. |
| 477 | pc1.pgeni.gpolab.bbn.com), namespace then it belongs to GPO's cluster and you |
| 478 | should use GPO's AM (nickname: pg-gpo), and use |
| 479 | '''rspecs/final/protogeni_gpo_<username>_v02.rspec''' |
| 480 | |
| 481 | * '''Advanced Option''': If you are interested in creating your own RSpecs |
| 482 | follow the instructions under [#ReservingProtoGENInodeswithFlack Reserving |
| 483 | ProtoGENI nodes with Flack]. Then skip to the [#a3b.Sliverstatus Next Step]. |
| 484 | |
| 485 | gpousr21 was assigned host pc1.pgeni.gpolab.bbn.com so she should use |
| 486 | pg_gpo.rspec: |
| 487 | {{{ |
| 488 | #!xml |
| 489 | <!-- |
| 490 | This rspec will reserve one wide-area ProtoGENI host |
| 491 | |
| 492 | AM: http://www.emulab.net/protogeni/xmlrpc/am |
| 493 | --> |
| 494 | <!-- This file is an rspec for GEC 12 tutorial |
| 495 | --> |
| 496 | |
| 497 | <rspec type="request" |
| 498 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 499 | http://www.protogeni.net/resources/rspec/2/request.xsd" |
| 500 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 501 | xmlns="http://www.protogeni.net/resources/rspec/2"> |
| 502 | |
| 503 | <node client_id="pc1" |
| 504 | component_manager_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm" |
| 505 | component_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+node+pc1" |
| 506 | component_name="pc1" exclusive="true"> |
| 507 | <sliver_type name="raw-pc"> |
| 508 | <disk_image |
| 509 | name="urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops//UBUNTU1004-STD"/> |
| 510 | </sliver_type> |
| 511 | <services> |
| 512 | <execute command="cd /home/gpousr21/config_dir;./install.sh" shell="sh " |
| 513 | /> |
| 514 | <install install_path="/home/gpousr21" |
| 515 | url="http://192.1.249.166:8383/gec12tutorial_ubuntu.tar.gz" file_type="tar.gz"/> |
| 516 | </services> |
| 517 | </node> |
| 518 | |
| 519 | </rspec> |
| 520 | |
| 521 | |
| 522 | }}} |
| 523 | |
| 524 | * Now you are ready to reserve your host on the '''appropriate''' AM. For |
| 525 | easy access and to be able to copy and paste AM URLs that are used in this |
| 526 | tutorial, we made a [#AMURLTable table]. If your node is '''pg46.emulab.net''', |
| 527 | you are sharing your node with Alice. Alice has already created the sliver for |
| 528 | you, so you can run the 'createsliver' command, and its ok if it fails. |
| 529 | {{{ |
| 530 | omni.py createsliver -a <AM_NICKNAME> gposlice## rspecs/final/<rspec_file> |
| 531 | }}} |
| 532 | |
| 533 | The output should look like : |
| 534 | {{{ |
| 535 | #!xml |
| 536 | |
| 537 | geni@geni-vm:~/omni_tutorial$ omni.py createsliver -a |
| 538 | http://www.emulab.net/protogeni/xmlrpc/am aliceslice rspecs/pg_utah.rspec |
| 539 | |
| 540 | FILL IN HERE |
| 541 | |
| 542 | }}} |
| 543 | |
| 544 | === 3b. Sliverstatus === |
| 545 | |
| 546 | We asked for an exclusive ProtoGENI host, which means that the node needs to be |
| 547 | loaded with the right OS and booted, before our sliver is ready to use. This |
| 548 | will take a while. We can check the status of our sliver, using the |
| 549 | ''sliverstatus'' call. |
| 550 | |
| 551 | {{{ |
| 552 | omni.py sliverstatus -a <AM_NICKNAME> gposlice## |
| 553 | }}} |
| 554 | |
| 555 | The status will probably be 'not ready', you can continue with the next steps of |
| 556 | the tutorial, and we will come back to this node later. |
| 557 | |
| 558 | = II. Using Physical Topology to Influence Your Experiment = |
| 559 | |
| 560 | In this exercise we are going to test and see how the underlying network |
| 561 | topology can affect the topology of your experiment. For this exercise we have |
| 562 | already setup the networking portion of the exercise, so you just need to |
| 563 | reserve your compute resources. |
| 564 | |
| 565 | == 1. Make a MyPLC sliver == |
| 566 | For this exercise you would need to reserve two MyPlc hosts, each in a different |
| 567 | AM. |
| 568 | Under the rspecs directory (Tutorials/ExptWorkflow/gpousr##/rspecs/) there |
| 569 | are the two MyPLC rspecs that you should use. |
| 570 | |
| 571 | * The name of the rspec is of the form myplc-<site>-<node>.rspec. You should |
| 572 | take a look in this [#AMURLTable table] to find out what is the |
| 573 | nickname for the AM, and try to reserve the sliver. Also open your omni_config file |
| 574 | and check how the nicknames are defined. |
| 575 | |
| 576 | * '''Advanced Option''': If you are interested in creating your own RSpecs |
| 577 | follow the instructions under |
| 578 | [##CreatingPlanetLabRequestRSpecsfromAdvertisementRSpecs Creating PL Request |
| 579 | RSpecs from Ad. RSpecs]. Then skip to the [#a2.Logintothenodes---OmniScripting |
| 580 | Next Step]. |
| 581 | |
| 582 | gpousr21 was assigned hosts bain.gpolab.bbn.com |
| 583 | {{{ |
| 584 | #!xml |
| 585 | <?xml version="1.0" ?> |
| 586 | <!-- Resources at AM: |
| 587 | URN: http://myplc.gpolab.bbn.com:12346/ |
| 588 | --> |
| 589 | |
| 590 | <rspec type="request" |
| 591 | xmlns="http://www.protogeni.net/resources/rspec/2" |
| 592 | xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" |
| 593 | xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" |
| 594 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 595 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 596 | http://www.protogeni.net/resources/rspec/2/request.xsd"> |
| 597 | <node |
| 598 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+bain.gpolab.bbn.com" |
| 599 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 600 | component_name="bain.gpolab.bbn.com" |
| 601 | exclusive="false" |
| 602 | client_id="ganel"> |
| 603 | <sliver_type name="plab-vnode"/> |
| 604 | </node> |
| 605 | </rspec> |
| 606 | }}} |
| 607 | |
| 608 | * Now you are ready to reserve your host on the '''appropriate''' AM. For |
| 609 | easy access and to be able to copy and paste AM URLs and nicknames that are used |
| 610 | in this tutorial, we made a [#AMURLTable table]. |
| 611 | {{{ |
| 612 | omni.py createsliver -a <AM_NICKNAME> gposlice## rspecs/<rspec_file> |
| 613 | }}} |
| 614 | |
| 615 | The output should look like : |
| 616 | {{{ |
| 617 | #!xml |
| 618 | |
| 619 | geni@geni-tutorial:~/Tutorials/ExptWorkflow/gpousr10$ omni.py createsliver sliceomni10 |
| 620 | rspecs/final/myplc-gpolab-ganel.rspec -a pl-gpo |
| 621 | INFO:omni:Loading config file omni_config |
| 622 | INFO:omni:Using control framework pgeni |
| 623 | INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 expires |
| 624 | within 1 day on 2011-11-04 06:57:31 UTC |
| 625 | INFO:omni:Substituting AM nickname pl-gpo with URL |
| 626 | http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN |
| 627 | INFO:omni:Substituting AM nickname pl-gpo with URL |
| 628 | http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN |
| 629 | INFO:omni:Creating sliver(s) from rspec file |
| 630 | rspecs/final/myplc-gpolab-ganel.rspec for slice |
| 631 | urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 |
| 632 | INFO:omni:Asked http://myplc.gpolab.bbn.com:12346/ to reserve resources. Result: |
| 633 | INFO:omni:<?xml version="1.0" ?> |
| 634 | INFO:omni:<!-- Reserved resources for: |
| 635 | Slice: sliceomni10 |
| 636 | At AM: |
| 637 | URL: http://myplc.gpolab.bbn.com:12346/ |
| 638 | --> |
| 639 | INFO:omni:<rspec expires="2011-11-04T01:58:07Z" generated="2011-11-04T00:58:07Z" |
| 640 | type="manifest" xmlns="http://www.protogeni.net/resources/rspec/2" |
| 641 | xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" |
| 642 | xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" |
| 643 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 644 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 645 | http://www.protogeni.net/resources/rspec/2/manifest.xsd"> |
| 646 | <node client_id="ganel.gpolab.bbn.com" |
| 647 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+ganel.gpolab.bbn.com" |
| 648 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 649 | component_name="ganel.gpolab.bbn.com" exclusive="false" |
| 650 | sliver_id="urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10:291:4:0"> |
| 651 | <hardware_type name="plab-pc"/> |
| 652 | <hardware_type name="pc"/> |
| 653 | <location country="us" latitude="42.3897" longitude="-71.1475"/> |
| 654 | <sliver_type name="plab-vnode"/> |
| 655 | </node> |
| 656 | </rspec> |
| 657 | INFO:omni: ------------------------------------------------------------ |
| 658 | INFO:omni: Completed createsliver: |
| 659 | |
| 660 | Options as run: |
| 661 | aggregate: pl-gpo |
| 662 | framework: pgeni |
| 663 | native: True |
| 664 | |
| 665 | Args: createsliver sliceomni10 rspecs/final/myplc-gpolab-ganel.rspec |
| 666 | |
| 667 | Result Summary: Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+sliceomni10 |
| 668 | expires within 1 day(s) on 2011-11-04 06:57:31 UTC |
| 669 | Reserved resources on http://myplc.gpolab.bbn.com:12346/. |
| 670 | INFO:omni: ============================================================ |
| 671 | }}} |
| 672 | |
| 673 | Follow the same procedure to reserve your second myPLC host. |
| 674 | |
| 675 | == 2. Login to the nodes --- Omni Scripting == |
| 676 | |
| 677 | After reserving the nodes, we are ready to login. When reserving !PlanetLab |
| 678 | resources, using a different clearinghouse, the login name that should be used |
| 679 | to access the nodes is ''''not'''' the username. The username is listed as part |
| 680 | of the sliverstatus call. For common functionality like this that is expected to |
| 681 | be used often, omni gives you the capability of writing scripts and including |
| 682 | omni as a library. |
| 683 | Under omni_tutorial there is a folder 'example_scripts' that includes example |
| 684 | python scripts that use Omni. One script that is available is the |
| 685 | ''getMyLogin.py'' script that will return the exact command for logging-in to |
| 686 | your nodes. |
| 687 | {{{ |
| 688 | readyToLogin -a <AM_NICKNAME> gposlice## |
| 689 | }}} |
| 690 | |
| 691 | The script will return the actual command that you would need to use for logging |
| 692 | in. |
| 693 | |
| 694 | For gpousr21 the script would return : |
| 695 | |
| 696 | {{{ |
| 697 | ================================================================================ |
| 698 | Aggregate [https://myplc.stanford.edu:12346] has a PlanetLab sliver. |
| 699 | of-planet1.stanford.edu's pl_boot_state is: |
| 700 | boot |
| 701 | Login using: |
| 702 | xterm -e ssh -i ssh/gpousr21_key |
| 703 | pgenigpolabbbncom_gposlice21@bain.gpolab.bbn.com & |
| 704 | |
| 705 | ================================================================================ |
| 706 | }}} |
| 707 | |
| 708 | For user gpousr21 this would be : |
| 709 | {{{ |
| 710 | xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@ops & |
| 711 | }}} |
| 712 | |
| 713 | '''Note''': If your hosts are in Georgia Tech you would need to use the |
| 714 | connection through ops. |
| 715 | To do that run |
| 716 | {{{ |
| 717 | xterm -e ssh -i ssh/gpousr##_key -F ssh/config <hostname> & |
| 718 | }}} |
| 719 | |
| 720 | For gpousr21 that would be : |
| 721 | {{{ |
| 722 | xterm -e ssh -i ssh/gpousr21_key -F ssh/config bain & |
| 723 | }}} |
| 724 | |
| 725 | == 3. Test Different Topologies == |
| 726 | The Mesoscaly deployment can offer, different topologies even if the |
| 727 | communication is between the same hosts. We have provisioned |
| 728 | two different subnets in the Mesoscale infrastructure, each using a different |
| 729 | VLAN (one using 3715 and the other 3716). |
| 730 | |
| 731 | The two subnets that have been provisioned are '''10.42.131.0/24''' on 3715 and |
| 732 | '''10.42.132.0/24''' on 3716. |
| 733 | |
| 734 | First of all let's see how we can figure out the IP of the hosts we reserved : |
| 735 | |
| 736 | * List all the interfaces in your host. You will see that there many |
| 737 | interfaces of the form eth1.XXXX |
| 738 | {{{ |
| 739 | /sbin/ifconfig |
| 740 | }}} |
| 741 | Part of the output would look like : |
| 742 | {{{ |
| 743 | eth1.1750:42147 Link encap:Ethernet HWaddr 00:B0:D0:E1:6F:78 |
| 744 | inet addr:10.42.147.90 Bcast:10.42.147.255 Mask:255.255.255.0 |
| 745 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 746 | |
| 747 | eth1.1750:42148 Link encap:Ethernet HWaddr 00:B0:D0:E1:6F:78 |
| 748 | inet addr:10.42.148.90 Bcast:10.42.148.255 Mask:255.255.255.0 |
| 749 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 750 | }}} |
| 751 | |
| 752 | * Figure out the last octet of the IP address of your hosts. The way these |
| 753 | MyPLC hosts are setup, is that they have multiple subinterfaces, each configured |
| 754 | to be part of a different IP subnet. Almost all subnets in the hosts are in the |
| 755 | form of 10.42.Y.0/24. You will notice that for all these subnets, your host has |
| 756 | the same last octet. In the example above all the subinterfaces of eth1, will |
| 757 | have an IP address that will end in '''90''' (10.42.147.'''90''', |
| 758 | 10.42.148.'''90''') |
| 759 | |
| 760 | * Ping over 3715. After loging in to your hosts ping from host1 to host2. |
| 761 | Assuming that host2 has a last octet of YYY you should: |
| 762 | |
| 763 | {{{ |
| 764 | ping 10.42.131.YYY |
| 765 | }}} |
| 766 | Notice the RTT on the packets. |
| 767 | |
| 768 | * Ping over 3716. After loging in to your hosts ping from one host2 to host1. |
| 769 | Assuming that host1 has XXX as it's last octet you should ping |
| 770 | |
| 771 | {{{ |
| 772 | ping 10.42.132.XXX |
| 773 | }}} |
| 774 | Notice the RTT on the packets and compare it with the above ping. |
| 775 | |
| 776 | = III. Exercise 3: Run a Layer 2 Experiment = |
| 777 | = V. Run a Layer 2 ping = |
| 778 | The mesoscale GENI resources are connected on Layer 2, which enables Layer 2, i.e. non-IP experiments. In this exercise we are going |
| 779 | to run a layer 2 ping program, where we are going to send raw Ethernet frames of a custom Ethernet type to a server and receive a reply. |
| 780 | Currently MyPLC only supports IP experiments, so we will use our ProtoGENI host which we have reserved in the beginning. |
| 781 | * check that your sliver is ready |
| 782 | {{{ |
| 783 | omni.py sliverstatus -a <AM_NICKNAME> <SLICE_NAME> |
| 784 | }}} |
| 785 | |
| 786 | * If your sliver is ready, login to the node (if your host is '''pg33''', '''pg32''' please read the notes): |
| 787 | {{{ |
| 788 | ssh -i ./ssh/geni_key <username>@<host> |
| 789 | }}} |
| 790 | |
| 791 | For Alice, that has reserved node pg46.emulab.net: |
| 792 | {{{ |
| 793 | ssh -i ./ssh/geni_key alice@pg46.emulab.net |
| 794 | }}} |
| 795 | |
| 796 | '''NOTE 1:''' If your node is '''pg32.emulab.net''' or '''pg33.emulab.net''', you will need to do some extra work to login to the node. The control interface of these nodes is behind a firewall so you will login to your node through 'ops.pgeni.gpolab.bbn.com'. Run |
| 797 | {{{ |
| 798 | xterm -e ssh -i ssh/<username>_key -L2222:<host>:22 <username>@ops.pgeni.gpolab.bbn.com & |
| 799 | }}} |
| 800 | This command forwards local port 2222 to go through the connection at ops.pgeni.gpolab.bbn.com and from there connect to your host on port 22. |
| 801 | Now you are ready to login to your node |
| 802 | {{{ |
| 803 | ssh -i /ssh/<username>_key <username>@localhost -p 2222 |
| 804 | }}} |
| 805 | |
| 806 | '''NOTE 2:''' If your node is '''pg46.emulab.net''', remember you are sharing your node with Alice. To login to the node do : |
| 807 | {{{ |
| 808 | xterm -e ssh -i ~/omni_tutorial/ssh/<USERNAME>_key alice@pg46.emulab.net & |
| 809 | }}} |
| 810 | |
| 811 | |
| 812 | |
| 813 | * Check to see that the software has been downloaded : |
| 814 | {{{ |
| 815 | [alice@protogeni1 ~]$ ls |
| 816 | config_dir pingPlus |
| 817 | }}} |
| 818 | |
| 819 | * Configure the node. When you login to the node, the data interface of the host is not configured. |
| 820 | {{{ |
| 821 | [alice@protogeni1 ~]$ /sbin/ifconfig |
| 822 | }}} |
| 823 | This should list only two interface, the loopback and the control interface. Part of the tarball that was downloaded, is a script that will configure the node, and compile the Layer 2 ping software. Run |
| 824 | {{{ |
| 825 | ./config_dir/configure.sh |
| 826 | }}} |
| 827 | The output for Alice would look like |
| 828 | {{{ |
| 829 | [alice@protogeni1 ~]$ ./config_dir/configure.sh |
| 830 | DEVICE=eth1.1750 |
| 831 | USERCTL=no |
| 832 | VLAN=yes |
| 833 | IPADDR=10.42.131.146 |
| 834 | NETMASK=255.255.255.0 |
| 835 | BOOTPROTO=static |
| 836 | ONBOOT=yes |
| 837 | |
| 838 | Added VLAN with VID == 1750 to IF -:eth1:- |
| 839 | gcc -c -o packetFunctions.o packetFunctions.c |
| 840 | gcc -c -o pingPlusListener.o pingPlusListener.c |
| 841 | gcc packetFunctions.o pingPlusListener.o -o pingPlusListener |
| 842 | gcc -c -o pingPlus.o pingPlus.c |
| 843 | gcc packetFunctions.o pingPlus.o -o pingPlus |
| 844 | }}} |
| 845 | Verify that the data interface is up : |
| 846 | {{{ |
| 847 | [alice@protogeni1 ~]$ /sbin/ifconfig |
| 848 | }}} |
| 849 | and note the name of the data interface, the data interface is the one that has an IP address in the 10.42.131.0/24 subnet: |
| 850 | {{{ |
| 851 | eth1.1750 Link encap:Ethernet HWaddr 00:1F:29:32:92:4D |
| 852 | inet addr:10.42.131.146 Bcast:10.42.131.255 Mask:255.255.255.0 |
| 853 | inet6 addr: fe80::21f:29ff:fe32:924d/64 Scope:Link |
| 854 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 855 | RX packets:118 errors:0 dropped:0 overruns:0 frame:0 |
| 856 | TX packets:115 errors:0 dropped:0 overruns:0 carrier:0 |
| 857 | collisions:0 txqueuelen:0 |
| 858 | RX bytes:5428 (5.3 KiB) TX bytes:3482 (3.4 KiB) |
| 859 | |
| 860 | }}} |
| 861 | In this case the name is 'eth1.1750'. |
| 862 | |
| 863 | * Run the Layer 2 Ping |
| 864 | We have pre-configured the network to forward along Layer2 packets of Ethernet type '10131', so let's try pinging with that. |
| 865 | The software that is going to send Layer 2 pings, is called pingPlus. Change to the pingPlus directory : |
| 866 | {{{ |
| 867 | cd pingPlus |
| 868 | }}} |
| 869 | There is a server running at a host with mac address '00:15:17:d4:64:c2'. Run the client : |
| 870 | {{{ |
| 871 | sudo ./pingPlus 00:15:17:d4:64:c2 <interface_name> 10131 |
| 872 | }}} |
| 873 | For Alice the output would be : |
| 874 | {{{ |
| 875 | [alice@protogeni1 ~/pingPlus]$ sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 10131 |
| 876 | RQ:'5019+6242' to 0:15:17:d4:64:c2. |
| 877 | RL:5019+6242=11261 from 0:15:17:d4:64:c2. |
| 878 | }}} |
| 879 | Send a stream of packets, by specifying the number of packets as the last parameter : |
| 880 | {{{ |
| 881 | sudo ./pingPlus 00:15:17:d4:64:c2 <interface_name> 10131 10 |
| 882 | }}} |
| 883 | '''Note:'''If the program is stuck waiting for a reply for more than 1 minute, press '''Ctrl-C''' to exit. |
| 884 | |
| 885 | Congratulations you ran a Layer two experiment across the country! |
| 886 | |
| 887 | |
| 888 | = III. Exercise 2: Using !OpenFlow to Create Your Experiment's Topology = |
| 889 | Another way to control the path that your packets are taking is with OpenFlow |
| 890 | controllers. In this exercise we are going to use an OpenFlow controller that |
| 891 | will deflect packets from one server to another one. We will start first by |
| 892 | reserving an OpenFlow sliver. |
| 893 | |
| 894 | == 1. Make an OpenFlow sliver == |
| 895 | |
| 896 | In the previous step, we have used a pre-configured setup to run our test. In |
| 897 | this experiment we will first reserve an OpenFlow sliver that will point to a |
| 898 | controller to control our traffic. |
| 899 | |
| 900 | === 1a. !OpenFlow controller === |
| 901 | In a typical !OpenFlow experiment, the first step is to figure out where you are |
| 902 | going to run your controller. The !OpenFlow controller should be able to accept |
| 903 | connections from switches. To make this tutorial simpler we have already setup |
| 904 | the controllers in separate slices for each user. |
| 905 | The name of your controller slice is "ctrlXX" and it contains one myplc host, |
| 906 | "navis.gpolab.bbn.com", where your controller will be running on |
| 907 | port "100XX". |
| 908 | |
| 909 | In the previous example we have pointed all the traffic for subnets |
| 910 | 10.42.131.0/24, 10.42.132.0/24 to a switch !OpenFlow controller, that's why you |
| 911 | were able to ping between your hosts, using that subnet. |
| 912 | |
| 913 | === 1b. !OpenFlow sliver === |
| 914 | Until you have reserved an !OpneFlow sliver, traffic would not be forwarded |
| 915 | between your hosts on your assigned subnet. |
| 916 | |
| 917 | * Personalize your rspec. There is a sample !OpenFlow rspec, under the rspecs |
| 918 | folder ('''rspecs/openflow-tutorial-template.rspec'''), that you would need to |
| 919 | modify in order to reserve the flowspace that has been assigned to you. In the |
| 920 | beginning of the file there is a list of tags you would need to replace. More |
| 921 | specifically |
| 922 | * <USERNAME> : Your usernamer |
| 923 | * <CTRL-PORT> : The port that your controller will be listening on on |
| 924 | navis.gpolab.bbn.com |
| 925 | * <VLAN> : Which core VLAN you are using for your experiment. |
| 926 | * <IP_SUBNET_OCT> : The last octet of the subnet that has been assigned |
| 927 | to you |
| 928 | * <ETH_TYPE_1>, <ETH_TYPE_2> : The ethtypes that have been assigned to |
| 929 | you for use in this exercise |
| 930 | |
| 931 | * Create the OpenFlow sliver. The flowspace for the tutorial is managed by an |
| 932 | AM running at GPO : |
| 933 | {{{ |
| 934 | omni.py createsliver gposliceXX ./rspecs/openflow-tutorial-template.rspec -a |
| 935 | of-tut |
| 936 | }}} |
| 937 | |
| 938 | * Login to your controller machine : |
| 939 | {{{ |
| 940 | xterm -e ssh -i ssh/gpousrXX_key pgenigpolabbbncom_XX@bain.gpolab.bbn.com & |
| 941 | }}} |
| 942 | {{{ |
| 943 | xterm -e ssh -i ssh/gpousr21_key |
| 944 | pgenigpolabbbncom_gposlice21@bain.gpolab.bbn.com & |
| 945 | }}} |
| 946 | |
| 947 | * Run your controller. First of all verify that there is no other controller |
| 948 | running. Run |
| 949 | {{{ |
| 950 | ps -ef |grep nox_core |
| 951 | }}} |
| 952 | If there is one, make sure you kill it before you start the new one. |
| 953 | In order to start your controller do the following |
| 954 | {{{ |
| 955 | cd nox_build/src |
| 956 | ./nox_core -i ptcp:<PORT> -d l2deflect |
| 957 | }}} |
| 958 | |
| 959 | |
| 960 | === 1d. Deflect layer 2 ping using your controller === |
| 961 | For this exercise we have already reserved the hosts for you. There are two |
| 962 | layer 2 ping servers running and one host that will be used as a client. You |
| 963 | will need to login to the client using your key. |
| 964 | {{{ |
| 965 | ssh -i ssh/gpousrXX_key inki@pg30.emulab.net |
| 966 | }}} |
| 967 | |
| 968 | After you login run : |
| 969 | {{{ |
| 970 | cd pingPlus |
| 971 | }}} |
| 972 | |
| 973 | Run a layer two ping using each one of your two ethernet types. What do you |
| 974 | notice? |
| 975 | {{{ |
| 976 | sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE1> |
| 977 | sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE2> |
| 978 | }}} |
| 979 | |
| 980 | = IV. Exercise 3: Using Software Routers to Create Your Experiment Topology = |
| 981 | In this exercise we are going to use a click router to bandwidth limit our |
| 982 | traffic. For this we are going to use the protogeni host you |
| 983 | reserved in the beginning. |
| 984 | |
| 985 | '''Note:''' If you are using one of the hosts pc1.gpolab.bbn.com, |
| 986 | pc11.gpolab.bbn.com or pg30.emulab.net your node has already been |
| 987 | reserved. Please call us to tell you how to access it. |
| 988 | |
| 989 | * check that your sliver is ready |
| 990 | {{{ |
| 991 | omni.py sliverstatus -a <AM_NICKNAME> gpousr## |
| 992 | }}} |
| 993 | |
| 994 | * If your sliver is ready, run readyToLogin to figure out how to login to the |
| 995 | node. (if your host is '''pg33''' please read the notes): |
| 996 | {{{ |
| 997 | readyToLogin -a <AM_NICKNAME> gposlice## |
| 998 | }}} |
| 999 | |
| 1000 | |
| 1001 | '''NOTE 1:''' If your node is '''pg33.emulab.net''' then run |
| 1002 | {{{ |
| 1003 | xterm -e xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@pg33 & & |
| 1004 | }}} |
| 1005 | |
| 1006 | * Check to see that the software has been downloaded : |
| 1007 | {{{ |
| 1008 | [alice@protogeni1 ~]$ ls |
| 1009 | config_dir pingPlus click-2.0.1 |
| 1010 | }}} |
| 1011 | |
| 1012 | * Configure the node. When you login to the node, the data interface of the |
| 1013 | host is not configured. |
| 1014 | {{{ |
| 1015 | [alice@protogeni1 ~]$ /sbin/ifconfig |
| 1016 | }}} |
| 1017 | This should list only two interface, the loopback and the control interface. |
| 1018 | Part of the tarball that was downloaded, is a script that will configure the |
| 1019 | node, and compile the Layer 2 ping software. Run |
| 1020 | {{{ |
| 1021 | ./config_dir/configure.sh |
| 1022 | }}} |
| 1023 | The output for Alice would look like |
| 1024 | {{{ |
| 1025 | [alice@protogeni1 ~]$ ./config_dir/configure.sh |
| 1026 | DEVICE=eth1.1750 |
| 1027 | USERCTL=no |
| 1028 | VLAN=yes |
| 1029 | IPADDR=10.42.131.146 |
| 1030 | NETMASK=255.255.255.0 |
| 1031 | BOOTPROTO=static |
| 1032 | ONBOOT=yes |
| 1033 | |
| 1034 | Added VLAN with VID == 1750 to IF -:eth1:- |
| 1035 | gcc -c -o packetFunctions.o packetFunctions.c |
| 1036 | gcc -c -o pingPlusListener.o pingPlusListener.c |
| 1037 | gcc packetFunctions.o pingPlusListener.o -o pingPlusListener |
| 1038 | gcc -c -o pingPlus.o pingPlus.c |
| 1039 | gcc packetFunctions.o pingPlus.o -o pingPlus |
| 1040 | }}} |
| 1041 | Verify that the data interface is up : |
| 1042 | {{{ |
| 1043 | [alice@protogeni1 ~]$ /sbin/ifconfig |
| 1044 | }}} |
| 1045 | and note the name of the data interface, the data interface is the one that |
| 1046 | has an IP address in the 10.42.131.0/24 subnet: |
| 1047 | {{{ |
| 1048 | eth1.1750 Link encap:Ethernet HWaddr 00:1F:29:32:92:4D |
| 1049 | inet addr:10.42.131.146 Bcast:10.42.131.255 Mask:255.255.255.0 |
| 1050 | inet6 addr: fe80::21f:29ff:fe32:924d/64 Scope:Link |
| 1051 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 1052 | RX packets:118 errors:0 dropped:0 overruns:0 frame:0 |
| 1053 | TX packets:115 errors:0 dropped:0 overruns:0 carrier:0 |
| 1054 | collisions:0 txqueuelen:0 |
| 1055 | RX bytes:5428 (5.3 KiB) TX bytes:3482 (3.4 KiB) |
| 1056 | |
| 1057 | }}} |
| 1058 | In this case the name is 'eth1.1750'. |
| 1059 | |
| 1060 | * Configure the click router |
| 1061 | {{{ |
| 1062 | cd click-2.0.1/conf |
| 1063 | }}} |
| 1064 | And edit the "gec12_conf.click" file to personalize it. |
| 1065 | * '''IF_NAME''' is the name of the interface that was configured in the |
| 1066 | previous step |
| 1067 | * '''MAC_ADDRESS''' is the mac address of that interface. |
| 1068 | |
| 1069 | * Run the click router |
| 1070 | {{{ |
| 1071 | cd ../userlevel/ |
| 1072 | sudo ./click ../conf/gec12_conf.click |
| 1073 | }}} |
| 1074 | |
| 1075 | * Start the new controller. First of all kill the controller that is |
| 1076 | currently |
| 1077 | {{{ |
| 1078 | ps -ef |grep nox_core |
| 1079 | sudo kill -9 <PID> |
| 1080 | }}} |
| 1081 | Start the new controller |
| 1082 | {{{ |
| 1083 | ./nox_core -i ptcp:<PORT> -d mbox |
| 1084 | }}} |
| 1085 | |
| 1086 | * On your two PL hosts install iperf by running : |
| 1087 | {{{ |
| 1088 | sudo yum install iperf |
| 1089 | }}} |
| 1090 | |
| 1091 | * And then on one host run the server |
| 1092 | {{{ |
| 1093 | iperf -s -i 2 |
| 1094 | }}} |
| 1095 | Run the client on the other host |
| 1096 | {{{ |
| 1097 | iperf -c <host> -i 2 |
| 1098 | }}} |
| 1099 | |
| 1100 | Look how your traffic is capped. |
| 1101 | = V. Cleanup resources = |
| 1102 | Although all your reservations, have expiration times, its always good practice |
| 1103 | to release the resources, after your experiment is over to make them available |
| 1104 | to other experimenters. |
| 1105 | |
| 1106 | === 1. Deletesliver === |
| 1107 | For each createsliver that you have run, you will need to run deletesliver to |
| 1108 | release the resources |
| 1109 | {{{ |
| 1110 | omni.py deletesliver -a <AM URL> <username>slice |
| 1111 | }}} |
| 1112 | For Alice this would look like |
| 1113 | {{{ |
| 1114 | # Delete ProtoGENI sliver |
| 1115 | omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am aliceslice |
| 1116 | |
| 1117 | # Delete MyPLC slivers |
| 1118 | omni.py deletesliver -a https://myplc.stanford.edu:12346 aliceslice |
| 1119 | |
| 1120 | #Delete OpenFlow slivers |
| 1121 | omni.py deletesliver -a |
| 1122 | https://expedient-tutorial.gpolab.bbn.com:1443/openflow/gapi/1 aliceslice |
| 1123 | }}} |
| 1124 | |
| 1125 | You can not delete your slice. Although this will be cleaned up when it expires, |
| 1126 | it should be an empty container and thus does not hold up any resources. |
| 1127 | |
| 1128 | Congratulations, you have finished the tutorial! Now you are ready to design and |
| 1129 | run your own experiments. Don't hesitate to [mailto:help@geni.net email us] with |
| 1130 | any questions you might have. |
| 1131 | |
| 1132 | = VI. Get Your Own Account = |
| 1133 | The accounts, that you used in the above steps, will be deactivated after the |
| 1134 | tutorial. If you do not already have an account at GPO's ProtoGENI cluster, you |
| 1135 | should get your own account so that you can further experiment with GENI. |
| 1136 | |
| 1137 | === 1a. Get a temporary account === |
| 1138 | To get a temporary account that will be deactivated on August 12th 2011, apply |
| 1139 | for an account at this page https://www.pgeni.gpolab.bbn.com/joinproject.php3. |
| 1140 | For Project name use : Gec11Gpo. |
| 1141 | |
| 1142 | === 1b. Get a permanent account === |
| 1143 | If you would like to run your own experiments in this infrastructure, please |
| 1144 | contact us at [mailto:help@geni.net] to get a permanent account. |
| 1145 | |
| 1146 | === 2. Getting to Know Omni === |
| 1147 | Now that you have your own account, you should configure Omni to use your own |
| 1148 | personal info, instead of the pre-made accounts. |
| 1149 | ==== 2a. Generate and Download your ProtoGENI certificate ==== |
| 1150 | a. Start Firefox within the VM and |
| 1151 | [https://www.pgeni.gpolab.bbn.com/login.php3] log in to your account. |
| 1152 | b. Select ''Generate SSL Cert'' and follow instructions. |
| 1153 | c. Select ''Download your SSL Cert'' (it's on the left of the page), and |
| 1154 | click on the 'Download it in PEM format' link. |
| 1155 | d. Copy the contents of the page (Ctrl-A, Ctrl-C) |
| 1156 | e. Open a terminal (there is a shortcut on the top bar) under the |
| 1157 | omni_tutorial directory there should be an ssh directory |
| 1158 | {{{ |
| 1159 | cd omni_tutorial/ssh |
| 1160 | }}} |
| 1161 | f. Open a file called <username>_cert.pem, paste your cert(Ctrl-Shift-V) |
| 1162 | and save. |
| 1163 | {{{ |
| 1164 | pico <username>_cert.pem> |
| 1165 | Ctrl-Shift-V |
| 1166 | Ctrl-X |
| 1167 | }}} |
| 1168 | g. Remove the passphrase from your certificate. For security best |
| 1169 | practices you should keep a passphrase on your certificate. If you want to avoid |
| 1170 | typing your passphrase throughout the tutorial, you might want to temporarily |
| 1171 | remove your passphrase |
| 1172 | {{{ |
| 1173 | openssl rsa -in ./<username>_cert.pem -out ./<username>_cert_ct.pem |
| 1174 | openssl x509 -in ./<username>_cert.pem >> ./<username>_cert_ct.pem |
| 1175 | chmod 400 ./<username>_cert_ct.pem |
| 1176 | }}} |
| 1177 | If you want a way to type your passphrase only once per session, look |
| 1178 | [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot#Q.WhydoesOmnipromptformyPEMpassphrasesomanytimesCantOmnipromptonlyonce |
| 1179 | here]. |
| 1180 | |
| 1181 | ==== 2b. Generate a pair of private/public keys. ==== |
| 1182 | In order to be able to login to the resources you will reserve will need a pair |
| 1183 | of keys. You can use any set of existing keys you might have, or you can |
| 1184 | generate a new pair. For security best practices you should have a passphrase |
| 1185 | on your keys. |
| 1186 | {{{ |
| 1187 | ssh-keygen -f <username>_key |
| 1188 | }}} |
| 1189 | |
| 1190 | Now you can go back to [wiki:GEC11NetworkingExperiments/Tutorial#I.ConfigureOmni |
| 1191 | (I)] and follow the steps using your own certificate and key. |
| 1192 | |
| 1193 | = Creating PlanetLab Request RSpecs from Advertisement RSpecs = |
| 1194 | |
| 1195 | 1. Use Omni to download and save the advertised RSpec from the aggregate you |
| 1196 | care about. |
| 1197 | a. In general the command is: |
| 1198 | {{{ |
| 1199 | $ omni.py -a <url or nickname of aggregate> -t ProtoGENI 2 -o listresources |
| 1200 | }}} |
| 1201 | For example, to get the request RSpec from the MyPLC at the GPO Lab: |
| 1202 | {{{ |
| 1203 | $ omni.py -a pl-gpo -t ProtoGENI 2 -o listresources |
| 1204 | }}} |
| 1205 | (Version 2 of the AM API renames the ProtoGENI v2 RSpecs as GENI v3 RSpecs |
| 1206 | so in the near future the command will become: {{{$ omni.py <url or nickname of |
| 1207 | aggregate> -t GENI 3 -o listresources}}}) |
| 1208 | b. The output of this command is: |
| 1209 | {{{ |
| 1210 | geni@geni-tutorial:~/Tutorials/Omni/gpousr20$ omni.py -a pl-gpo -t ProtoGENI 2 |
| 1211 | -o listresources |
| 1212 | INFO:omni:Loading config file omni_config |
| 1213 | INFO:omni:Using control framework pgeni |
| 1214 | INFO:omni:Saving output to a file. |
| 1215 | INFO:omni:Substituting AM nickname pl-gpo with URL |
| 1216 | http://myplc.gpolab.bbn.com:12346/, URN unspecified_AM_URN |
| 1217 | INFO:omni:Listed resources on 1 out of 1 possible aggregates. |
| 1218 | INFO:omni:Writing to 'rspec-myplc-gpolab-bbn-com-12346-.xml' |
| 1219 | INFO:omni: ------------------------------------------------------------ |
| 1220 | INFO:omni: Completed listresources: |
| 1221 | |
| 1222 | Options as run: |
| 1223 | aggregate: pl-gpo |
| 1224 | framework: pgeni |
| 1225 | native: True |
| 1226 | output: True |
| 1227 | rspectype: ('ProtoGENI', '2') |
| 1228 | |
| 1229 | Args: listresources |
| 1230 | |
| 1231 | Result Summary: Retrieved resources from 1 aggregates. |
| 1232 | Wrote rspecs from 1 aggregates to 1 files |
| 1233 | Saved listResources RSpec at unspecified_AM_URN to file |
| 1234 | rspec-myplc-gpolab-bbn-com-12346-.xml. |
| 1235 | . |
| 1236 | INFO:omni: ============================================================ |
| 1237 | }}} |
| 1238 | |
| 1239 | 2. Copy and edit the RSpec file. |
| 1240 | a. Copy the advertisement RSpec file. The new file will become the |
| 1241 | request RSpec. In general this would be: |
| 1242 | {{{ |
| 1243 | cp <advertisement RSpec filename> <manifest RSpec filename> |
| 1244 | }}} |
| 1245 | The value of {{{<advertisement RSpec filename>}}} appears in the Omni |
| 1246 | summary. |
| 1247 | In this case we will generate a request for the node "navis": |
| 1248 | {{{ |
| 1249 | cp rspec-myplc-gpolab-bbn-com-12346-.xml pl-gpo-navis.rspec |
| 1250 | }}} |
| 1251 | b. Edit the request Rspec file: |
| 1252 | {{{ |
| 1253 | emacs pl-gpo-navis.rspec & |
| 1254 | }}} |
| 1255 | or |
| 1256 | {{{ |
| 1257 | vi pl-gpo-navis.rspec |
| 1258 | }}} |
| 1259 | c. Edit the {{{<rspec>}}} tag. |
| 1260 | i. In the {{{<rspec>}}} tag, remove the {{{expires}}} and |
| 1261 | {{{generated}}} attributes. |
| 1262 | ii. In the {{{<rspec>}}} tag, change the {{{type="advertisement"}}} |
| 1263 | attribute to {{{type="request"}}}. |
| 1264 | iii. In the {{{<rspec>}}} tag, change 'ad' to 'request' in the schema |
| 1265 | location. That is, change this: |
| 1266 | {{{ |
| 1267 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 1268 | http://www.protogeni.net/resources/rspec/2/ad.xsd" |
| 1269 | }}} |
| 1270 | To this: |
| 1271 | {{{ |
| 1272 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 1273 | http://www.protogeni.net/resources/rspec/2/request.xsd" |
| 1274 | }}} |
| 1275 | iv. The {{{<rspec>}}} tag should now look like this (note that the |
| 1276 | whitespace has been adjusted for ease of reading): |
| 1277 | {{{ |
| 1278 | <rspec type="request" |
| 1279 | xmlns="http://www.protogeni.net/resources/rspec/2" |
| 1280 | xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" |
| 1281 | xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" |
| 1282 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 1283 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 1284 | http://www.protogeni.net/resources/rspec/2/request.xsd"> |
| 1285 | }}} |
| 1286 | d. Remove the {{{node}}} tags you do not want to request. |
| 1287 | i. For example to only reserve the node {{{navis.gpolab.bbn.com}}} |
| 1288 | remove the following text: |
| 1289 | {{{ |
| 1290 | <node |
| 1291 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+bain.gpolab.bbn.com" |
| 1292 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1293 | component_name="bain.gpolab.bbn.com" |
| 1294 | exclusive="false"> |
| 1295 | .... |
| 1296 | </node> |
| 1297 | <node |
| 1298 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+sardis.gpolab.bbn.com" |
| 1299 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1300 | component_name="sardis.gpolab.bbn.com" |
| 1301 | exclusive="false"> |
| 1302 | .... |
| 1303 | </node> |
| 1304 | <node |
| 1305 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+ganel.gpolab.bbn.com" |
| 1306 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1307 | component_name="ganel.gpolab.bbn.com" exclusive="false"> |
| 1308 | .... |
| 1309 | </node> |
| 1310 | <node |
| 1311 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+gardil.gpolab.bbn.com" |
| 1312 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1313 | component_name="gardil.gpolab.bbn.com" exclusive="false"> |
| 1314 | .... |
| 1315 | </node> |
| 1316 | }}} |
| 1317 | ii. At this point the entire file should look like this: |
| 1318 | {{{ |
| 1319 | <?xml version="1.0" ?> |
| 1320 | <!-- Resources at AM: |
| 1321 | URN: unspecified_AM_URN |
| 1322 | URL: http://myplc.gpolab.bbn.com:12346/ |
| 1323 | --> |
| 1324 | <rspec type="request" |
| 1325 | xmlns="http://www.protogeni.net/resources/rspec/2" |
| 1326 | xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" |
| 1327 | xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" |
| 1328 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 1329 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 1330 | http://www.protogeni.net/resources/rspec/2/request.xsd"> |
| 1331 | <node |
| 1332 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+navis.gpolab.bbn.com" |
| 1333 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1334 | component_name="navis.gpolab.bbn.com" exclusive="false"> |
| 1335 | <hardware_type name="plab-pc"/> |
| 1336 | <hardware_type name="pc"/> |
| 1337 | <available now="true"/> |
| 1338 | <sliver_type name="plab-vnode"> |
| 1339 | <planetlab:initscript name="gpolab_sirius"/> |
| 1340 | </sliver_type> |
| 1341 | <location country="us" latitude="42.3897" longitude="-71.1475"/> |
| 1342 | </node> |
| 1343 | </rspec> |
| 1344 | }}} |
| 1345 | d. Edit the {{{<node>}}} tag you are trying to reserve. |
| 1346 | i. Remove all {{{<hardware_type>}}}, {{{<available>}}}, |
| 1347 | {{{<location>}}}, and {{{<planetlab:initscript"/>}}} tags which exist from the |
| 1348 | {{{<node>}}} tag you are trying to reserve. |
| 1349 | ii. Add the attribute {{{client_id}}} to the {{{<node>}}} tag you are |
| 1350 | trying to reserve. The value is your choice, so here we will use |
| 1351 | {{{client_id="navis"}}}. |
| 1352 | iii. The final request RSpec file should look like this: |
| 1353 | {{{ |
| 1354 | <?xml version="1.0" ?> |
| 1355 | <!-- Resources at AM: |
| 1356 | URN: unspecified_AM_URN |
| 1357 | URL: http://myplc.gpolab.bbn.com:12346/ |
| 1358 | --> |
| 1359 | <rspec type="request" |
| 1360 | xmlns="http://www.protogeni.net/resources/rspec/2" |
| 1361 | xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" |
| 1362 | xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" |
| 1363 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 1364 | xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2 |
| 1365 | http://www.protogeni.net/resources/rspec/2/request.xsd"> |
| 1366 | <node |
| 1367 | component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+navis.gpolab.bbn.com" |
| 1368 | component_manager_id="urn:publicid:IDN+plc:gpolab+authority+am" |
| 1369 | component_name="navis.gpolab.bbn.com" exclusive="false" client_id="navis"> |
| 1370 | <sliver_type name="plab-vnode"> |
| 1371 | </sliver_type> |
| 1372 | </node> |
| 1373 | </rspec> |
| 1374 | }}} |
| 1375 | e. Save the file. |
| 1376 | 3. Run rspeclint to verify that the file is correct. If it works, you should |
| 1377 | see no errors returned by the call. |
| 1378 | In general, this is: |
| 1379 | {{{ |
| 1380 | rspeclint http://www.protogeni.net/resources/rspec/2 |
| 1381 | http://www.protogeni.net/resources/rspec/2/request.xsd <request RSpec filename> |
| 1382 | }}} |
| 1383 | For this example do: |
| 1384 | {{{ |
| 1385 | rspeclint http://www.protogeni.net/resources/rspec/2 |
| 1386 | http://www.protogeni.net/resources/rspec/2/request.xsd pl-gpo-navis.rspec |
| 1387 | }}} |
| 1388 | |
| 1389 | = Reserving ProtoGENI nodes with Flack = |
| 1390 | These instructions assume you have already created a slice using omni. |
| 1391 | |
| 1392 | 1. Login to GPO's ProtoGENI instance with your tutorial credentials |
| 1393 | a. Click on: https://www.pgeni.gpolab.bbn.com/login.php3 |
| 1394 | b. Use your GPO tutorial username and password as listed on the sheet of |
| 1395 | paper you were handed on the way into the tutorial. |
| 1396 | 2. Login to Flack. |
| 1397 | a. Open a separate browser window or tab. |
| 1398 | b. Click on: http://www.protogeni.net |
| 1399 | c. Scroll down to the large map in the middle of the page. |
| 1400 | d. Click "Login" |
| 1401 | e. In the pull down menu in the upper right hand corner select: |
| 1402 | pgeni.gpolab.bbn.com |
| 1403 | f. Click "Download" |
| 1404 | g. Enter the password from the sheet of paper in the box near the bottom. |
| 1405 | h. Click "OK" in the lower left hand corner. |
| 1406 | i. You are now logged in. |
| 1407 | 3. Reserve the ProtoGENI node listed on your sheet of paper. |
| 1408 | a. For a '''ProtoGENI Utah''' node, do the following: |
| 1409 | i. In the Resources window on the right, select the button for your |
| 1410 | slice. A window will open. |
| 1411 | ii. Click on "utahemulab.cm". |
| 1412 | iii. Find the node listed on the sheet of paper in the list of nodes on |
| 1413 | the left. |
| 1414 | iv. Drag your node onto the blank canvas on the right. |
| 1415 | v. Click on the blue "i" (Information) icon on the node. |
| 1416 | vi. Click "Add Install Service" |
| 1417 | vii. In the two boxes, enter the following filling in your username: |
| 1418 | "/home/<username>" in "http://192.1.249.166:8383/gec12tutorial_fedora.tar.gz" |
| 1419 | viii. Click "Add Execute Service" |
| 1420 | ix. In the box, enter the following filling in your username: "cd |
| 1421 | /home/<username>/config_dir;./install.sh" |
| 1422 | xi. Confirm Rspec version is set to "2" in the pull-down menu in the |
| 1423 | upper right hand corner. |
| 1424 | xi. Click "Apply" |
| 1425 | '''Note''' : After hitting apply, click on the blue "i" button again, |
| 1426 | if you can't see the information you entered, then : |
| 1427 | a. Close this window. |
| 1428 | b. On your VM open the rspec with your favorite editor, and copy the |
| 1429 | whole rspec |
| 1430 | c. On your slice canvas on the top, there is an import button. From |
| 1431 | the list, choose the "Import from clipboard" option. |
| 1432 | d. The node should appear on your canvas, press the blue "i" button |
| 1433 | to verify that it is loaded correctly. |
| 1434 | xii. Click "Submit" |
| 1435 | a. For a '''ProtoGENI GPO''' node, do the following: |
| 1436 | i. In the Resources window on the right, select the button for your |
| 1437 | slice. A window will open. |
| 1438 | ii. Click on "bbn-pgeni.cm" (not "bbn-pgeni1.cm", "bbn-pgeni2.cm", or |
| 1439 | "bbn-pgeni3.cm"). |
| 1440 | iii. Find the node listed on the sheet of paper in the list of nodes on |
| 1441 | the left. |
| 1442 | iv. Drag your node onto the blank canvas on the right. |
| 1443 | v. Click on the blue "i" (Information) icon on the node. |
| 1444 | vi. Click "Add Install Service" |
| 1445 | vii. In the two boxes, enter the following filling in your username: |
| 1446 | "/home/<username>" in "http://192.1.249.166:8383/gec12tutorial_ubuntu.tar.gz" |
| 1447 | viii. Click "Add Execute Service" |
| 1448 | ix. In the box, enter the following filling in your username: "cd |
| 1449 | /users/<username> ;sudo /bin/sh ./config_dir/install.sh" |
| 1450 | x. For the test image, enter: |
| 1451 | "urn:publicid:IDN+pgeni.gpolab.bbn.com+image+emulab-ops//UBUNTU1004-STD" |
| 1452 | xi. Choose Rspec version "0.2" from the pull-down menu in the upper |
| 1453 | right hand corner. |
| 1454 | xi. Click "Apply" |
| 1455 | xii. Click "Submit" |
| 1456 | 4. Confirm the reserved node is visible via omni. |
| 1457 | a. If you reserved a '''ProtoGENI Utah''' host, run: |
| 1458 | {{{ |
| 1459 | omni.py -a pg-utah -t ProtoGENI 2 listresources <slicename> |
| 1460 | }}} |
| 1461 | b. If you reserved a '''ProtoGENI GPO''' host, run: |
| 1462 | {{{ |
| 1463 | omni.py -a pg-gpo -t ProtoGENI 0.2 listresources <slicename> |
| 1464 | }}} |
| 1465 | 5. Note that you can also download the request RSpec from Flack for later use |
| 1466 | in a AM API client tool like Omni. |
| 1467 | i. In Flack, click on the magnifying glass in the upper right hand |
| 1468 | corner. |
| 1469 | ii. The request RSpec will appear in the window. |
| 1470 | iii. You can then choose to download the RSpec in a file or copy it to |
| 1471 | the clipboard. |
| 1472 | |
| 1473 | = AM URL Table = |
| 1474 | || AM || Nickname ||URL || |
| 1475 | || TUTORIAL AM |||||| |
| 1476 | || Clemson's MyPLC ||pl-clemson || http://myplc.clemson.edu:12346 || |
| 1477 | || GPO's ProtoGENI || pg-gpo ||http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am || |
| 1478 | || GPO's MyPLC || pl-gpo || http://myplc.gpolab.bbn.com:12346 || |
| 1479 | || GPO's Tutorial OF || of-tut ||https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1|| |
| 1480 | || Rutgers MyPLC || pl-rutgers || https://plc.orbit-lab.org:12346/ || |
| 1481 | || Stanford's MyPLC || pl-stanford || https://myplc.stanford.edu:12346 || |
| 1482 | || Utah's ProtoGENI || pg-utah || http://www.emulab.net/protogeni/xmlrpc/am || |
| 1483 | || Washington's MyPLC || pl-washington || https://of.cs.washington.edu:12346/ || |
| 1484 | || Wisconsin's MyPLC ||pl-wisconsin|| https://wings-openflow-1.wail.wisc.edu:12346/ || |
| 1485 | || OTHER || || || |
| 1486 | || !PlanetLab ||plc||http://www.planet-lab.org:12346 || |
| 1487 | || Kentucky's ProtoGENI || pg-ky ||https://www.uky.emulab.net/protogeni/xmlrpc/am || |