= [http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/UnderstandAMAPI/Procedure Understanding the AM API] =
{{{
#!html
- Login to the GENI Portal
- Click on the `Profile tab` link on the top of your
screen. Then click on the `Configure omni` tab under
`PROFILE`.
|
|
- Click on the `Download your omni data` button under step 2.
|
|
- If this is the first time you try to access your GENI
certificate you will have to generate one. Click on the
`generate a certificate` link.
|
|
- Unless you really understand how SSL certificates
work, choose the simple option. Click on the `Generate
Combined Certificate and Key File` button and then click on
`Close`. You will be taken back to the download page with
the warning. Reload the page to enable the download
button.
|
|
- If you are a member of more than one project, select
which project you would like to be the default one for
running experiments in GENI. You can always change the
project that is used by the `-r` command line option of
Omni. Then click on `Download your omni data`.
|
The bundle will be saved at ~/Downloads/omni-bundle.zip
Open a terminal window and type:omni-configure The cert and key files you need will
be installed in the appropriate folders.
|
}}}
== 3. Obtain Resources ==
=== 3.1 Create a slice ===
Create a slice using `omni` and the slice name of your choice. From now on that slice name will be referred to as `SLICENAME`.
{{{
$ omni createslice SLICENAME
}}}
=== 3.2. Load a simple topology in Flack ===
For this exercise, we will edit an existing RSpec file. Start by loading this predefined topology into Flack.
{{{
#!html
- Click on the the i button on the client node (see figure) to manipulate details of the node configuration.
|
When you open the node information, you should see options like those
in the figure. The controls available to you will vary depending on the
types of the aggregate manager and the component, but many features are
widely available throughout GENI.
|
|
Figure 3-3 Edit the nodes
|
- The way we will request installation of the proper software and execution
of our experiment is to add install and execute services.
-
First, select "+ Add Install Service" as shown. Complete the "Archive URL and a location" using the appropriate information from the following table.
Aggregate Type |
Archive URL |
Installation Location |
|
http://www.gpolab.bbn.com/exp/UnderstandAMAPI/ig/underAMAPI_ig.tar.gz |
/local
|
|
http://www.gpolab.bbn.com/exp/UnderstandAMAPI/eg/underAMAPI_eg.tar.gz |
/local
|
- Similarly, please use the "+ Add Execute Service" button to request
that the appropriate command be executed at boot time.
Aggregate Type |
Client Install Script |
Server Install Script |
Shell |
|
sudo /local/install-script.sh |
sudo /local/install-script.sh |
sh |
|
sudo /local/install-client.sh |
sudo /local/install-server.sh |
sh |
| Be very careful when entering this information -- these commands will not
be executed yet, so it will be some time before you will see any relevant
error messages if there is a mistake here. |
|
Figure 3-4 Specify the tarball and install script
|
|
- Once both the install and execute services are specified, please
choose Apply.
- Repeat the previous five steps on the server node to add the appropriate install and
execute services.
- In addtion, on the server node, click on the link tab
and select Routable Control IP as shown in the figure.
|
Figure 3-5 On the Link tab, select the
"Routable Control IP" button.
|
}}}
If you have time, it would be instructive to download the `underAMAPI_*.tar.gz` file yourself, and inspect the contents. You will see the `install-script.sh` file referred to in the execute service, and this is a good example of how you can ask for GENI components to perform tasks for you without any manual intervention. This is a very useful facility for large experiments!
=== 3.4. Export the modified request RSpec ===
Now we will pull back some of the covers and inspect exactly what Flack has been doing for us when preparing the RSpecs for the experiments we design. Each node and link has a corresponding element in the RSpec, and the details of the component configuration (such as the install and execute services we requested above) are specified with attributes, or sometimes child elements, within those portions of the document.
{{{
#!html