87 | | |
88 | | |
| 87 | Type in your password again. Now you have configured Flack to your personal information. |
| 88 | |
| 89 | === Listresources in Flack === |
| 90 | After you login, you will see a pop-up window that will ask you which AMs you would like to interact with in this session. First of all unclick the All/None checkbox to uncheck all the AMs. Then make sure that you only check '''bbn-pgeni.cm''' and '''utahemulab.cm''', note that there are AMs with similar names make sure you choose these two. |
| 91 | |
| 92 | [[Image(choose-ams.png, 60%)]] |
| 93 | |
| 94 | Now Flack will go behind the scenes and invoke listresources in the selected AMs and populate the map. |
| 95 | |
| 96 | ===Configure Flack to use your account === |
| 97 | While Flack is loading the resources let's understand how the same functionality works with Omni. Omni is configured through a text file that is called omni_config. Go back to the terminal window and go under the directory that corresponds to your user |
| 98 | {{{ |
| 99 | cd /home/geni/Tutorials/ExptWorkflow/gpousr##/ |
| 100 | }}} |
| 101 | |
| 102 | For user gpousr25, this will look like |
| 103 | {{{ |
| 104 | cd /home/geni/Tutorials/ExptWorkflow/gpousr25/ |
| 105 | }}} |
| 106 | |
| 107 | Open the file called `omni_config` using either vim or emacs. Close to the top of the file you will see two parameters called `default_cf` and `users`. Your username should be at least listed in the user section. Look for the sections in the file that are named `[pgeni]` and `[gpousr##]`. For example for user gpousr25 these section look like: |
| 108 | {{{ |
| 109 | [pgeni] |
| 110 | type = pg |
| 111 | ch = https://www.emulab.net:443/protogeni/xmlrpc/ch |
| 112 | sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa |
| 113 | # Use the following two lines if you are using |
| 114 | # a certificate with a passphrase |
| 115 | #cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem |
| 116 | #key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert.pem |
| 117 | |
| 118 | # Use the following two lines if you are using |
| 119 | # a cleartext cert. |
| 120 | cert = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem |
| 121 | key = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_cert_ct.pem |
| 122 | [gpousr25] |
| 123 | # Make sure the urn matches the URN of the credential |
| 124 | urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr25 |
| 125 | |
| 126 | # Public key to be installed in compute resources. For multiple |
| 127 | # keys use a comma separated file |
| 128 | keys = ~/Tutorials/ExptWorkflow/gpousr25/ssh/geni_key.pub |
| 129 | }}} |
| 130 | |
| 131 | In the pgeni section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from pgeni.gpolab.bbn.com. This is equivalent to the Download action of Flack. |
| 132 | |
| 133 | In the `[gpousr##]` section, the information need for logging-in to reserved compute resources are provided. It includes you unique URN and a public key that would be uploaded to the hosts that you will reserve during the tutorial. |
| 134 | |
| 135 | Another interesting section to look at is the `[aggregate-nicknames]` sections. Flack already knows the URL for all the AMs and present you a list of AMs to choose from using a short, descriptive name. In Omni a user is required to pass the URL for each call to the GENI AM API. In this section the user get a chance to provide short descriptive names to the URLs that are easier to memorize and use. This section should look like : |
| 136 | {{{ |
| 137 | [aggregate_nicknames] |
| 138 | # ProtoGENI AMs and PlanetLab central |
| 139 | pg-gpo=urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+am,https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am |
| 140 | pg-utah=,https://www.emulab.net/protogeni/xmlrpc/am |
| 141 | pg-ky=urn:publicid:IDN+uky.emulab.net+authority+am,https://www.uky.emulab.net/protogeni/xmlrpc/am |
| 142 | plc=,https://www.planet-lab.org:12346 |
| 143 | |
| 144 | # Private myplc installations |
| 145 | pl-gpo=,http://myplc.gpolab.bbn.com:12346/ |
| 146 | pl-clemson=,http://myplc.clemson.edu:12346/ |
| 147 | pl-stanford=,https://myplc.stanford.edu:12346/ |
| 148 | pl-wisconsin=,https://wings-openflow-1.wail.wisc.edu:12346/ |
| 149 | pl-washington=,https://of.cs.washington.edu:12346/ |
| 150 | pl-rutgers=,https://plc.orbit-lab.org:12346/ |
| 151 | pl-indiana=,https://localhost:12346/ |
| 152 | pl-gatech=,https://localhost:2346/ |
| 153 | |
| 154 | |
| 155 | # Tutorial OpenFlow AM |
| 156 | of-tut=,https://foam-tutorial.gpolab.bbn.com:3626/foam/gapi/1 |
| 157 | |
| 158 | # Other OpenFlow AMs |
| 159 | of-gpo=,https://foam.gpolab.bbn.com:3626/foam/gapi/1 |
| 160 | of-stanford=,https://openflow4.stanford.edu:3626/foam/gapi/1 |
| 161 | of-clemson=,https://foam.clemson.edu:3626/foam/gapi/1 |
| 162 | of-wisconsin=,https://foam.wail.wisc.edu:3626/foam/gapi/1 |
| 163 | of-rutgers=,https://foam.oflow.cip.gatech.edu:3626/foam/gapi/1 |
| 164 | of-indiana=,https://foam.noc.iu.edu:3626/foam/gapi/1 |
| 165 | of-gatech=,https://nox.orbit-lab.org:3626/foam/gapi/1 |
| 166 | of-nlr=,https://foam.nlr.net:3626/foam/gapi/1 |
| 167 | of-i2=,https://foam.net.internet2.edu:3626/foam/gapi/1 |
| 168 | }}} |
| 169 | |
| 170 | ==== Clearing the passphrase from your cert ==== |
| 171 | When you first logged in to Flack, you had to type your passphrase (password). Flack cashes this information and re-uses it for the duration of the session. Omni will ask you for the phrase multiple times per command. To save time during the tutorial, we are going to remove the passphrase from your cert. Close the omni_config file and type : |
| 172 | {{{ |
| 173 | clear_cert.sh |
| 174 | }}} |
| 175 | Use the same password as in Flack. For user gpousr25, this looks like |
| 176 | {{{ |
| 177 | geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ clear_cert.sh |
| 178 | Enter pass phrase for ssh/geni_cert.pem: |
| 179 | writing RSA key |
| 180 | }}} |
| 181 | |
| 182 | '''NOTE''': If you misstype your password and get an error, make sure to remove a file before you start again: |
| 183 | {{{ |
| 184 | rm -f ssh/geni_cert_ct.pem |
| 185 | }}} |
| 186 | |
| 187 | ===== Test configuration ==== |
| 188 | In order to test that our configuration is correct, you can issue a getversion |
| 189 | command. For this step we have used !PlanetLab's AM, but you can use any |
| 190 | Aggregate Manager(AM). |
| 191 | {{{ |
| 192 | omni.py getversion -a http://www.planet-lab.org:12346 |
| 193 | }}} |
| 194 | |
| 195 | Or equivalently using the !PlanetLab nickname: |
| 196 | {{{ |
| 197 | omni.py getversion -a plc |
| 198 | }}} |
| 199 | |
| 200 | gpousr25 decided to use !PlanetLab central : |
| 201 | {{{ |
| 202 | geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ omni.py getversion -a plc |
| 203 | INFO:omni:Loading config file omni_config |
| 204 | INFO:omni:Using control framework pgeni |
| 205 | INFO:omni:Substituting AM nickname plc with URL https://www.planet-lab.org:12346, URN unspecified_AM_URN |
| 206 | INFO:omni:AM URN: unspecified_AM_URN (url: https://www.planet-lab.org:12346) has version: |
| 207 | INFO:omni:{ 'code': { 'am_code': None, 'am_type': 'sfa', 'geni_code': 0}, |
| 208 | 'geni_api': 2, |
| 209 | 'output': '', |
| 210 | 'value': { 'code_tag': '2.0-9', |
| 211 | 'code_url': 'git://git.onelab.eu/sfa.git@sfa-2.0-9', |
| 212 | 'geni_ad_rspec_versions': [ { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', |
| 213 | 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], |
| 214 | 'namespace': 'http://www.protogeni.net/resources/rspec/2', |
| 215 | 'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd', |
| 216 | 'type': 'ProtoGENI', |
| 217 | 'version': '2'}, |
| 218 | { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', |
| 219 | 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], |
| 220 | 'namespace': 'http://www.geni.net/resources/rspec/3', |
| 221 | 'schema': 'http://www.geni.net/resources/rspec/3/ad.xsd', |
| 222 | 'type': 'GENI', |
| 223 | 'version': '3'}, |
| 224 | { 'extensions': [], |
| 225 | 'namespace': None, |
| 226 | 'schema': None, |
| 227 | 'type': 'SFA', |
| 228 | 'version': '1'}], |
| 229 | 'geni_api': 2, |
| 230 | 'geni_api_versions': { '2': 'http://planet-lab.org:12346'}, |
| 231 | 'geni_request_rspec_versions': [ { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', |
| 232 | 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], |
| 233 | 'namespace': 'http://www.protogeni.net/resources/rspec/2', |
| 234 | 'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd', |
| 235 | 'type': 'ProtoGENI', |
| 236 | 'version': '2'}, |
| 237 | { 'extensions': [ 'http://www.protogeni.net/resources/rspec/ext/flack/1', |
| 238 | 'http://www.planet-lab.org/resources/sfa/ext/planetlab/1'], |
| 239 | 'namespace': 'http://www.geni.net/resources/rspec/3', |
| 240 | 'schema': 'http://www.geni.net/resources/rspec/3/request.xsd', |
| 241 | 'type': 'GENI', |
| 242 | 'version': '3'}, |
| 243 | { 'extensions': [], |
| 244 | 'namespace': None, |
| 245 | 'schema': None, |
| 246 | 'type': 'SFA', |
| 247 | 'version': '1'}], |
| 248 | 'hostname': 'quagga.cs.princeton.edu', |
| 249 | 'hrn': 'plc', |
| 250 | 'interface': 'aggregate', |
| 251 | 'sfa': 2, |
| 252 | 'testbed': 'myplc', |
| 253 | 'urn': 'urn:publicid:IDN++plc'}} |
| 254 | INFO:omni: ------------------------------------------------------------ |
| 255 | INFO:omni: Completed getversion: |
| 256 | |
| 257 | Options as run: |
| 258 | aggregate: plc |
| 259 | framework: pgeni |
| 260 | native: True |
| 261 | |
| 262 | Args: getversion |
| 263 | |
| 264 | Result Summary: |
| 265 | Got version for 1 out of 1 aggregates |
| 266 | |
| 267 | INFO:omni: ============================================================ |
| 268 | geni@geni-vm:~/Tutorials/ExptWorkflow/gpousr25$ |
| 269 | }}} |
| 270 | |
| 271 | === List Resources in Omni === |
| 272 | Flack goes behind the scenes and call listresources for the AMs that you chose, and draws the resources in a map. In Omni in order to see what is available in each AM you will have to manually invoke listreouces |