[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22710 - gnunet-planetlab/gplmt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22710 - gnunet-planetlab/gplmt |
Date: |
Tue, 17 Jul 2012 11:02:39 +0200 |
Author: wachs
Date: 2012-07-17 11:02:39 +0200 (Tue, 17 Jul 2012)
New Revision: 22710
Added:
gnunet-planetlab/gplmt/README
gnunet-planetlab/gplmt/gplmt.py
Removed:
gnunet-planetlab/gplmt/planetlab.py
Log:
- docu
Added: gnunet-planetlab/gplmt/README
===================================================================
--- gnunet-planetlab/gplmt/README (rev 0)
+++ gnunet-planetlab/gplmt/README 2012-07-17 09:02:39 UTC (rev 22710)
@@ -0,0 +1,64 @@
+ Welcome to GNUnet Planetlab Largescale Management Tool (gplmt)
+
+
+What is GNUnet Planetlab Largescale Management Tool?
+===============
+
+GNUnet is peer-to-peer framework focusing on security. GNUnet use the
+PlanetLab testbed for largescale testing. We use gplmt to deploy and
+manage GNUnet and administer.
+
+Additional information and documentation about gplmt can be found at
+https://gnunet.org/gplmt.
+
+
+Dependencies:
+=============
+
+These are the direct dependencies for running gplmt:
+
+- Python >= 2.7
+- ElementTree >= 1.3
+- Paramiko >= 1.7
+
+The version numbers represent the versions we used to develop gplmt.
+
+
+How to install?
+===============
+
+Python
+--------
+
+Please check your OS documention or http://www.python.org/ how to setup
+Python
+
+To install the required python modules, we recommend to use the pip
+installer:
+
+http://www.pip-installer.org/en/latest/index.html
+
+ElementTree
+--------
+
+On GNU/Linux use: sudo pip install elementtree
+Or check http://effbot.org/zone/element-index.htm
+
+
+Paramiko
+--------
+
+On GNU/Linux use: sudo pip install paramiko
+Or check http://www.lag.net/paramiko/
+
+
+
+Usage
+===============
+
+
+Configuration
+===============
+
+Set up a Tasklist
+===============
Copied: gnunet-planetlab/gplmt/gplmt.py (from rev 22618,
gnunet-planetlab/gplmt/planetlab.py)
===================================================================
--- gnunet-planetlab/gplmt/gplmt.py (rev 0)
+++ gnunet-planetlab/gplmt/gplmt.py 2012-07-17 09:02:39 UTC (rev 22710)
@@ -0,0 +1,146 @@
+#!/usr/bin/python
+#
+# This file is part of GNUnet.
+# (C) 2010 Christian Grothoff (and other contributing authors)
+#
+# GNUnet is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 2, or (at your
+# option) any later version.
+#
+# GNUnet is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNUnet; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# GNUnet Planetlab deployment and automation toolset
+#
+# Main file
+
+import getopt;
+import sys;
+import Util;
+import Configuration;
+import Nodes;
+import Tasks;
+
+# Checking dependencies
+# ElementTree XML Parser
+try:
+ from elementtree import ElementTree
+ elementtree_loaded = True
+except ImportError:
+ elementtree_loaded = False
+
+
+def main():
+ global main
+ main = Main ()
+
+# Check dependencies
+ if (False == elementtree_loaded):
+ print "ElementTree is required for execution, please check README"
+ sys.exit(2)
+
+# Parse command line arguments
+
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "hvc:n:t:", ["help",
"config=", "nodes=", "tasks="])
+ except getopt.GetoptError, err:
+ # print help information and exit:
+ print str(err) # will print something like "option -a not recognized"
+ usage()
+ sys.exit(2)
+ for o, a in opts:
+ if o == "-v":
+ main.verbose = True
+ elif o in ("-h", "--help"):
+ usage()
+ sys.exit()
+ elif o in ("-c", "--config"):
+ main.config_file = a
+ elif o in ("-n", "--nodes"):
+ main.nodes_file = a
+ elif o in ("-t", "--tasks"):
+ main.tasks_file = a
+ else:
+ assert False, "unhandled option"
+
+ if (main.verbose == True):
+ main.logger = Util.Logger (True)
+ else:
+ main.logger = Util.Logger (False)
+
+ if (main.config_file == ""):
+ print "No configuration file given!\n"
+ usage()
+ sys.exit(2)
+
+# Load configuration file
+ configuration = Configuration.Configuration (main.config_file,
main.logger);
+ if (configuration.load() == False):
+ sys.exit(2)
+
+
+
+ # command line beats configuration
+ if (main.nodes_file == ""):
+ if (configuration.nodesfile != ""):
+ main.nodes_file = configuration.nodesfile
+ else:
+ print "No nodes file given!\n"
+ usage()
+ sys.exit(2)
+ if (main.tasks_file == ""):
+ if (configuration.taskfile != ""):
+ main.tasks_file = configuration.taskfile
+ else:
+ print "No tasks file given!\n"
+ usage()
+ sys.exit(2)
+
+# Load hosts files
+ nodes = Nodes.Nodes (main.nodes_file, main.logger);
+ if (nodes.load() == False):
+ sys.exit(2)
+
+# Load actions file
+ tasks = Tasks.Tasks (main.tasks_file, main.logger);
+ if (tasks.load() == False):
+ sys.exit(2)
+
+# Start parallel ssh execution
+
+# Clean up
+
+
+# ---------------------------------------------------
+
+def usage():
+ print "GNUnet PlanetLab deployment and automation toolset\n\
+Arguments mandatory for long options are also mandatory for short options.\n\
+ -c, --config=FILENAME use configuration file FILENAME\n\
+ -n, --nodes=FILENAME use node file FILENAME\n\
+ -t, --tasks=FILENAME use tasks file FILENAME\n\
+ -h, --help print this help\n\
+ -V, --verbose be verbose \n\
+Report bugs to address@hidden \n\
+GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
+General help using GNU software: http://www.gnu.org/gethelp/";
+
+class Main:
+ verbose = False;
+ config_file = "";
+ nodes_file = "";
+ tasks_file = "";
+ logger = None;
+ def __init__(self):
+ self.verbose = False;
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file
Deleted: gnunet-planetlab/gplmt/planetlab.py
===================================================================
--- gnunet-planetlab/gplmt/planetlab.py 2012-07-17 07:39:03 UTC (rev 22709)
+++ gnunet-planetlab/gplmt/planetlab.py 2012-07-17 09:02:39 UTC (rev 22710)
@@ -1,132 +0,0 @@
-#!/usr/bin/python
-#
-# This file is part of GNUnet.
-# (C) 2010 Christian Grothoff (and other contributing authors)
-#
-# GNUnet is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; either version 2, or (at your
-# option) any later version.
-#
-# GNUnet is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNUnet; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-# GNUnet Planetlab deployment and automation toolset
-#
-# Main file
-
-import getopt;
-import sys;
-import Util;
-import Configuration;
-import Nodes;
-import Tasks;
-
-
-def main():
- global main
- main = Main ()
-# Parse command line arguments
-
- try:
- opts, args = getopt.getopt(sys.argv[1:], "hvc:n:t:", ["help",
"config=", "nodes=", "tasks="])
- except getopt.GetoptError, err:
- # print help information and exit:
- print str(err) # will print something like "option -a not recognized"
- usage()
- sys.exit(2)
- for o, a in opts:
- if o == "-v":
- main.verbose = True
- elif o in ("-h", "--help"):
- usage()
- sys.exit()
- elif o in ("-c", "--config"):
- main.config_file = a
- elif o in ("-n", "--nodes"):
- main.nodes_file = a
- elif o in ("-t", "--tasks"):
- main.tasks_file = a
- else:
- assert False, "unhandled option"
-
- if (main.verbose == True):
- main.logger = Util.Logger (True)
- else:
- main.logger = Util.Logger (False)
-
- if (main.config_file == ""):
- print "No configuration file given!\n"
- usage()
- sys.exit(2)
-
-# Load configuration file
- configuration = Configuration.Configuration (main.config_file,
main.logger);
- if (configuration.load() == False):
- sys.exit(2)
-
-
-
- # command line beats configuration
- if (main.nodes_file == ""):
- if (configuration.nodesfile != ""):
- main.nodes_file = configuration.nodesfile
- else:
- print "No nodes file given!\n"
- usage()
- sys.exit(2)
- if (main.tasks_file == ""):
- if (configuration.taskfile != ""):
- main.tasks_file = configuration.taskfile
- else:
- print "No tasks file given!\n"
- usage()
- sys.exit(2)
-
-# Load hosts files
- nodes = Nodes.Nodes (main.nodes_file, main.logger);
- if (nodes.load() == False):
- sys.exit(2)
-
-# Load actions file
- tasks = Tasks.Tasks (main.tasks_file, main.logger);
- if (tasks.load() == False):
- sys.exit(2)
-
-# Start parallel ssh execution
-
-# Clean up
-
-
-# ---------------------------------------------------
-
-def usage():
- print "GNUnet PlanetLab deployment and automation toolset\n\
-Arguments mandatory for long options are also mandatory for short options.\n\
- -c, --config=FILENAME use configuration file FILENAME\n\
- -n, --nodes=FILENAME use node file FILENAME\n\
- -t, --tasks=FILENAME use tasks file FILENAME\n\
- -h, --help print this help\n\
- -V, --verbose be verbose \n\
-Report bugs to address@hidden \n\
-GNUnet home page: http://www.gnu.org/software/gnunet/ \n\
-General help using GNU software: http://www.gnu.org/gethelp/";
-
-class Main:
- verbose = False;
- config_file = "";
- nodes_file = "";
- tasks_file = "";
- logger = None;
- def __init__(self):
- self.verbose = False;
-
-if __name__ == "__main__":
- main()
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22710 - gnunet-planetlab/gplmt,
gnunet <=