Commit e6ce08a1 authored by Austin Clements's avatar Austin Clements

This is the Planetlab manager. It includes a combination dslice

service manager and resource broker that works closely with the
control flow through the Emulab experiment swap process.  It keeps all
slice and node data in the DB.  Node allocation automatically unpacks
and configures the node to come up as an Emulab/Plab node when it is
booted (later, via vnode_setup).  It also takes care of other
necessary bits of interfacing with Planetlab, including discovering
which nodes are available, adding new Plab nodes to the DB, and
maintaining status information on Plab nodes.
parent ace048be
plabroot.tgz
The root tarball to be unpacked on to a fresh Plab sliver
identity, identity.pub
The ssh keypair of the Emulab user on Plab (with email
testbed@flux.utah.edu). This is also the key that is uploaded
to the dynamic slices for management.
key.pem, pubkey.pem
These are generated by plkeygen (hacked a bit so it doesn't
care about PIness) and allow the service manager to
authenticate itself. These are used to create the request to
Plab central for a dslice certificate.
req.pem
This is the plkeygen generated request that is sent to Plab.
It's technically unnecessary to keep around after cert.pem has
been received.
cert.pem
The Emulab user's dslice certificate. This allows the service
manager to authenticate itself. It comes from Brent Chun
(bnc@intel-research.com), or from plkeygen:refresh, in
response to the request created from key.pem and pubkey.pem
cacert.pem
A certificate used by the service manager. It comes from
http://www.planet-lab.org/dotplanetlab/base/cacert.pem (see
plkeygen:getbsae in the dslice source)
Note that all of the *.pem files created by plkeygen are dropped in
~/.planetlab, so they have to be moved to this directory to be used.
This diff is collapsed.
#!/usr/bin/env python
# -*- python -*-
import sys
sys.path.append("@prefix@/lib")
import libplab
def usage(me):
print "Usage: %s [-v] [-d] { getfree | renew }" % me
sys.exit(1)
def main(args):
try:
me, command = libplab.handleArgs(args)
except ValueError:
usage(args[0])
plab = libplab.Plab()
if command == "getfree":
plab.getFree()
elif command == "renew":
plab.renew()
else:
usage(me)
if __name__ == "__main__":
main(sys.argv)
#!/usr/bin/env python
# -*- python -*-
import sys
sys.path.append("@prefix@/lib")
import libplab
def usage(me):
print "Usage: %s [-v] [-d] { alloc | free } pid eid nodeid" % me
sys.exit(1)
def main(args):
try:
me, command, pid, eid, nodeid = libplab.handleArgs(args)
except ValueError:
usage(args[0])
plab = libplab.Plab()
slice = plab.loadSlice(pid, eid)
if command == "alloc":
node = slice.createNode(nodeid)
try:
node.addKey("plabdata/identity")
node.unpackTgz("plabdata/plabroot.tgz")
# XXX This file is redundant
node.putConfig("/etc/vnodeid", nodeid)
# Note that vnode_setup boots the node
except:
print "Node setup failed. Cleaning up"
node.free()
raise
elif command == "free":
node = slice.loadNode(nodeid)
node.free()
else:
usage(me)
if __name__ == "__main__":
main(sys.argv)
#!/usr/bin/env python
# -*- python -*-
import sys
sys.path.append("@prefix@/lib")
import libplab
def usage(me):
print "Usage: %s [-v] [-d] { create | destroy } pid eid" % me
sys.exit(-1)
def main(args):
try:
me, command, pid, eid = libplab.handleArgs(args)
except ValueError:
usage(args[0])
plab = libplab.Plab()
if command == "create":
slice = plab.createSlice(pid, eid)
elif command == "destroy":
slice = plab.loadSlice(pid, eid)
slice.destroy()
else:
usage(me)
if __name__ == "__main__":
main(sys.argv)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment