= [wiki:GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure/Setup Understanding the AM API using Named Data Networking] = {{{ #!html
Image Map
}}} == 1. Design the Experiment == {{{ #!html
In today's experiment you will use resources at the aggregate listed on the worksheet. If you don't have a worksheet, use the closest Instageni rack to the first letter of your name (i.e. if your name starts with the letter C, pick a rack that starts with C). This will help to prevent that too many users choose the same rack and eventually the rack will run out of resources.
}}} == 2. Establish the Environment == {{{ #!html }}} === 2.1 Configure Omni === {{{ #!html
  1. Login to the GENI Portal
  2. Click on your name in the upper right hand corner, then select the `Profile tab` menu item. Then click on the `Configure omni` tab under `PROFILE`.

Figure 2-1 Click on the Configure omni tab under Profile.
  1. Click on the `Download your omni data` button under step 2.

Figure 2-2 Download your omni data under step 2.
  1. 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.

Figure 2-3 Click on Generate a certificate.
  1. 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.

Figure 2-4 Click on Generate Combined Certificate and Key File.
  1. Then click on `Download your omni data`.

Figure 2-5 Click on Download your omni data.
  1. The bundle will be saved at ~/Downloads/omni.bundle
  2. 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 SLICE_NAME. {{{ $ omni createslice SLICE_NAME --project PROJ_NAME }}} If successful, you should see a {{{Completed createslice}}} message. === 3.2. Load a simple topology in Jacks === For this exercise, we will use the portal to view and edit an existing RSpec file. Start by loading this predefined topology into Jacks. {{{ #!html
  1. In the Portal, open the Slice page for the slice you just created. Notice that you created the slice with omni and it is available via the Portal.
  2. Press the Add Resources button to launch Jacks for this slice.
  3. From the Choose RSpec menu (see figure), select the URL button.
Import an RSpec into Jacks
Figure 3-1 Import an RSpec into Jacks.
  1. Enter the URL for the RSpec:
    http://192.1.242.151/files/lab1-ndn-rspec.xml
    then click Select.
  2. After you click Select, a network topology should appear on the canvas.
}}} === 3.3. Modify the RSpec to automatically download scripts and execute commands === In the RSpec you have just downloaded there is a tarball with the necessary files and a script that will automatically run when the nodes boot-up. The script will start and configure NFD in the nodes. We left one node for you to do it yourself. {{{ #!html
  1. Click on Experimenter node and scroll down to add the link to the tarball (see figure).
  2. Go ahead and add the link to the tarball in the URL field and the installation path:
    http://192.1.242.151/files/install-script.tar.gz
    /local

Figure 3-4 Automating your configuration.
  1. Use the Download button (in the lower left part of the screen next to Save RSpec) to make a local copy of your RSpec with the name rspec.xml. We'll use this in the next step to demonstrate how other client tools also use RSpec files to communicate requests to aggregate managers.
}}} === 3.4. Export your RSpec === Now we will pull back some of the covers and inspect exactly what Jacks 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) are specified with attributes, or sometimes child elements, within those portions of the document. {{{ #!html
  1. From the Add Resources window (see figure), select the View Rspec button on the top right hand side. This will bring up a pane showing the current RSpec -- please take a moment to inspect it. The `<node>` and `<link>` elements contain the specification for the components we will request, and if you look closely, you will be able to see the install and execute service elements you added earlier. Click on the "View RSpec" button again to return to the main screen.

Figure 3-4 View and save the final request RSpec
  1. Use the Download button (in the lower left part of the screen next to Save RSpec) to make a local copy of your RSpec with the name rspec.xml. We'll use this in the next step to demonstrate how other client tools also use RSpec files to communicate requests to aggregate managers.
}}} === 3.5. Instantiate the new experiment using Omni === For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. From a terminal, please enter the command: {{{ $ omni -a AM_NICKNAME createsliver SLICE_NAME RSPEC_FILE --project PROJ_NAME }}} where {{{AM_NICKNAME}}} is the nickname for your assigned aggregate manager, {{{SLICE_NAME}}} is the name of the slice, and {{{PROJ_NAME}}} is the name of the project you created earlier. {{{RSPEC_FILE}}} should be replaced with the filename of the RSpec you saved in step 3.4. If all is well, Omni should give you a number of informational messages, such as: {{{ Result Summary: Got Reserved resources RSpec from instageni-idre-ucla-edu. ... }}} ---- = [wiki:GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure Introduction] = = [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure/Execute Next: Execute] =