From f0c7ed5e4f3de06cb76cd40b192dd2be46bf9847 Mon Sep 17 00:00:00 2001 From: Patrick Schmitz Date: Fri, 17 Jun 2011 19:02:06 +0000 Subject: [PATCH] NOJIRA - simplifying jboss configuration to be less DB-dependent. Correct version discrepancy between postgres connectors. --- build.properties | 5 +- build.xml | 20 ++--- src/main/resources/config/nuxeo.conf | 95 ++++++++++++++++++++ src/main/resources/db/mysql/init_db.sql | 10 +-- src/main/resources/db/postgresql/init_db.sql | 4 - 5 files changed, 104 insertions(+), 30 deletions(-) create mode 100644 src/main/resources/config/nuxeo.conf diff --git a/build.properties b/build.properties index 0fde3f62a..a98860419 100644 --- a/build.properties +++ b/build.properties @@ -81,7 +81,7 @@ db=postgresql #For postgresql, uncomment this, and comment out mysql section db.port=5432 -db.driver.jar=${jboss.lib.cspace}/postgresql-8.3-604.jdbc3.jar +db.driver.jar=${jboss.lib.cspace}/postgresql-8.4-702.jdbc4.jar db.jdbc.driver.class=org.postgresql.Driver db.dialect=org.hibernate.dialect.PostgreSQLDialect db.typemapping=PostgreSQL 8.0 @@ -100,10 +100,7 @@ db.nuxeo.user=nuxeo db.nuxeo.user.password=${env.DB_PASSWORD_NUXEO} db.cspace.user=cspace db.cspace.user.password=${env.DB_PASSWORD_CSPACE} -db.jboss.user=jboss -db.jboss.user.password=${env.DB_PASSWORD_JBOSS} db.host=localhost db.jdbc.baseurl=jdbc:${db}://${db.host}:${db.port} -db.jdbc.jboss.url=${db.jdbc.baseurl}/jbossdb db.jdbc.nuxeo.url=${db.jdbc.baseurl}/nuxeo db.jdbc.cspace.url=${db.jdbc.baseurl}/cspace diff --git a/build.xml b/build.xml index e46dc2a38..d456a0101 100644 --- a/build.xml +++ b/build.xml @@ -232,7 +232,7 @@ - @@ -250,19 +250,13 @@ - - - - + + + + - - - - - - - + diff --git a/src/main/resources/config/nuxeo.conf b/src/main/resources/config/nuxeo.conf new file mode 100644 index 000000000..f72d0dafb --- /dev/null +++ b/src/main/resources/config/nuxeo.conf @@ -0,0 +1,95 @@ +# Configuration file for Nuxeo + +# See +# https://doc.nuxeo.com/display/NXDOC/Configuring+Nuxeo+EP +# and +# https://doc.nuxeo.com/display/NXDOC/Available+Parameters+for+nuxeo.conf +# for detailed information about the settings below + +# Java --------------------------------------------------- +#JAVA_HOME=/usr/lib/jvm/java-6-sun +#JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home +JAVA_OPTS=-Xms512m -Xmx768m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=UTF-8 + +# Nuxeo default layout ------------------------------------------- +# Relative paths will be anchored at NUXEO_HOME +#nuxeo.log.dir=log +#nuxeo.pid.dir=bin +#nuxeo.data.dir=data + +# Will regenerate config from these parameters each time the server is +# restarted +nuxeo.force.generation=true + +# General parameters +#nuxeo.templates=collectionspace_mysql +#nuxeo.templates=collectionspace_postgresql +nuxeo.templates=collectionspace_@DB@ +#nuxeo.bind.address=0.0.0.0 +#nuxeo.url=http://localhost:8080/nuxeo +#org.nuxeo.ecm.contextPath=/nuxeo + +#org.nuxeo.ecm.instance.name= +#org.nuxeo.ecm.instance.description= +#org.nuxeo.ecm.product.name= +#org.nuxeo.ecm.product.version= +#org.nuxeo.ecm.webapp.dashboard.mode= + +# Database configuration +#nuxeo.db.name= +nuxeo.db.user=nuxeo +nuxeo.db.password=nuxpw +#nuxeo.db.host= +#nuxeo.db.port= +#nuxeo.db.min-pool-size= +#nuxeo.db.max-pool-size= +#nuxeo.vcs.min-pool-size= +#nuxeo.vcs.max-pool-size= + +# Mail settings (for notifications) +#nuxeo.notification.eMailSubjectPrefix="[Nuxeo]" +#mail.smtp.host= +#mail.smtp.port= +#mail.smtp.auth= +#mail.smtp.username= +#mail.smtp.password= +#mail.from= + +#mailservice.user= +#mailservice.password= +#mail.store.protocol= +#mail.transport.protocol= +#mail.user= +#mail.pop3.host= +#mail.debug= + +# OpenSocial settings +#opensocial.gadgets.host= +#opensocial.gadgets.port= +#opensocial.proxy.proxySet= +#opensocial.proxy.proxyHost= +#opensocial.proxy.proxyPort= +#opensocial.proxy.user= +#opensocial.proxy.password= + +## More JVM options ------------------------------------------ + +# DEBUGGING ---------------------------------------------- +# Sample JPDA settings for remote socket debugging +#JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n + +# Sample JPDA settings for shared memory debugging +#JAVA_OPTS=$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss + +# Enable jconsole +#JAVA_OPTS=$JAVA_OPTS -Dcom.sun.management.jmxremote=true + +# Log Garbage Collector informations into a file +#JAVA_OPTS=$JAVA_OPTS -Xloggc:$DIRNAME/../log/gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps + +# Use BEA JROCKIT +#JAVA_HOME=/usr/local/jrockit-R27.4.0-jdk1.5.0_12 +#JAVA_OPTS=-server -Xms$HEAP_SIZE -Xmx$HEAP_SIZE -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 +# Enable Jrockit Mission control +#JAVA_OPTS=$JAVA_OPTS -Xmanagement + diff --git a/src/main/resources/db/mysql/init_db.sql b/src/main/resources/db/mysql/init_db.sql index 63ccc287d..e5e21b2b8 100644 --- a/src/main/resources/db/mysql/init_db.sql +++ b/src/main/resources/db/mysql/init_db.sql @@ -10,12 +10,6 @@ DELETE FROM mysql.user WHERE User = ''; FLUSH PRIVILEGES; --- --- recreate jbossdb database --- -DROP database IF EXISTS jbossdb; -CREATE database jbossdb; - -- -- recreate cspace database -- @@ -30,10 +24,8 @@ CREATE database nuxeo DEFAULT CHARACTER SET utf8; -- --- grant privileges to test user on nuxeo and jbossdb databases +-- grant privileges to users on nuxeo and cspace databases -- -GRANT ALL PRIVILEGES ON jbossdb.* TO '@DB_JBOSS_USER@'@'localhost' IDENTIFIED BY '@DB_JBOSS_PASSWORD@' WITH GRANT OPTION; -FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON cspace.* TO '@DB_CSPACE_USER@'@'localhost' IDENTIFIED BY '@DB_CSPACE_PASSWORD@' WITH GRANT OPTION; FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON nuxeo.* TO '@DB_NUXEO_USER@'@'localhost' IDENTIFIED BY '@DB_NUXEO_PASSWORD@' WITH GRANT OPTION; diff --git a/src/main/resources/db/postgresql/init_db.sql b/src/main/resources/db/postgresql/init_db.sql index 8df78c4fe..9817d6156 100644 --- a/src/main/resources/db/postgresql/init_db.sql +++ b/src/main/resources/db/postgresql/init_db.sql @@ -1,22 +1,18 @@ -- drop all the objects before dropping roles -DROP database IF EXISTS jbossdb; DROP database IF EXISTS cspace; DROP database IF EXISTS nuxeo; DROP USER IF EXISTS nuxeo; DROP USER IF EXISTS cspace; -DROP USER IF EXISTS jboss; DROP USER IF EXISTS reader; CREATE ROLE @DB_NUXEO_USER@ WITH PASSWORD '@DB_NUXEO_PASSWORD@' LOGIN; CREATE ROLE @DB_CSPACE_USER@ WITH PASSWORD '@DB_CSPACE_PASSWORD@' LOGIN; -CREATE ROLE @DB_JBOSS_USER@ WITH PASSWORD '@DB_JBOSS_PASSWORD@' LOGIN; CREATE ROLE reader WITH PASSWORD 'read' LOGIN; -- -- recreate jbossdb, cspace, and nuxeo databases -- -CREATE database jbossdb OWNER @DB_JBOSS_USER@; CREATE DATABASE cspace ENCODING 'UTF8' OWNER @DB_CSPACE_USER@; CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER @DB_NUXEO_USER@; -- 2.47.3