[rhmessaging-commits] rhmessaging commits: r1942 - mgmt.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Apr 18 12:29:25 EDT 2008


Author: justi9
Date: 2008-04-18 12:29:24 -0400 (Fri, 18 Apr 2008)
New Revision: 1942

Modified:
   mgmt/README
Log:
Update the devel README.



Modified: mgmt/README
===================================================================
--- mgmt/README	2008-04-18 14:56:10 UTC (rev 1941)
+++ mgmt/README	2008-04-18 16:29:24 UTC (rev 1942)
@@ -1,7 +1,14 @@
 This is the development environment for the Red Hat Messaging
-management suite.
+management suite (in this document, "mgmt" for short).
 
+These instructions assume you have sudo installed.  If not, you can
+install it (as shown below) or you can instead su to root.  To install
+sudo:
 
+  $ sudo yum install sudo
+  $ su -
+  $ visudo                            # Add your user
+
 DEPENDENCIES
 ------------
 
@@ -12,61 +19,116 @@
   python-sqlobject
   python-psycopg2
 
+  $ sudo yum install postgresql-server python-sqlobject python-psycopg2
 
+It also depends on the qpid python code.  You can satisfy these
+dependencies either by installing the python-qpid package, or by
+checking out the qpid python code.  The latter is currently the better
+option, because of mgmt depending on newer features of the qpid python
+code.
+
+Check out qpid python from source and put it in the PYTHONPATH.  The
+method below links to the qpid code via symlinks in ~/lib/python,
+which is in the mgmt devel environment's PYTHONPATH:
+
+  $ svn co http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/python ~/pyqpid
+  $ mkdir -p ~/lib/python
+  $ cd ~/lib/python
+  $ ln -s ~/pyqpid/qpid
+  $ ln -s ~/pyqpid/mllib
+
+*Alternatively*, install python-qpid:
+
+  $ sudo yum install python-qpid
+
+PREPARING THE DEVEL ENVIRONMENT
+-------------------------------
+
+Change to the mgmt directory (the one containing this README file),
+and source the devel environment settings:
+
+  $ cd mgmt                           
+  $ source etc/devel.profile          # Or use etc/devel.profile.tcsh
+
+Check that everything is set up properly:
+
+  $ which cumin
+  ~/mgmt/cumin/bin/cumin
+  $ echo $DEVEL_HOME
+  /home/youruser/mgmt
+
 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:
+service, edit permissions, and start it up.
 
-To initialize the postgresql data files:
+Initialize the postgresql data files:
 
-  $ su -
-  Password:
-  # su - postgres                # Now you're the postgres user
+  $ sudo su - postgres                # Now you're the postgres user
   $ initdb -D /var/lib/pgsql/data
 
-To start the postgresql service:
+Edit postgresql permissions:
 
-  $ exit                         # Back to the root user
-  # /sbin/service postgresql start
+  $ vi /var/lib/pgsql/data/pg_hba.conf
+  
+    [Add the following line, *before* the other similar lines]
+
+    host    cumin       cumin       127.0.0.1/32          ident cumin
+
+  $ vi /var/lib/pgsql/data/pg_ident.conf
+
+    [Add the following lines at the bottom, substituting your user
+     name for "youruser"]
+
+    cumin         youruser          cumin
+    cumin         root              cumin
+
+Start the postgresql service:
+
+  $ exit                              # Back to your own user
+  # sudo /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:
+Now you can create a database.  First you have to switch to the
+postgres user, and then you can use the create* scripts.
 
-  # su - postgres                # Become the postgres user again
-  $ createuser --superuser exampleuser
+Create the postgresql database:
+
+  $ sudo su - postgres                # Become the postgres user again
+  $ createuser --superuser cumin
   CREATE ROLE
-  $ createdb --owner=exampleuser exampledb
+  $ createdb --owner=cumin cumin
   CREATE DATABASE
+  $ exit                              # Leave the postgres user
 
-Now you can load the scheme definition:
+At this point you should have a working database.  Test it using psql:
 
-  $ 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...
+  $ psql -d cumin -U cumin -h localhost
+  Welcome to psql 8.2.7, the PostgreSQL interactive terminal.
+  [...]
+  cumin=#                             # Type \q to get out
 
-At this point you should have a working database that you can connect
-to at postgresql://exampleuser@localhost/exampledb.
+Now you can load the scheme definition.
 
+  $ cumin-admin create-schema
+  Executed 100 statements from file '/home/jross/checkouts/mgmt/cumin-test-0/sql/schema.sql'
+  Executed 6 statements from file '/home/jross/checkouts/mgmt/cumin-test-0/sql/indexes.sql'
 
-USING THE DEVEL ENVIRONMENT
----------------------------
+At this point you should have a working database and schema that you
+can connect to at postgresql://exampleuser@localhost/exampledb.  All
+that remains is to add a cumin user:
 
-First, you need to source the etc/devel.profile file in your shell.
-Then commands such as cumin-test can be run.
+Add a cumin user:
 
-For instance:
+  $ cumin-admin add-user guest
+  Password:                           # Enter a password for guest
 
-  $ cd mgmt
-  $ . etc/devel.profile
-  $ cumin-test --data postgresql://exampleuser@localhost/exampledb
-  Cumin server started on port 9090
 
+USING THE DEVEL ENVIRONMENT
+---------------------------
+
 For your convenience, there is a script, bin/devel, which you can use
 to start up the devel environment.  I recommend putting a small
 wrapper script like that below somewhere in your path:




More information about the rhmessaging-commits mailing list