rhmessaging commits: r1948 - mgmt/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-21 14:51:38 -0400 (Mon, 21 Apr 2008)
New Revision: 1948
Modified:
mgmt/etc/devel.profile
Log:
Unbreak the devel env scripts
Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile 2008-04-21 08:52:19 UTC (rev 1947)
+++ mgmt/etc/devel.profile 2008-04-21 18:51:38 UTC (rev 1948)
@@ -13,7 +13,7 @@
pypath="$DEVEL_HOME"/lib/python:"$HOME"/lib/python:"$DEVEL_ORIGINAL_PYTHONPATH"
for module in $DEVEL_MODULES; do
- pypath="$DEVEL_HOME"/"$module"/lib/python:"$pypath"
+ pypath="$DEVEL_HOME"/"$module"/python:"$pypath"
done
export PYTHONPATH="$pypath"
16 years, 8 months
rhmessaging commits: r1947 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: gordonsim
Date: 2008-04-21 04:52:19 -0400 (Mon, 21 Apr 2008)
New Revision: 1947
Modified:
store/trunk/cpp/tests/MessageUtils.h
store/trunk/cpp/tests/OrderingTest.cpp
store/trunk/cpp/tests/SimpleTest.cpp
store/trunk/cpp/tests/TransactionalTest.cpp
store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
Log:
Fixes to compilation errors caused by move to final 0-10 method defs in qpid project.
Modified: store/trunk/cpp/tests/MessageUtils.h
===================================================================
--- store/trunk/cpp/tests/MessageUtils.h 2008-04-19 16:13:50 UTC (rev 1946)
+++ store/trunk/cpp/tests/MessageUtils.h 2008-04-21 08:52:19 UTC (rev 1947)
@@ -25,6 +25,8 @@
#include <qpid/broker/Message.h>
#include <qpid/broker/MessageDelivery.h>
#include <qpid/framing/AMQFrame.h>
+#include <qpid/framing/all_method_bodies.h>
+#include <qpid/framing/Uuid.h>
using namespace qpid::broker;
using namespace qpid::framing;
@@ -32,11 +34,11 @@
struct MessageUtils
{
static Message::shared_ptr createMessage(const string& exchange, const string& routingKey,
- const string& messageId="", uint64_t contentSize = 0)
+ const Uuid& messageId=Uuid(), uint64_t contentSize = 0)
{
Message::shared_ptr msg(new Message());
- AMQFrame method(in_place<MessageTransferBody>(ProtocolVersion(), 0, exchange, 0, 0));
+ AMQFrame method(in_place<MessageTransferBody>(ProtocolVersion(), exchange, 0, 0));
AMQFrame header(in_place<AMQHeaderBody>());
msg->getFrames().append(method);
Modified: store/trunk/cpp/tests/OrderingTest.cpp
===================================================================
--- store/trunk/cpp/tests/OrderingTest.cpp 2008-04-19 16:13:50 UTC (rev 1946)
+++ store/trunk/cpp/tests/OrderingTest.cpp 2008-04-21 08:52:19 UTC (rev 1947)
@@ -50,7 +50,7 @@
std::auto_ptr<BdbMessageStore> store;
QueueRegistry queues;
Queue::shared_ptr queue;
-std::queue<std::string> ids;
+std::queue<Uuid> ids;
int counter = 1;
void setup(bool async)
@@ -66,10 +66,7 @@
void push()
{
- string base("Message");
- std::stringstream id;
- id << base << counter++;
- string messageId(id.str());
+ Uuid messageId(true);
ids.push(messageId);
Message::shared_ptr msg = MessageUtils::createMessage("exchange", "routing_key", messageId, 0);
@@ -83,9 +80,8 @@
Message::shared_ptr msg = queue->dequeue().payload;
if (msg) {
queue->dequeue(0, msg);
- string expected = ids.front();
+ BOOST_REQUIRE_EQUAL(ids.front(), msg->getProperties<MessageProperties>()->getMessageId());
ids.pop();
- BOOST_REQUIRE_EQUAL(expected, msg->getProperties<MessageProperties>()->getMessageId());
return true;
} else {
return false;
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2008-04-19 16:13:50 UTC (rev 1946)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2008-04-21 08:52:19 UTC (rev 1947)
@@ -189,7 +189,7 @@
string name("MyDurableQueue");
string exchange("MyExchange");
string routingKey("MyRoutingKey");
- string messageId = "MyMessage";
+ Uuid messageId(true);
string data1("abcdefg");
string data2("hijklmn");
{
@@ -247,7 +247,7 @@
{
string exchange("MyExchange");
string routingKey("MyRoutingKey");
- string messageId = "MyMessage";
+ Uuid messageId(true);
string data("abcdefg");
BdbMessageStore store;
store.init(TESTDIR, async, true, 4, 1);
@@ -280,7 +280,7 @@
const string name("MyDurableQueue");
const string exchange("MyExchange");
const string routingKey("MyRoutingKey");
- const string messageId = "MyStagedMessage";
+ const Uuid messageId(true);
const string data1("abcdefghijklmnopqrstuvwxyz");
const string data2("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
{
Modified: store/trunk/cpp/tests/TransactionalTest.cpp
===================================================================
--- store/trunk/cpp/tests/TransactionalTest.cpp 2008-04-19 16:13:50 UTC (rev 1946)
+++ store/trunk/cpp/tests/TransactionalTest.cpp 2008-04-21 08:52:19 UTC (rev 1947)
@@ -49,7 +49,7 @@
const string nameA("queueA");
const string nameB("queueB");
-const string messageId("TxnMessage");
+const Uuid messageId(true);
std::auto_ptr<BdbMessageStore> store;
QueueRegistry queues;
Queue::shared_ptr queueA;
Modified: store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
===================================================================
--- store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2008-04-19 16:13:50 UTC (rev 1946)
+++ store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2008-04-21 08:52:19 UTC (rev 1947)
@@ -233,7 +233,8 @@
Message::shared_ptr createMessage(const string& id, const string& exchange="exchange", const string& key="routing_key")
{
- Message::shared_ptr msg = MessageUtils::createMessage(exchange, key, id, 0);
+ Message::shared_ptr msg = MessageUtils::createMessage(exchange, key);
+ msg->getProperties<MessageProperties>()->setCorrelationId(id);
msg->getProperties<DeliveryProperties>()->setDeliveryMode(PERSISTENT);
return msg;
}
@@ -276,7 +277,7 @@
BOOST_REQUIRE_EQUAL((u_int32_t) 1, y->getMessageCount());
Message::shared_ptr msg = y->dequeue().payload;
BOOST_REQUIRE(msg);
- BOOST_REQUIRE_EQUAL(msgid, msg->getProperties<MessageProperties>()->getMessageId());
+ BOOST_REQUIRE_EQUAL(msgid, msg->getProperties<MessageProperties>()->getCorrelationId());
}
void checkA(u_int32_t size, const string& msgid = "<none>")
@@ -286,7 +287,7 @@
if (size > 0) {
Message::shared_ptr msg = queueA->dequeue().payload;
BOOST_REQUIRE(msg);
- BOOST_REQUIRE_EQUAL(msgid, msg->getProperties<MessageProperties>()->getMessageId());
+ BOOST_REQUIRE_EQUAL(msgid, msg->getProperties<MessageProperties>()->getCorrelationId());
}
}
16 years, 8 months
rhmessaging commits: r1946 - in mgmt: cumin and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-19 12:13:50 -0400 (Sat, 19 Apr 2008)
New Revision: 1946
Added:
mgmt/etc/Makefile.common
Modified:
mgmt/Makefile
mgmt/cumin/Makefile
mgmt/etc/devel.profile
mgmt/mint/Makefile
Log:
Add make build and install rules.
Add a common Makefile for setting up install vars.
Make the MINT_SCHEMA_XML check in mint/Makefile dynamic.
Switch to using PREFIX instead of INSTALL_PREFIX in devel.profile and
the makefiles.
Modified: mgmt/Makefile
===================================================================
--- mgmt/Makefile 2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/Makefile 2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,9 +1,19 @@
+ifndef DEVEL_HOME
+ $(error "DEVEL_HOME is not set; you need to source etc/devel.profile")
+endif
+
+.PHONY: help dist clean cumin mint tags
+
version := 0.1
-.PHONY: help dist clean cumin mint
-
help:
- @echo Targets: dist, clean, tags
+ @echo "Targets:"
+ @echo " help Print this message"
+ @echo " tags Rebuild the tag index"
+ @echo " dist Create a dist tarball"
+ @echo " cumin Install cumin"
+ @echo " mint Install mint"
+ @echo " clean Remove software installed at $$DEVEL_HOME/install"
dist: clean
mkdir -p dist/lib/python/mint
@@ -33,6 +43,7 @@
clean:
rm -rf dist
+ rm -rf ${DEVEL_HOME}/install
tags:
find "${DEVEL_HOME}" -name \*.py -print \
Modified: mgmt/cumin/Makefile
===================================================================
--- mgmt/cumin/Makefile 2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/cumin/Makefile 2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,38 +1,36 @@
-.phony: install prepare
+.phony: build install
-ifdef INSTALL_PREFIX
- prefix := ${INSTALL_PREFIX}
-else
- prefix := /usr/local
-endif
+include ../etc/Makefile.common
name := cumin
ver := 0.1
-home := ${prefix}/share/${name}
-install: prepare
- install -d ${prefix}/lib/python/wooly ${prefix}/lib/python/${name}
- install python/wooly/*.py? python/wooly/*.strings ${prefix}/lib/python/wooly
- install python/cumin/*.py? python/cumin/*.strings ${prefix}/lib/python/${name}
- install -d ${prefix}/bin
- install bin/* ${prefix}/bin
- install -d ${prefix}/share/doc/${name}-${ver}
- install LICENSE COPYING ${prefix}/share/doc/${name}-${ver}
+home := ${PREFIX}/share/${name}
+lib := ${PYTHON_LIB_DIR}/${name}
+doc := ${PREFIX}/share/doc/${name}-${ver}
+log := ${VAR_DIR}/log/${name}
+
+build:
+ python-compile python
+
+install: build
+ install -d ${PYTHON_LIB_DIR}/wooly
+ install python/wooly/*.py python/wooly/*.pyc python/wooly/*.strings ${PYTHON_LIB_DIR}/wooly
+ install -d ${lib}
+ install python/cumin/*.py python/cumin/*.pyc python/cumin/*.strings ${lib}
+ install -d ${BIN_DIR}
+ install bin/* ${BIN_DIR}
+ install -d ${doc}
+ install LICENSE COPYING ${doc}
install -d ${home}/resources
install resources/* ${home}/resources
- install -d ${prefix}/etc
- install etc/* ${prefix}/etc
- install -d ${prefix}/var/log
+ install -d ${ETC_DIR}
+ install etc/* ${ETC_DIR}
+ install -d ${log}
-prepare:
- install -d ${prefix}/lib
- install -d ${prefix}/bin
- install -d ${prefix}/etc
- install -d ${prefix}/share/doc
- install -d ${prefix}/var/log/${name}
- install -d ${home}
- ln -sf ${prefix}/lib ${home}/lib
- ln -sf ${prefix}/bin ${home}/bin
- ln -sf ${prefix}/etc ${home}/etc
- ln -sf ${prefix}/share/doc ${home}/doc
- ln -sf ${prefix}/var/log/${name} ${home}/log
+ install -d ${home}/lib
+ ln -sf ${PYTHON_LIB_DIR} ${home}/lib/python
+ ln -sf ${BIN_DIR} ${home}/bin
+ ln -sf ${ETC_DIR} ${home}/etc
+ ln -sf ${doc} ${home}/doc
+ ln -sf ${log} ${home}/log
Added: mgmt/etc/Makefile.common
===================================================================
--- mgmt/etc/Makefile.common (rev 0)
+++ mgmt/etc/Makefile.common 2008-04-19 16:13:50 UTC (rev 1946)
@@ -0,0 +1,19 @@
+ifndef PREFIX
+ PREFIX := /usr/local
+endif
+
+ifndef PYTHON_LIB_DIR
+ PYTHON_LIB_DIR := ${PREFIX}/lib/python
+endif
+
+ifndef BIN_DIR
+ BIN_DIR := ${PREFIX}/bin
+endif
+
+ifndef ETC_DIR
+ ETC_DIR := ${PREFIX}/etc
+endif
+
+ifndef VAR_DIR
+ VAR_DIR := ${PREFIX}/var
+endif
Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile 2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/etc/devel.profile 2008-04-19 16:13:50 UTC (rev 1946)
@@ -13,7 +13,7 @@
pypath="$DEVEL_HOME"/lib/python:"$HOME"/lib/python:"$DEVEL_ORIGINAL_PYTHONPATH"
for module in $DEVEL_MODULES; do
- pypath="$DEVEL_HOME"/"$module"/python:"$pypath"
+ pypath="$DEVEL_HOME"/"$module"/lib/python:"$pypath"
done
export PYTHONPATH="$pypath"
@@ -35,4 +35,4 @@
# cumin test instance
export CUMIN_HOME="$DEVEL_HOME"/cumin-test-0
-export INSTALL_PREFIX="$DEVEL_HOME"/install
+export PREFIX="$DEVEL_HOME"/install
Modified: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile 2008-04-19 16:12:04 UTC (rev 1945)
+++ mgmt/mint/Makefile 2008-04-19 16:13:50 UTC (rev 1946)
@@ -1,37 +1,34 @@
-.PHONY: install prepare schema schema-sql schema-python
+.PHONY: build install schema schema-sql schema-python
-ifdef INSTALL_PREFIX
- prefix := ${INSTALL_PREFIX}
-else
- prefix := /usr/local
-endif
+include ../etc/Makefile.common
+dsn := "postgresql://localhost/"
+
name := mint
ver := 0.1
-home := ${prefix}/share/${name}
-dsn := "postgresql://localhost/"
-install: prepare
- install -d ${prefix}/lib/python/mint
- install python/mint/*.py? ${prefix}/lib/python/mint
- install -d ${prefix}/bin
- install bin/* ${prefix}/bin
- install -d ${prefix}/share/doc/${name}-${ver}
- install LICENSE COPYING ${prefix}/share/doc/${name}-${ver}
+home := ${PREFIX}/share/${name}
+lib := ${PYTHON_LIB_DIR}/${name}
+doc := ${PREFIX}/share/doc/${name}-${ver}
+log := ${VAR_DIR}/log/${name}
+
+build:
+ python-compile python
+
+install: build
+ install -d ${lib}
+ install python/mint/*.py python/mint/*.pyc ${lib}
+ install -d ${BIN_DIR}
+ install bin/* ${BIN_DIR}
+ install -d ${doc}
+ install LICENSE COPYING ${doc}
install -d ${home}/sql
install sql/* ${home}/sql
-prepare:
- install -d ${home}
- ln -sf ${prefix}/lib ${home}/lib
- ln -sf ${prefix}/share/doc ${home}/doc
-
schema: schema-python schema-sql
schema-python:
-ifndef MINT_SCHEMA_XML
- $(error "MINT_SCHEMA_XML is not set")
-endif
+ @if [ -z "$$MINT_SCHEMA_XML" ]; then echo "MINT_SCHEMA_XML is not set"; exit 1; fi
python python/mint/schemaparser.py ${MINT_SCHEMA_XML} python/mint/schema.py ${dsn}
schema-sql:
16 years, 8 months
rhmessaging commits: r1945 - mgmt/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-19 12:12:04 -0400 (Sat, 19 Apr 2008)
New Revision: 1945
Added:
mgmt/bin/python-compile
Log:
A script to generate pyc files
Added: mgmt/bin/python-compile
===================================================================
--- mgmt/bin/python-compile (rev 0)
+++ mgmt/bin/python-compile 2008-04-19 16:12:04 UTC (rev 1945)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+import sys, compileall, re
+
+if len(sys.argv) < 2:
+ print "Usage: %s PATH" % sys.argv[0]
+ sys.exit(1)
+
+compileall.compile_dir(sys.argv[1], rx=re.compile("/\.svn"), force=True)
Property changes on: mgmt/bin/python-compile
___________________________________________________________________
Name: svn:executable
+ *
16 years, 8 months
rhmessaging commits: r1944 - mgmt.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-18 15:06:40 -0400 (Fri, 18 Apr 2008)
New Revision: 1944
Modified:
mgmt/README
Log:
Formatting tweaks
Modified: mgmt/README
===================================================================
--- mgmt/README 2008-04-18 19:04:57 UTC (rev 1943)
+++ mgmt/README 2008-04-18 19:06:40 UTC (rev 1944)
@@ -2,9 +2,10 @@
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:
+install it (as shown below) or you can instead su to root.
+To install sudo:
+
$ sudo yum install sudo
$ su -
$ visudo # Add your user
@@ -123,8 +124,8 @@
Add a cumin user:
$ cumin-admin add-user guest
- Set password: # Enter a password for guest
- Retype password: # Confirm said password
+ Set password: # Enter a password for guest
+ Retype password: # Confirm said password
User 'guest' is added
16 years, 8 months
rhmessaging commits: r1943 - in mgmt: cumin/bin and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-18 15:04:57 -0400 (Fri, 18 Apr 2008)
New Revision: 1943
Modified:
mgmt/README
mgmt/cumin/bin/cumin-admin
mgmt/notes/justin-todo.txt
Log:
Update the add-user subcommand of cumin-admin. Add a password confirm
step.
Also had some success messages to add-user and remove-user.
Update the README to reflect the cumin-admin changes.
Modified: mgmt/README
===================================================================
--- mgmt/README 2008-04-18 16:29:24 UTC (rev 1942)
+++ mgmt/README 2008-04-18 19:04:57 UTC (rev 1943)
@@ -123,7 +123,9 @@
Add a cumin user:
$ cumin-admin add-user guest
- Password: # Enter a password for guest
+ Set password: # Enter a password for guest
+ Retype password: # Confirm said password
+ User 'guest' is added
USING THE DEVEL ENVIRONMENT
Modified: mgmt/cumin/bin/cumin-admin
===================================================================
--- mgmt/cumin/bin/cumin-admin 2008-04-18 16:29:24 UTC (rev 1942)
+++ mgmt/cumin/bin/cumin-admin 2008-04-18 19:04:57 UTC (rev 1943)
@@ -90,7 +90,17 @@
print "Error: a user called '%s' already exists" % name
sys.exit(1)
- password = getpass()
+ password = None
+
+ while password is None:
+ once = getpass("Set password: ")
+ twice = getpass("Retype password: ")
+
+ if once == twice:
+ password = once
+ else:
+ print "Passwords don't match; try again"
+
chs = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
crypted = crypt(password, "".join(sample(chs, 2)))
@@ -100,24 +110,28 @@
print "Error: a user called '%s' already exists" % name
sys.exit(1)
+ print "User '%s' is added" % name
elif command == "remove-user":
if config.force:
if len(args) != 2:
print "Error: no user name given"
sys.exit(1)
- accounts = ConsoleUser.selectBy(name=args[1])
+ name = args[1]
+ accounts = ConsoleUser.selectBy(name=name)
if accounts.count():
for account in accounts:
account.destroySelf()
- return
+ break
else:
print "Error: no such user '%s'" % args[1]
+ sys.exit(1)
+
+ print "User '%s' is removed" % name
else:
print "Error: command remove-user requires --force yes"
sys.exit(1)
-
elif command == "list-users":
accounts = ConsoleUser.select(orderBy='name')
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2008-04-18 16:29:24 UTC (rev 1942)
+++ mgmt/notes/justin-todo.txt 2008-04-18 19:04:57 UTC (rev 1943)
@@ -10,8 +10,6 @@
* Make it possible to navigate from broker to system
- * Update the README
-
* Fix the status box updates, to avoid the "/sec" display
* Fix obnoxious HTML resizing bug
@@ -30,10 +28,10 @@
* stat.py:222 min_value is None somehow
- * Need to prompt for password confirmation
-
* Blow up if someone adds a child with an existing name
+ * Handle parameter exceptions
+
Deferred
* Change the way CuminAction.invoke works
16 years, 8 months
rhmessaging commits: r1942 - mgmt.
by rhmessaging-commits@lists.jboss.org
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:
16 years, 8 months
rhmessaging commits: r1941 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-18 10:56:10 -0400 (Fri, 18 Apr 2008)
New Revision: 1941
Modified:
mgmt/cumin/python/cumin/broker.strings
mgmt/notes/justin-todo.txt
Log:
Adjust broker browser spacing
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2008-04-18 14:34:33 UTC (rev 1940)
+++ mgmt/cumin/python/cumin/broker.strings 2008-04-18 14:56:10 UTC (rev 1941)
@@ -135,8 +135,8 @@
font-size: 0.9em;
}
-table.BrokerBrowser td.nav ul {
- margin: 0 0 1em 0;
+table.BrokerBrowser td.nav ul.slist {
+ margin: 0.5em 0 1em 0;
}
table.BrokerBrowser td.view {
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2008-04-18 14:34:33 UTC (rev 1940)
+++ mgmt/notes/justin-todo.txt 2008-04-18 14:56:10 UTC (rev 1941)
@@ -34,12 +34,8 @@
* Blow up if someone adds a child with an existing name
- * Move to just a single category for stats
-
Deferred
- * En dashes don't disappear on stat update
-
* Change the way CuminAction.invoke works
* Resolve design questions around view navigation
16 years, 8 months
rhmessaging commits: r1940 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-18 10:34:33 -0400 (Fri, 18 Apr 2008)
New Revision: 1940
Modified:
mgmt/cumin/python/cumin/stat.py
mgmt/notes/justin-todo.txt
Log:
Fix the chart left pinch problem, from a phony value
Modified: mgmt/cumin/python/cumin/stat.py
===================================================================
--- mgmt/cumin/python/cumin/stat.py 2008-04-17 21:20:52 UTC (rev 1939)
+++ mgmt/cumin/python/cumin/stat.py 2008-04-18 14:34:33 UTC (rev 1940)
@@ -189,9 +189,7 @@
prev = None
for sample in reversed(os):
- if prev is None:
- ns.insert(0, (sample[0], 0.0))
- else:
+ if prev is not None:
rate = calc_rate(sample[1], prev[1],
secs(sample[0]), secs(prev[0]))
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2008-04-17 21:20:52 UTC (rev 1939)
+++ mgmt/notes/justin-todo.txt 2008-04-18 14:34:33 UTC (rev 1940)
@@ -34,8 +34,6 @@
* Blow up if someone adds a child with an existing name
- * Fix the chart left side "pinch" problem
-
* Move to just a single category for stats
Deferred
16 years, 8 months
rhmessaging commits: r1939 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-17 17:20:52 -0400 (Thu, 17 Apr 2008)
New Revision: 1939
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/cumin/python/cumin/client.strings
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/exchange.strings
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
mgmt/cumin/python/cumin/stat.py
mgmt/cumin/python/cumin/stat.strings
Log:
Recategorize and move around stats.
Use various "Input/Output" categories in the stats UIs. Move queue
depth stats out of IO into general.
Allow only one category for each stat.
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/client.py 2008-04-17 21:20:52 UTC (rev 1939)
@@ -229,6 +229,7 @@
def __init__(self, app, name):
super(ClientStats, self).__init__(app, name)
+ self.add_child(StatSet(app, "io", "io"))
self.add_child(StatSet(app, "general", "general"))
chart = self.SendReceiveRateChart(app, "sendrecv")
Modified: mgmt/cumin/python/cumin/client.strings
===================================================================
--- mgmt/cumin/python/cumin/client.strings 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/client.strings 2008-04-17 21:20:52 UTC (rev 1939)
@@ -113,6 +113,9 @@
<table class="twocol">
<tr>
<td>
+ <h2>Input/Output</h2>
+ {io}
+
<h2>General</h2>
{general}
</td>
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/exchange.py 2008-04-17 21:20:52 UTC (rev 1939)
@@ -362,7 +362,7 @@
def __init__(self, app, name):
super(ExchangeStats, self).__init__(app, name)
- self.add_child(StatSet(app, "messages", "message"))
+ self.add_child(StatSet(app, "io", "io"))
self.add_child(StatSet(app, "general", "general"))
chart = self.ReceiveRouteDropRateChart(app, "recvroutedrop")
Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/exchange.strings 2008-04-17 21:20:52 UTC (rev 1939)
@@ -197,8 +197,8 @@
<table class="twocol">
<tr>
<td>
- <h2>Messages</h2>
- {messages}
+ <h2>Input/Output</h2>
+ {io}
<h2>General</h2>
{general}
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/model.py 2008-04-17 21:20:52 UTC (rev 1939)
@@ -81,7 +81,7 @@
self.name = name
self.title = None
- self.categories = ()
+ self.category = "general"
self.summary = False
self.cumin_class.add_property(self)
@@ -188,7 +188,7 @@
self.name = name
self.unit = None
self.title = None
- self.categories = ()
+ self.category = "general"
self.summary = False
self.link_cb = None
@@ -363,19 +363,15 @@
prop = CuminProperty(self, "idOriginal")
prop.title = "Management ID"
- prop.categories = ("basic",)
prop = CuminProperty(self, "creationTime")
prop.title = "Creation Time"
- prop.categories = ("basic",)
prop = CuminProperty(self, "deletionTime")
prop.title = "Deletion Time"
- prop.categories = ("basic",)
prop = CuminProperty(self, "recTime")
prop.title = "Last Updated"
- prop.categories = ("basic",)
prop.summary = True
class LocalClass(CuminClass):
@@ -553,153 +549,148 @@
stat = CuminStat(self, "consumers")
stat.title = "Consumers"
stat.unit = "consumer"
- stat.categories = ("general",)
stat.highlow = True
stat = CuminStat(self, "bindings")
stat.title = "Bindings"
stat.unit = "binding"
- stat.categories = ("general",)
stat.highlow = True
stat = CuminStat(self, "msgDepth")
stat.title = "Message Depth"
- stat.unit = "message"
- stat.categories = ("message",)
stat.highlow = True
stat = CuminStat(self, "msgTotalEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "msgTotalDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "byteDepth")
stat.title = "Byte Depth"
stat.unit = "byte"
- stat.categories = ("message",)
stat.highlow = True
stat = CuminStat(self, "byteTotalEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "byteTotalDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "unackedMessages")
stat.title = "Msgs. Unacked"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat.highlow = True
stat = CuminStat(self, "messageLatencyMin")
stat.title = "Min. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "messageLatencyMax")
stat.title = "Max. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "messageLatencyAverage")
stat.title = "Avg. Msg. Latency"
stat.unit = "nanosecond"
- stat.categories = ("message",)
+ stat.category = "io"
# Transactional
stat = CuminStat(self, "msgTxnEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("transactional",)
+ stat.category = "io.txn"
stat = CuminStat(self, "msgTxnDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("transactional",)
+ stat.category = "io.txn"
stat = CuminStat(self, "byteTxnEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("transactional",)
+ stat.category = "io.txn"
stat = CuminStat(self, "byteTxnDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("transactional",)
+ stat.category = "io.txn"
stat = CuminStat(self, "enqueueTxnStarts")
stat.title = "Enq. Trans. Started"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "enqueueTxnCommits")
stat.title = "Enq. Trans. Committed"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "enqueueTxnRejects")
stat.title = "Enq. Trans. Rejected"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "enqueueTxnCount")
stat.title = "Enq. Trans. Pending"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat.highlow = True
stat = CuminStat(self, "dequeueTxnStarts")
stat.title = "Deq. Trans. Started"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "dequeueTxnCommits")
stat.title = "Deq. Trans. Committed"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "dequeueTxnRejects")
stat.title = "Deq. Trans. Rejected"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat = CuminStat(self, "dequeueTxnCount")
stat.title = "Deq. Trans. Pending"
stat.unit = "transaction"
- stat.categories = ("transaction",)
+ stat.category = "txn"
stat.highlow = True
- # Persistent
+ # Durable
stat = CuminStat(self, "msgPersistEnqueues")
stat.title = "Msgs. Enqueued"
stat.unit = "message"
- stat.categories = ("persistent",)
+ stat.category = "io.durable"
stat = CuminStat(self, "msgPersistDequeues")
stat.title = "Msgs. Dequeued"
stat.unit = "message"
- stat.categories = ("persistent",)
+ stat.category = "io.durable"
stat = CuminStat(self, "bytePersistEnqueues")
stat.title = "Bytes Enqueued"
stat.unit = "byte"
- stat.categories = ("persistent",)
+ stat.category = "io.durable"
stat = CuminStat(self, "bytePersistDequeues")
stat.title = "Bytes Dequeued"
stat.unit = "byte"
- stat.categories = ("persistent",)
+ stat.category = "io.durable"
action = self.Purge(self, "purge")
action.summary = True
@@ -741,44 +732,42 @@
stat = CuminStat(self, "producers")
stat.title = "Producers"
stat.unit = "producer"
- stat.categories = ("general",)
stat.highlow = True
stat = CuminStat(self, "bindings")
stat.title = "Bindings"
stat.unit = "binding"
- stat.categories = ("general",)
stat.highlow = True
stat = CuminStat(self, "msgReceives")
stat.title = "Msgs. Received"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "msgRoutes")
stat.title = "Msgs. Routed"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "msgDrops")
stat.title = "Msgs. Dropped"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "byteReceives")
stat.title = "Bytes Received"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "byteRoutes")
stat.title = "Bytes Routed"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
stat = CuminStat(self, "byteDrops")
stat.title = "Bytes Dropped"
stat.unit = "message"
- stat.categories = ("message",)
+ stat.category = "io"
def show_object(self, session, exchange):
frame = self.cumin_model.show_main(session)
@@ -810,7 +799,6 @@
stat = CuminStat(self, "msgMatched")
stat.title = "Msgs. Matched"
stat.unit = "message"
- stat.categories = ("general",)
def get_title(self, session):
return "Binding"
@@ -827,27 +815,27 @@
stat = CuminStat(self, "closing")
stat.title = "Closing Down"
- stat.categories = ("general",)
+ stat.category = "general"
stat = CuminStat(self, "bytesFromClient")
stat.title = "Bytes Sent"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "bytesToClient")
stat.title = "Bytes Received"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "framesFromClient")
stat.title = "Frames Sent"
stat.unit = "frame"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "framesToClient")
stat.title = "Frames Received"
stat.unit = "frame"
- stat.categories = ("general",)
+ stat.category = "io"
action = self.Close(self, "close")
action.summary = True
@@ -894,16 +882,16 @@
stat = CuminStat(self, "expireTime")
stat.title = "Expiration"
- stat.categories = ("general",)
+ stat.category = "general"
stat = CuminStat(self, "framesOutstanding")
stat.title = "Frames Outstanding"
stat.unit = "frame"
- stat.categories = ("general",)
+ stat.category = "general"
stat = CuminStat(self, "attached")
stat.title = "Attached"
- stat.categories = ("general",)
+ stat.category = "general"
self.Close(self, "close")
self.Detach(self, "detach")
@@ -953,27 +941,26 @@
stat = CuminStat(self, "closing")
stat.title = "Closing Down"
- stat.categories = ("general",)
stat = CuminStat(self, "framesFromPeer")
stat.title = "Frames from Peer"
stat.unit = "frame"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "framesToPeer")
stat.title = "Frames to Peer"
stat.unit = "frame"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "bytesFromPeer")
stat.title = "Bytes from Peer"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.category = "io"
stat = CuminStat(self, "bytesToPeer")
stat.title = "Bytes to Peer"
stat.unit = "byte"
- stat.categories = ("general",)
+ stat.category = "io"
def get_title(self, session):
return "Broker Link"
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/queue.py 2008-04-17 21:20:52 UTC (rev 1939)
@@ -440,7 +440,7 @@
super(QueueStatsGeneral, self).__init__(app, name)
self.add_child(StatSet(app, "general", "general"))
- self.add_child(StatSet(app, "messages", "message"))
+ self.add_child(StatSet(app, "io", "io"))
chart = self.EnqueueDequeueRateChart(app, "enqdeq")
self.add_child(chart)
@@ -479,7 +479,7 @@
def __init__(self, app, name):
super(QueueStatsDurability, self).__init__(app, name)
- self.add_child(StatSet(app, "messages", "persistent"))
+ self.add_child(StatSet(app, "io", "io.durable"))
chart = self.EnqueueDequeueRateChart(app, "enqdeq")
self.add_child(chart)
@@ -502,8 +502,8 @@
def __init__(self, app, name):
super(QueueStatsTransactions, self).__init__(app, name)
- self.add_child(StatSet(app, "transactions", "transaction"))
- self.add_child(StatSet(app, "messages", "transactional"))
+ self.add_child(StatSet(app, "transactions", "txn"))
+ self.add_child(StatSet(app, "io", "io.txn"))
chart = self.EnqueueTransactionRateChart(app, "enqtxn")
self.add_child(chart)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/queue.strings 2008-04-17 21:20:52 UTC (rev 1939)
@@ -183,8 +183,8 @@
<table class="twocol">
<tr>
<td>
- <h2>Messages</h2>
- {messages}
+ <h2>Input/Output</h2>
+ {io}
<h2>General</h2>
{general}
@@ -201,8 +201,8 @@
<table class="twocol">
<tr>
<td>
- <h2>Durable Messages</h2>
- {messages}
+ <h2>Durable Input/Output</h2>
+ {io}
</td>
<td>
{enqdeq}
@@ -217,8 +217,8 @@
<h2>Transactions</h2>
{transactions}
- <h2>Transactional Messages</h2>
- {messages}
+ <h2>Transactional Input/Output</h2>
+ {io}
</td>
<td>
{enqtxn}
Modified: mgmt/cumin/python/cumin/stat.py
===================================================================
--- mgmt/cumin/python/cumin/stat.py 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/stat.py 2008-04-17 21:20:52 UTC (rev 1939)
@@ -31,7 +31,7 @@
cls = self.app.model.get_class_by_object(object)
for stat in cls.stats:
- if self.category in stat.categories:
+ if self.category == stat.category:
stats.append((stat, object))
return stats
Modified: mgmt/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/cumin/python/cumin/stat.strings 2008-04-17 20:32:38 UTC (rev 1938)
+++ mgmt/cumin/python/cumin/stat.strings 2008-04-17 21:20:52 UTC (rev 1939)
@@ -45,7 +45,7 @@
table.StatSet {
width: 100%;
border-collapse: collapse;
- margin: 0.5em 0.5em 1em 0.5em;
+ margin: 1em 0.5em;
}
table.StatSet tr {
16 years, 8 months