[rhmessaging-commits] rhmessaging commits: r1309 - in mgmt: cumin/bin and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Nov 13 19:43:49 EST 2007


Author: justi9
Date: 2007-11-13 19:43:49 -0500 (Tue, 13 Nov 2007)
New Revision: 1309

Modified:
   mgmt/README
   mgmt/cumin/bin/cumin-test
Log:
Expands the instructions in README.

Fixes the no-conf file case in cumin-test.



Modified: mgmt/README
===================================================================
--- mgmt/README	2007-11-14 00:17:50 UTC (rev 1308)
+++ mgmt/README	2007-11-14 00:43:49 UTC (rev 1309)
@@ -1,16 +1,64 @@
-This is the development environment for the Red Hat messaging
+This is the development environment for the Red Hat Messaging
 management suite.
 
-To use the development environment, you need to source the
-etc/devel.profile file in your shell.  Then commands such as
-cumin-test can be run.
 
+DEPENDENCIES
+------------
+
+To run the management code, you need the following packages (on top of
+what you get in a typical Fedora install):
+
+  postgresql-server
+  python-sqlobject
+  python-psycopg2
+
+
+PREPARING THE DATABASE
+----------------------
+
+You will also need to create a database and load the schema.  If you
+haven't already done it, you'll need to initialize the postgres
+database and start it up:
+
+  $ su -
+  Password:
+  # /sbin/service postgresql initdb
+  # /sbin/service postgresql start
+  Starting postgresql service:                               [  OK  ]
+
+Then you can create a database.  First you have to switch to the
+postgres user, and then you can use the create* scripts:
+
+  # su - postgres
+  $ createuser --superuser exampleuser
+  CREATE ROLE
+  $ createdb --owner=exampleuser exampledb
+  CREATE DATABASE
+
+Now you can load the scheme definition:
+
+  $ exit                         # Leave the postgres user
+  # exit                         # Leave the root user (be yourself!)
+  $ cd mgmt
+  $ psql -d exampledb -f mint/python/mint/schema.sql
+  ...many statements about schema objects...
+
+At this point you should have a working database that you can connect
+to at postgresql://exampleuser@localhost/exampledb.
+
+
+USING THE DEVEL ENVIRONMENT
+---------------------------
+
+First, you need to source the etc/devel.profile file in your shell.
+Then commands such as cumin-test can be run.
+
 For instance:
 
-  $ svn co https://svn.jboss.org/repos/rhmessaging/mgmt/
   $ cd mgmt
   $ . etc/devel.profile
-  $ cumin-test
+  $ cumin-test --data postgresql://exampleuser@localhost/exampledb
+  Cumin server started on port 9090
 
 For your convenience, there is a script, bin/devel, which you can use
 to start up the devel environment.  I recommend putting a small

Modified: mgmt/cumin/bin/cumin-test
===================================================================
--- mgmt/cumin/bin/cumin-test	2007-11-14 00:17:50 UTC (rev 1308)
+++ mgmt/cumin/bin/cumin-test	2007-11-14 00:43:49 UTC (rev 1309)
@@ -9,8 +9,9 @@
     conf = SafeConfigParser()
     conf.read(os.path.expanduser("~/.cumin.conf"))
 
-    for key, value in conf.items("main"):
-        args[key] = value
+    if (conf.has_section("main")): 
+        for key, value in conf.items("main"):
+            args[key] = value
     
     key = None
 
@@ -22,10 +23,12 @@
             args[key] = arg
             key = None
 
-    print "Parameters:"
-    for key in args:
-        print " %10s %s" % (key, args[key])
+    if args:
+        print "Parameters:"
 
+        for key in args:
+            print " %10s %s" % (key, args[key])
+
     return args
 
 from sqlobject import *




More information about the rhmessaging-commits mailing list