[[PageOutline]] = GENI Experiment Example 1 = This page illustrates an operational example for the [wiki:GENIExperimenter GENI Experimenter How-to] page capturing the actions required to run an experiment using multiple resource aggregates and with user credentials from the GPO ProtoGENI Clearinghouse pgeni.gpolab.bbn.com. Details on how credentials are set up can be found in the [wiki:GENIExperimenter#a1.GetGENICredentials GENI Credentials] section of the main GENI Experimenter page. In this experiment, a total of 5 nodes are requested, with 2 nodes from the Emulab(PG) aggregate and 3 nodes from the !PlanetLab (PL) aggregate. This page does not cover the installation of the OMNI client, as it is well documented, please see the following pages to get the [http://trac.gpolab.bbn.com/gcf/wiki/GettingGcf GCF package] and to [http://trac.gpolab.bbn.com/gcf/wiki/QuickStart install] it. == Omni Configuration == For GENI Experiment Example defined above, the following omni_config settings were used: {{{ [omni] default_cf = pgeni users = lnevers # ---------- Users ---------- [lnevers] urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers keys = ~/.ssh/id_rsa.pub # ---------- Frameworks ---------- [pgeni] type = pg ch = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/ch sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa cert = ~/.ssl/encrypted-cleartext.pem key = ~/.ssl/encrypted-cleartext.pem verbose=false }}} The above configuration is specific to the experiment captured in this page, please see the [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] page for more details. The omni_configuration parameters shown define the following: [[BR]] || '''Parameter''' || ''' Use''' || || default_cf|| Default aggregate used if not specified on the command line. || || users|| users setting used when reserving slices. || || urn|| The username URN, see how to determing [wiki:GENIExperimenter/ExperimentCredentials#DetermineyourURN your URN] || || keys|| A comma separated list of public ssh key files to be uploaded to the Clearinghouse || || type|| Resource aggregate "pg" indicates ProtoGENI, sse the [http://trac.gpolab.bbn.com/gcf/wiki/Omni Omni] page. || || ch|| ProtoGENI Clearinghouse URL. || || sa|| Slice Authority URL. || || cert|| Location of the SSL encrypted certificate (contains both a certificate and a key). || || key|| Location of your SSL encrypted certificate (contains both a certificate and a key). || == List available resources == With the GPO Protogeni setting defined as shown in the omni_config above, you can get a list of available resources from each of the other 2 aggregates. Getting a list of resources from Emulab Protogeni aggregate in native format: {{{ $ src/omni.py -n -a https://www.emulab.net/protogeni/xmlrpc/am listresources >resources-PG-emulab.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Resources at https://www.emulab.net/protogeni/xmlrpc/am: }}} Getting a list of resources from !PlanetLab aggregate: {{{ $ src/omni.py listresources -n -a http://www.planet-lab.org:12346 >resources-PL.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Resources at http://www.planet-lab.org:12346: }}} You may use the output of two ''listresources'' commands to generate rspecs to request resources. The above ''listresources'' commands use the ''-n'' flag to request output in native rspec format rather than the default omnispec format. Note, the ''-n'' flag requires the ''-a'' flag also be used to specify an aggregate manager. If you are planning to use MyPLC resources, you may also query the MyPLC installation to get a list of available resources as follows: {{{ $ ./src/omni.py -n -a http://myplc.gpolab.bbn.com:12346 listresources >resources-MyPLC.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Resources at http://myplc.gpolab.bbn.com:12346: }}} If you are planning to use Univerity of Kentucky Emulab resources, you can query this installation to get a list of available resources, note the example below was collected with GPO pgeni.gpolab.com credentials: {{{ $ src/omni.py -n -a https://www.uky.emulab.net/protogeni/xmlrpc/am listresources >resources-uky-emulab.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Resources at https://www.uky.emulab.net/protogeni/xmlrpc/am: }}} == Create a slice == Since the [wiki:GENIExperimenter/ExperimentExample#OmniConfiguration omni_config] defines the credentials and the Clearinghouse for the GPO Protogeni, your slice will be created in pgeni.gpolab.bbn.com aggregate. For this example a slice named ''lnevers_slice'' is created, you should choose a slice name that is meaningful to you: {{{ $ ./src/omni.py createslice lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Created slice with Name lnevers_slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice }}} == Add Emulab PG resources to GPO PG slice == To request two Emulab ProtoGENI nodes, the following rspec named emulab.rspec was used for this example, your rspec will be specific to your experiment requirements: {{{ }}} To request two Protogeni nodes, a sliver was created within the Emulab Protogeni with the rpec above using the following command: {{{ $ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am -n createsliver lnevers_slice emulab.rspec INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Asked https://www.emulab.net/protogeni/xmlrpc/am to reserve resources. Result: }}} == Add PlanetLab resources to GPO PG slice == To request three Planetlab nodes, the following rspec named planet.rspec was used for this example, your rspec will be specific to your experiment requirements: {{{ RIT "planet2.cs.rit.edu Williams College planetlab3.williams.edu BBN Technologies plnode-03.gpolab.bbn.com }}} To request the three Planetlab nodes, a sliver was created within Planetlab with the rpec above using the following command: {{{ $ ./src/omni.py -a http://www.planet-lab.org:12346 -n createsliver lnevers_slice planet.rspec INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Asked http://www.planet-lab.org:12346 to reserve resources. Result: RIT "planet2.cs.rit.edu Williams College planetlab3.williams.edu BBN Technologies plnode-03.gpolab.bbn.com INFO:omni:Please run the omni sliverstatus call on your slice to determine your login name to PL resources }}} As part of the ''createsliver'' operation for PL nodes, Omni tools upload the user SSH keys based on the [users] section of the omni_config. If you have problems in setting up your slice, contact us at [mailto:help@geni.net]. == Checking sliver resource status == Once you have requested the resources you may check the sliver status for PG and PL nodes. As you review the results, note the expiration time to make sure that it meets your experiment running time requirement. To get ''sliverstatus'' for the example experiment on this page the following command was issued for the PG resources: {{{ $ ./src/omni.py sliverstatus -a https://www.emulab.net/protogeni/xmlrpc/am lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Status of Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice: Sliver at https://www.emulab.net/protogeni/xmlrpc/am: {'geni_resources': [{'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+36085', 'pg_manifest': {'attributes': {'component_manager_urn': 'urn:publicid:IDN+emulab.net+authority+cm', 'component_manager_uuid': '28a10955-aa00-11dd-ad1f-001143e453fe', 'component_urn': 'urn:publicid:IDN+emulab.net+node+pc203', 'component_uuid': 'de9e66fd-773e-102b-8eb4-001143e453fe', 'exclusive': 1, 'hostname': 'pc203.emulab.net', 'sliver_urn': 'urn:publicid:IDN+emulab.net+sliver+36085', 'sliver_uuid': 'a95e6eef-48df-11e0-b35d-001143e453fe', 'sshdport': 22, 'virtual_id': 'geni2', 'virtualization_type': 'raw', 'xmlns': 'http://protogeni.net/resources/rspec/0.2'}, 'children': [{'attributes': {}, 'children': [{'attributes': {'authentication': 'ssh-keys', 'hostname': 'pc203.emulab.net', 'port': 22}, 'children': [], 'name': 'login'}], 'name': 'services'}], 'name': 'node'}, 'pg_status': 'ready'}, {'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+36084', 'pg_manifest': {'attributes': {'component_manager_urn': 'urn:publicid:IDN+emulab.net+authority+cm', 'component_manager_uuid': '28a10955-aa00-11dd-ad1f-001143e453fe', 'component_urn': 'urn:publicid:IDN+emulab.net+node+pc303', 'component_uuid': 'de9e6e61-773e-102b-8eb4-001143e453fe', 'exclusive': 1, 'hostname': 'pc303.emulab.net', 'sliver_urn': 'urn:publicid:IDN+emulab.net+sliver+36084', 'sliver_uuid': 'a8e9898e-48df-11e0-b35d-001143e453fe', 'sshdport': 22, 'virtual_id': 'geni1', 'virtualization_type': 'raw', 'xmlns': 'http://protogeni.net/resources/rspec/0.2'}, 'children': [{'attributes': {}, 'children': [{'attributes': {'authentication': 'ssh-keys', 'hostname': 'pc303.emulab.net', 'port': 22}, 'children': [], 'name': 'login'}], 'name': 'services'}], 'name': 'node'}, 'pg_status': 'ready'}], 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice', 'pg_expires': '2011-03-07 16:23:05', 'pg_status': 'ready'} }}} To Check the ''sliverstatus'' for PL resources, the following command was issued: {{{ $ ./src/omni.py sliverstatus -a http://www.planet-lab.org:12346 lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Status of Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice: Sliver at http://www.planet-lab.org:12346: {'geni_resources': [{'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+plc:bbn+node+plnode-03.gpolab.bbn.com', 'pl_boot_state': 'boot', 'pl_hostname': 'plnode-03.gpolab.bbn.com', 'pl_last_contact': 'Mon Mar 7 12:17:51 2011'}, {'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+plc:williams+node+planetlab3.williams.edu', 'pl_boot_state': 'boot', 'pl_hostname': 'planetlab3.williams.edu', 'pl_last_contact': 'Mon Mar 7 12:23:21 2011'}, {'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+plc:rit+node+planet2.cs.rit.edu', 'pl_boot_state': 'boot', 'pl_hostname': 'planet2.cs.rit.edu', 'pl_last_contact': 'Tue Mar 1 05:49:20 2011'}], 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice', 'pl_expires': 'Mon Mar 21 13:24:29 2011', 'pl_login': 'pgenigpolabbbncom_lneversslice'} }}} A lot of very useful information is reported for the ''sliverstatus'' output including which hosts are assigned to you and for how long. For PlanetLab, notice the value in the 'pl_login' field, which is the login to be used to access the nodes. For a slice across multiple aggregates, you should pay close attention to the expiration time for each aggregate sliver (pg_expires & pl_expires). For this example the pg_expires is ''2011-03-07 16:23:05'' while the pl_expires is ''Mon Mar 21 13:24:29 2011'', make sure that each expiration time meets your requirements for the experiment duration. If you need to extend the expiration, you can use the Omni ''renewsliver'' to expand the time for each sliver and for the slice. The following command is issued to modify the expiration time for the ProtoGENI resources: {{{ $ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am renewslice lnevers_slice "03/21/11 13:00:00" INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni.protogeni:requesting new expiration '2011-03-21T13:00:00' Slice lnevers_slice now expires at 2011-03-21 13:00:00 }}} Check status again and you will notice that the ''pg_expires'' has been modified and is more in line with the ''pg_expires'': {{{ $ ./src/omni.py sliverstatus -a https://www.emulab.net/protogeni/xmlrpc/am lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Status of Slice urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice: Sliver at https://www.emulab.net/protogeni/xmlrpc/am: {'geni_resources': [{'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+36085', 'pg_manifest': {'attributes': {'component_manager_urn': 'urn:publicid:IDN+emulab.net+authority+cm', 'component_manager_uuid': '28a10955-aa00-11dd-ad1f-001143e453fe', 'component_urn': 'urn:publicid:IDN+emulab.net+node+pc203', 'component_uuid': 'de9e66fd-773e-102b-8eb4-001143e453fe', 'exclusive': 1, 'hostname': 'pc203.emulab.net', 'sliver_urn': 'urn:publicid:IDN+emulab.net+sliver+36085', 'sliver_uuid': 'a95e6eef-48df-11e0-b35d-001143e453fe', 'sshdport': 22, 'virtual_id': 'geni2', 'virtualization_type': 'raw', 'xmlns': 'http://protogeni.net/resources/rspec/0.2'}, 'children': [{'attributes': {}, 'children': [{'attributes': {'authentication': 'ssh-keys', 'hostname': 'pc203.emulab.net', 'port': 22}, 'children': [], 'name': 'login'}], 'name': 'services'}], 'name': 'node'}, 'pg_status': 'ready'}, {'geni_error': '', 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+emulab.net+sliver+36084', 'pg_manifest': {'attributes': {'component_manager_urn': 'urn:publicid:IDN+emulab.net+authority+cm', 'component_manager_uuid': '28a10955-aa00-11dd-ad1f-001143e453fe', 'component_urn': 'urn:publicid:IDN+emulab.net+node+pc303', 'component_uuid': 'de9e6e61-773e-102b-8eb4-001143e453fe', 'exclusive': 1, 'hostname': 'pc303.emulab.net', 'sliver_urn': 'urn:publicid:IDN+emulab.net+sliver+36084', 'sliver_uuid': 'a8e9898e-48df-11e0-b35d-001143e453fe', 'sshdport': 22, 'virtual_id': 'geni1', 'virtualization_type': 'raw', 'xmlns': 'http://protogeni.net/resources/rspec/0.2'}, 'children': [{'attributes': {}, 'children': [{'attributes': {'authentication': 'ssh-keys', 'hostname': 'pc303.emulab.net', 'port': 22}, 'children': [], 'name': 'login'}], 'name': 'services'}], 'name': 'node'}, 'pg_status': 'ready'}], 'geni_status': 'ready', 'geni_urn': 'urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnevers_slice', 'pg_expires': '2011-03-21 07:00:00', 'pg_status': 'ready'} }}} Both sliver now have similar expiration time and resources are available for the same timeframe. == Verify Resources and run your Experiment == Once you have the ''sliverstatus'', you have enough information to access the hosts allocated for you experiment. Simply SSH into one of the hosts and ping any of the other hosts in your experiment. Notice that the ''pl_login'' is being used to get access. Now verify that there is connectivity between to allocated resource. In this example experiment, one of the !PlanetLab resources allocated is used to ping a !ProtoGENI resource also part of the experiment: {{{ $ ssh pgenigpolabbbncom_lneversslice@plnode-03.gpolab.bbn.com Last login: Mon Mar 7 18:20:48 2011 from sendaria.gpolab.bbn.com [pgenigpolabbbncom_lneversslice@plnode-03 ~]$ ping pc203.emulab.net -c 3 PING pc203.emulab.net (155.98.39.3) 56(84) bytes of data. 64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=1 ttl=44 time=116 ms 64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=2 ttl=44 time=116 ms 64 bytes from pc203.emulab.net (155.98.39.3): icmp_seq=3 ttl=44 time=116 ms --- pc203.emulab.net ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 116.385/116.595/116.997/0.398 ms [pgenigpolabbbncom_lneversslice@plnode-03 ~]$ }}} Once you have verified connectivity between these hosts that have been allocated, you may start your experiment. == Delete sliver resources == When the experiment is completed you should release the resources by deleting the resource sliver for each the Resource Aggregates used in the Experiment. In the example experiment used in this page, the ProtoGENI sliver was deleted as follows: {{{ $ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am deletesliver lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lneversslice on unspecified_AM_URN at https://www.emulab.net/protogeni/xmlrpc/am }}} Also the Planetlab sliver was deleted as follows: {{{ $ ./src/omni.py -a http://www.planet-lab.org:12346 deletesliver lnevers_slice INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni Deleted sliver urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lneversslice on unspecified_AM_URN at http://www.planet-lab.org:12346 }}} ---- {{{ #!html Email us with any questions and feedback on this page! }}}