wiki:GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Slice

Version 1 (modified by Cong, 11 years ago) (diff)

--

B. Obtain Slice

Image Map

B.1 Select target aggregates

In this tutorial, we focus on ExoGENI and do not select any additional aggregates. In future tutorials we will present how GIMI can support experiments on other aggregates and a combination of aggregates (e.g., ExoGENI and WiMAX).


B.2 Formulate slice topology for experiment, and build request rspec

We will not go into any detail on this topic since this is covered in the ExoGENI tutorial.


B.2 Acquire resources and load images/packages for I&M tools and experiment services

B.2.1 Flukes

B.2.1.1 Register slice and node names (create Pubsub nodes):

The RCs and the EC communicate via an XMPP server. The GIMI XMPP is running on emmy9.casa.umass.edu.

The ExoGENI instances and the experiment slice should be registered with the XMPP server. You can achieve this using the OMF AM by issuing the following command from a terminal in the user workspace. In the following command, please change "gimiXX" to the user name provided to you.

$ omf_create_psnode-5.4 "XMPP Server" mkslice "slice_name" "list_of_nodenames"

E.g., omf_create_psnode-5.4 emmy9.casa.umass.edu mkslice gimiXX nodeA nodeB nodeC nodeD nodeE

If this succeeds you should see an output similar to the one below

$ omf_create_psnode-5.4 emmy9.casa.umass.edu mkslice gimi28 nodeA nodeB nodeC nodeD nodeE
DEBUG: Try to connect to Pubsub Gateway 'emmy9.casa.umass.edu'...
DEBUG: Try to connect to Pubsub Gateway 'emmy9.casa.umass.edu:5222'...
DEBUG: Connected as 'aggmgr@emmy9.casa.umass.edu' to XMPP server: 'emmy9.casa.umass.edu'
Connected to PubSub Server: 'emmy9.casa.umass.edu'

You only need to create pubsub node once for each new slice name.

B.2.1.2 Before experimenters can use Flukes, its properties file has to be modified.

The steps described in Section B.2.1.3 do NOT have to be executed during the tutorial!! We are describing them in case you should have to change the credential configuration in .flukes.properties manually!

Open the properties file with your favorite text editor (e.g., nano):

$ nano ~/.flukes.properties

Then change the file as indicated below.

# Do not change these
orca.xmlrpc.url=https://geni.renci.org:11443/orca/xmlrpc
ssh.options=-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -X
xterm.path=/usr/bin/xterm


image1.name=gec15-gimi-image
image1.url=http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/gec-15-tutorial.xml
image1.hash=c866eb5423b30cd22a766ee6d1ffba744987a647

image2.name=deb6-2g-zfilesystem 
image2.url=http://geni-images.renci.org/images/standard/debian/debian-squeeze-amd64-neuca-2g.zfilesystem.sparse.xml
image2.hash=6a8a8466aef43774bf2e309af47ce876ba793f36

image3.name=gec15-nicta-1
image3.url=http://pkg.mytestbed.net/geni/gec15-nicta-1.xml
image3.hash=51838b0d77fcf8840624bdc150ac51331f84a524

user.keystore=/home/geni/.ssl/gimi30.jks
ssh.key=/home/geni/.ssh/geni_key
ssh.pubkey=/home/geni/.ssh/geni_key.pub

The following video gives more details on the necessary changes of the file.

B.2.1.3 In the tutorial VM start Flukes and load gimiXX.rdf. (Also here, replace gimiXX with your assigned user ID.) In Flukes select Files->Open Request->select gimiXX.rdf in ~/Tutorials/GIMI/gimiXX.

B.2.1.4 Verify settings and create slice.

  • First select the the Request View tab.
  • To verify settings, right-click on each node and select Edit Properties, inspect, and close if everything looks right. In case you detect an error (which we don't expect for the tutorial) you can fix it here and then save a new version of the RDF file by clicking on File from the top menu in Flukes and selecting Save Request.
  • To create a slice enter your slice name gimiXX in to the empty field next to the Submit Request button and the click the latter.
  • When you are prompted for login please enter the following data: Key alias: gimiXX Password: The one that has been handed out to you

B.2.1.5 To check if all the resources have come up, go to the Manifest View tab and enter your slice name (gimiXX) into the empty field. Then click Query for Manifest. After a short moment a box with all the requested resources and their respective status will appear. (This box does not update automatically and you have to hit the Query for Manifest button again to receive and update).

B.2.1.6 GIMI specific post boot script. Each node uses the same image but runs a slightly different post boot script. The latter allows for individualized settings at each node. This script is already part of the gimiXX.rdf file. An example post boot script for NodeA is shown below:

#!/bin/bash

# Experiment slice name used by OMF. Should be unique for each experiment
sn=gimi30

# For now ExoGENI does not assign the "Name" assigned in Flukes as hostname. This will not be needed in future versions.
hostname nodeA

curl http://emmy9.casa.umass.edu/pingWrap.rb -o /root/pingWrap.rb
chmod +x /root/pingWrap.rb

#Adds the slice name to the resource controller configuration file
curl http://emmy9.casa.umass.edu/omf-resctl.yaml -o /etc/omf-resctl-5.4/omf-resctl.yaml
perl -i.bak -pe "s/\:slice\:/\:slice\: $sn/g" /etc/omf-resctl-5.4/omf-resctl.yaml

# The above updates require a restart of the OMF resource controller.
/etc/init.d/omf-resctl-5.4 restart

The following video gives an overview on how to load an RDF file, request a slice, and verify the creation of a slice with Flukes.

B.2.1.6 Information about the ExoGENI image we use for this tutorial can be found here.


This section will NOT be covered during the tutorial!! Nevertheless, we describe in Section B.2.2 how you can use Omni to set up and ExoGENI slice should you consider not using Flukes for future experiments.

B.2.2 Omni

In this section, we present an alternative approach to setup a slice by using the Omni command line tools to reserve resources. To perform this task the following steps have to be executed (replace gimiXX with your username):

B.2.2.1 The post boot script that is used in the case of slice reservation via Flukes has to be converted from an RDF file into a single bash script that takes slice name and node ID as arguments.

This script will be installed and executed on the nodes by an execute service defined in the rspec as follows:

<execute command="wget -q -P /tmp http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/gec15-postboot.sh ;chmod +x /tmp/gec15-postboot.sh;/tmp/gec15-postboot.sh <slicename> nodeA > /tmp/gec15-postboot.log" shell="/bin/sh"/>

B.2.2.2 The rdf file has to be converted into an rspec. You will notice that the rspec has to be slice-specific because it needs to pass the slice name into the post boot script.

You can download an example rspec using the following command:

    wget -P ~/Tutorials/GIMI/gimiXX http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/gimi-tutorial.rspec

Change the slice name in the rspec using the following command (replace gimiXXslice with your slice name).

    sed -i -e 's/SLICENAME/gimiXXslice/g' ~/Tutorials/GIMI/gimiXX/gimi-tutorial.rspec

B.2.2.3 Then the following commands have to be executed to set up and manage the slice with Omni:

  • Create the slice:
    omni.py createslice gimiXXslice
    
  • Create the sliver:
    omni.py -a eg-sm createsliver gimiXXslice ~/Tutorials/GIMI/gimiXX/gimi-tutorial.rspec
    
  • Check the status of the sliver (you are waiting for all geni_status to show Active):
    omni.py -a eg-sm sliverstatus gimiXXslice 2>&1 | grep geni_status
    

Example output:

  "geni_status": "ready", 
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"
      "geni_status": "Active"

  • Get the manifest of the sliver to get the login information (manifest will be saved to a file specified in the output):
    omni.py -a eg-sm listresources gimiXXslice -o
    
  • Get the login information from the manifest

Example:

geni@geni-VirtualBox:$ grep login gimi08slice-manifest-rspec-geni-renci-org-11443-orca.xml 
                  <login authentication="ssh-keys" hostname="152.3.144.112" port="22" username="root"/>      
                  <login authentication="ssh-keys" hostname="152.3.144.111" port="22" username="root"/>      
                  <login authentication="ssh-keys" hostname="152.3.144.110" port="22" username="root"/>      
                  <login authentication="ssh-keys" hostname="152.3.144.113" port="22" username="root"/>      
                  <login authentication="ssh-keys" hostname="152.3.144.109" port="22" username="root"/>
geni@geni-VirtualBox:$ ssh root@152.3.144.109
  • Delete the sliver:
    omni.py -a eg-sm deletesliver gimiXXslice
    



http://groups.geni.net/geni/wiki/GIMIv1.1Tutorial/Environment Back to previous step

http://groups.geni.net/geni/wiki/GIMIv1.1Tutorial/Orchestrate Forward to next step

http://groups.geni.net/geni/wiki/GIMIv1.1Tutorial/ Back to tutorial main page