advanced-topics.scrbl 2.95 KB
Newer Older
1 2 3 4
#lang scribble/manual

@(require "defs.rkt")

5 6
@(under-construction)

7
@title[#:tag "advanced-topics" #:version apt-version]{Advanced Topics}
8

Robert Ricci's avatar
Robert Ricci committed
9
@section[#:tag "disk-images"]{Disk Images}
10

11 12
@(under-construction)

Robert Ricci's avatar
Robert Ricci committed
13
@section[#:tag "rspecs"]{RSpecs}
14

15 16 17 18 19 20 21 22
The resources (nodes, links, etc.) that define a profile are expressed in the
@hyperlink["http://groups.geni.net/geni/wiki/GENIExperimenter/RSpecs"]{RSpec}
format from the GENI project. In general, RSpec should be thought of as a
sort of ``assembly language''---something it's best not to edit yourself, but
as manipulate with other tools or create as a ``compiled'' target from a
higher-level language.

That said, the tools for manipulating RSpecs are still incomplete. (For a
23
preview of @(tb)'s plans in this regard, see our section on
24 25 26 27 28
@seclink["planned-easier-profiles"]{planned profile creation features}.) So,
there are still some cases in which it is unfortunately useful to look at or
manipulate RSpecs directly.

@(under-construction)
29
@italic{Still to come: documentation of @(tb)'s extensions to the RSpec format.}
30

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81

@section[#:tag "geni-lib"]{geni-lib}

Geni-lib is a tool that allows users to generate RSpec files from Python code.

The following example generates an RSpec for a single XenVM node.
@codeblock|{
#; Import the ProtoGENI library.
import geni.rspec.pg as pg 

#; Create a Request object to start building the RSpec.
rspec = pg.Request()

#; Create a XenVM and add it to the RSpec.
node = pg.XenVM("node")
rspec.addResource(node)

#; Save the RSpec as the file rspec.xml.
rspec.write("rspec.xml")
}|

RSpec for two XenVM nodes with a LAN between them.
@codeblock|{
import geni.rspec.pg as pg 

rspec = pg.Request()

#; Create a XenVM nodes.
node1 = pg.XenVM("node1")
node2 = pg.XenVM("node2")

#; Create interfaces for each node.
iface1 = node1.addInterface("if1")
iface2 = node2.addInterface("if2")

rspec.addResource(node1)
rspec.addResource(node2)

#; Create a link with the type of LAN.
link = pg.LAN("lan")

#; Add both node interfaces to the link.
link.addInterface(iface1)
link.addInterface(iface2)

#; Add the link to the RSpec.
rspec.addResource(link)

rspec.write("rspec.xml")
}|

Robert Ricci's avatar
Robert Ricci committed
82 83
@section[#:tag "public-ip-access"]{Public IP Access}

84 85
@(under-construction)

Robert Ricci's avatar
Robert Ricci committed
86 87
@section[#:tag "markdown"]{Markdown}

88
@(tb) supports
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
@hyperlink["http://daringfireball.net/projects/markdown/"]{Markdown}
in the major text fields in @seclink["rspecs"]{RSpecs}. Markdown is a simple
formatting syntax with a straighforward translation to basic HTML elements
such as headers, lists, and pre-formatted text. You may find this useful in 
the description and instructions attached to your profile.

While editing a profile, you can preview the Markdown rendering of the
Instructions or Description field by double-clicking within the text
box.

@screenshot["markdown-preview.png"]

You will probably find the
@hyperlink["http://daringfireball.net/projects/markdown/"]{Markdown manual} to
be useful.

Robert Ricci's avatar
Robert Ricci committed
105
@section[#:tag "tours"]{Tours}
106 107

@italic{This feature under development}