Changes between Version 14 and Version 15 of LAMP/Tutorial


Ignore:
Timestamp:
09/21/10 15:19:01 (14 years ago)
Author:
fernande@cis.udel.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LAMP/Tutorial

    v14 v15  
    2020This section will guide you through creating and starting a slice, requesting a LAMP services certificate for you slice, uploading your experiment's topology to [http://groups.geni.net/geni/wiki/LAMP/Glossary#UNIS UNIS], and setting up the instrumentation and measurement facilities of your slice. The expected time required to setup your slice with the LAMP I&M System is around 10 minutes. Following this guide through the end is aimed to take about 30 minutes. Let us know how long it takes you and places for improvement!
    2121
    22 === Few words on the LAMP I&M System design ===
     22=== Before we start: a few words on the LAMP I&M System design ===
    2323
    2424It is useful to understand the general principles behind the steps we will take throughout this tutorial. The LAMP I&M System is built on top of three pillars:
     
    9999
    100100[[BR]]
    101 === 2. Create and Start our Slice ===
    102 
    103 
    104 
    105 
    106 
     101=== 2. Create and start our slice ===
     102
     103After modifying the RSpec as explained on the previous step, we proceed to create the slice/sliver as usual. Please refer to the [http://www.protogeni.net/trac/protogeni/wiki/Tutorial ProtoGENI tutorial] if you're not familiar with the following commands.
     104
     105{{{
     106$ test/createsliver.py -n lamptutorial rspec/examples/lamp-tutorial-rspec.xml
     107Got my SA credential
     108Asking for slice credential for lamptutorial
     109Got the slice credential
     110Creating the Sliver ...
     111Created the sliver
     112<rspec xmlns="http://protogeni.net/resources/rspec/0.2" xmlns:lamp="http://protogeni.net/resources/rspec/0.2/ext/lamp/1" valid_until="2010-09-22T03:34:50">
     113   
     114   <node virtual_id="node1" virtualization_type="raw" exclusive="1" startup_command="/usr/local/etc/lamp/bootstrap.sh urn:publicid:IDN+emulab.net+slice+lamptutorial urn:publicid:IDN+emulab.net+user+fernande" component_urn="urn:publicid:IDN+emulab.net+node+pc123" component_uuid="de98e5e4-773e-102b-8eb4-001143e453fe" component_manager_urn="urn:publicid:IDN+emulab.net+authority+cm" component_manager_uuid="28a10955-aa00-11dd-ad1f-001143e453fe" sliver_uuid="de98e5e4-773e-102b-8eb4-001143e453fe" hostname="pc123.emulab.net" sshdport="22" sliver_urn="urn:publicid:IDN+emulab.net+sliver+20386">
     115     
     116      <node_type type_name="pc" type_slots="1"/>
     117     
     118      <disk_image name="urn:publicid:IDN+emulab.net+image+GeniSlices//UBUNTU91-LAMP"/>
     119     
     120      <lamp:config/>
     121     
     122      <interface virtual_id="iface0" component_id="eth3"/>
     123   <services><login authentication="ssh-keys" hostname="pc123.emulab.net" port="22"/></services></node>
     124   
     125... rest of manifest ...
     126</rspec>
     127}}}
     128
     129You can see the full manifest returned for this particular instance [http://groups.geni.net/geni/attachment/wiki/LAMP/Tutorial/lamptutorial-manifest.xml here]. Save (copy/paste) this manifest to a file, we will call it lamptutorial-manifest.xml.
     130
     131At this point it is important to notice the valid_until field of the manifest: valid_until="2010-09-22T03:34:50". If you feel like this is not enough time for your slice, use the renewsliver.py test script to extend your slice. You should do this now as step 4 depends on this (actually, it depends on the expiration time of the slice, which seems to be a couple of hours more than what's in the manifest). While our slice is being started we can go ahead and setup the LAMP infrastructure for our experiment.
     132
     133=== 3. Upload your experiment's topology to UNIS ===
     134
     135UNIS is the glue that holds the LAMP I&M System together (see the '''Before we start''' section above). Services are configured (and configure themselves) through the topology data and the directory of services in UNIS. The first step we need to take before being able to configure and utilize our LAMP services is to convert our experiment's manifest into the UNIS topology schema and send it to UNIS. This is done automatically by the script lamp-sendmanifest.py. The usage for the lamp-sendmanifest.py script is as follows.
     136
     137{{{
     138$ test/lamp-sendmanifest.py
     139Not enough arguments
     140Usage: <manifest> <slice_urn> [credential]
     141}}}
     142
     143Where `<manifest>` is the file we saved our manifest to; `<slice_urn>` is the fully-qualified URN of our slice (''urn:publicid:IDN+emulab.net+slice+lamptutorial''); and [credential] is a file with our credential for the slice. The credential parameter is optional if you use the LAMP certificate for your slice (see step 4). We could have done step 4 first and used the LAMP certificate for this step, but we want to show that UNIS can be accessed with your own certificate and the slice credential. So we will go ahead and get our slice credential first:
     144
     145{{{
     146$ test/getslicecredential.py -n lamptutorial > lamptutorial-credential.xml
     147}}}
     148
     149A small modification needs to be done for now on the credential we just saved: remove the first line that indicates the xml version and encoding. Make sure you do not modify any other line, otherwise the signature check will fail. Our [http://groups.geni.net/geni/attachment/wiki/LAMP/Tutorial/lamptutorial-credential.xml credential] is now ready to be used with the lamp-sendmanifest.py script.
     150
     151{{{
     152$ test/lamp-sendmanifest.py lamptutorial-manifest.xml urn:publicid:IDN+emulab.net+slice+lamptutorial lamptutorial-credential.xml
     153
     154<nmwg:message type="TSReplaceRequest" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
     155  <nmwg:metadata id="meta0">
     156
     157    <nmwg:eventType>http://ggf.org/ns/nmwg/topology/20070809</nmwg:eventType>
     158  </nmwg:metadata>
     159
     160  <nmwg:metadata id="cred0">
     161    <nmwg:subject metadataIdRef="meta0">
     162<signed-credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.protogeni.net/resources/credential/credential.xsd" xsi:schemaLocation="http://www.protogeni.net/resources/credential/ext/policy/1 http://www.protogeni.net/resources/credential/ext/policy/1/policy.xsd">
     163  <credential xml:id="ref1CC6F2904F4CCCFA">
     164 
     165  ... rest of credential ...
     166</signed-credential>
     167
     168
     169    </nmwg:subject>
     170    <nmwg:eventType>http://perfsonar.net/ns/protogeni/auth/credential/1</nmwg:eventType>
     171  </nmwg:metadata>
     172
     173  <nmwg:data id="data0" metadataIdRef="cred0">
     174<topology id="genitopo" xmlns="http://ogf.org/schema/network/topology/unis/20100528/" xmlns:pgeni="http://ogf.org/schema/network/topology/protogeni/20100716/" xmlns:psconfig="http://ogf.org/schema/network/topology/psconfig/20100716/">
     175        <domain id="urn:ogf:network:domain=emulab.net+slice+lamptutorial">
     176                <node id="urn:ogf:network:domain=emulab.net+slice+lamptutorial:node=node1">
     177                        <address type="dns">
     178                                pc123.emulab.net
     179                        </address>
     180                        <nodePropertiesBag>
     181                                <pgeni:nodeProperties 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+pc123" component_uuid="de98e5e4-773e-102b-8eb4-001143e453fe" exclusive="1" sliver_urn="urn:publicid:IDN+emulab.net+sliver+20386" sliver_uuid="de98e5e4-773e-102b-8eb4-001143e453fe" startup_command="/usr/local/etc/lamp/bootstrap.sh urn:publicid:IDN+emulab.net+slice+lamptutorial urn:publicid:IDN+emulab.net+user+fernande" virtualization_type="raw">
     182                                        <pgeni:node_type type_name="pc" type_slots="1"/>
     183                                        <pgeni:disk_image name="urn:publicid:IDN+emulab.net+image+GeniSlices//UBUNTU91-LAMP"/>
     184                                        <pgeni:services>
     185                                                <pgeni:login authentication="ssh-keys" hostname="pc123.emulab.net" port="22"/>
     186                                        </pgeni:services>
     187                                </pgeni:nodeProperties>
     188                                <psconfig:nodeProperties/>
     189                        </nodePropertiesBag>
     190                        <port id="urn:ogf:network:domain=emulab.net+slice+lamptutorial:node=node1:port=iface0">
     191                                <name>
     192                                        eth3
     193                                </name>
     194                                <portPropertiesBag>
     195                                        <pgeni:portProperties component_id="eth3" component_urn="urn:publicid:IDN+emulab.net+interface+pc123:eth3" sliver_urn="urn:publicid:IDN+emulab.net+sliver+20390" sliver_uuid="012ff9dc-c5b0-11df-ad83-001143e453fe"/>
     196                                </portPropertiesBag>
     197                                <address type="mac">
     198                                        0002b365ce6b
     199                                </address>
     200                                <address type="ipv4">
     201                                        10.10.1.1
     202                                </address>
     203                        </port>
     204                </node>
     205               
     206                ... rest of slice topology in UNIS schema ...
     207        </domain>
     208</topology>
     209
     210  </nmwg:data>
     211</nmwg:message>
     212
     213
     214
     215Enter PEM pass phrase:
     216Received:
     217
     218<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     219                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     220                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     221                   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
     222  <SOAP-ENV:Header/>
     223  <SOAP-ENV:Body>
     224<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="message.1791117" type="TSReplaceResponse"><nmwg:metadata metadataIdRef="meta0" id="metadata.6705932"><nmwg:eventType>success.ma.replaced</nmwg:eventType></nmwg:metadata><nmwg:data metadataIdRef="metadata.6705932" id="data.17724448"><nmwgr:datum xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/">data element(s) successfully replaced</nmwgr:datum></nmwg:data><nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="meta0">
     225
     226    <nmwg:eventType>http://ggf.org/ns/nmwg/topology/20070809</nmwg:eventType>
     227  </nmwg:metadata></nmwg:message>  </SOAP-ENV:Body>
     228</SOAP-ENV:Envelope>
     229}}}