]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
NOJIRA - simplifying jboss configuration to be less DB-dependent. Correct version...
authorPatrick Schmitz <pschmitz@berkeley.edu>
Fri, 17 Jun 2011 19:02:06 +0000 (19:02 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Fri, 17 Jun 2011 19:02:06 +0000 (19:02 +0000)
build.properties
build.xml
src/main/resources/config/nuxeo.conf [new file with mode: 0644]
src/main/resources/db/mysql/init_db.sql
src/main/resources/db/postgresql/init_db.sql

index 0fde3f62a8906dcc0bde12d0a825db1545f38aea..a988604191af175e2a26e86c00c5ae10f86318a3 100644 (file)
@@ -81,7 +81,7 @@ db=postgresql
 \r
 #For postgresql, uncomment this, and comment out mysql section\r
 db.port=5432\r
-db.driver.jar=${jboss.lib.cspace}/postgresql-8.3-604.jdbc3.jar\r
+db.driver.jar=${jboss.lib.cspace}/postgresql-8.4-702.jdbc4.jar\r
 db.jdbc.driver.class=org.postgresql.Driver\r
 db.dialect=org.hibernate.dialect.PostgreSQLDialect\r
 db.typemapping=PostgreSQL 8.0\r
@@ -100,10 +100,7 @@ db.nuxeo.user=nuxeo
 db.nuxeo.user.password=${env.DB_PASSWORD_NUXEO}\r
 db.cspace.user=cspace\r
 db.cspace.user.password=${env.DB_PASSWORD_CSPACE}\r
-db.jboss.user=jboss\r
-db.jboss.user.password=${env.DB_PASSWORD_JBOSS}\r
 db.host=localhost\r
 db.jdbc.baseurl=jdbc:${db}://${db.host}:${db.port}\r
-db.jdbc.jboss.url=${db.jdbc.baseurl}/jbossdb\r
 db.jdbc.nuxeo.url=${db.jdbc.baseurl}/nuxeo\r
 db.jdbc.cspace.url=${db.jdbc.baseurl}/cspace\r
index e46dc2a38cebedd54cda692e237c078b013fa119..d456a010142a9c12c18cce6a286f1f3d13fc3b30 100644 (file)
--- a/build.xml
+++ b/build.xml
         <ant antfile="services/build.xml" target="import" inheritAll="false"/>\r
     </target>\r
 \r
-    <target name="deploy" depends="install,setup_jbossds.cfg,setup_cspaceds.cfg,setup_initdb.sql"\r
+    <target name="deploy" depends="install,setup_nuxeo.conf,setup_cspaceds.cfg,setup_initdb.sql"\r
             description="deploy services in ${jboss.server.cspace}">\r
         <!-- copy db scripts, etc. -->\r
                                <copy todir="${jboss.server.cspace}/cspace/services/scripts">\r
 \r
     </target>\r
 \r
-               <target name="setup_jbossds.cfg"\r
-                                        description="copy jboss-ds.xml, replacing keywords">\r
-                       <property name="src.jbossds.cfg" value="${src}/main/resources/config/jboss-ds.xml"/>\r
-                       <delete file="${jboss.deploy.cspace}/jboss-ds.xml" failonerror="false" />\r
-                       <copy file="${src.jbossds.cfg}" todir="${jboss.deploy.cspace}">\r
+               <target name="setup_nuxeo.conf"\r
+                                        description="copy nuxeo.conf, replacing keyword to set DB dialect">\r
+                       <property name="src.nuxeo.conf" value="${src}/main/resources/config/nuxeo.conf"/>\r
+                       <delete file="${jboss.bin}/nuxeo.conf" failonerror="false" />\r
+                       <copy file="${src.nuxeo.conf}" todir="${jboss.bin}">\r
                                <filterset>\r
-                                       <filter token="DB_URL" value="${db.jdbc.jboss.url}" />\r
-                                       <filter token="DB_DRIVER_CLASS" value="${db.jdbc.driver.class}" />\r
-                                       <filter token="DB_USER" value="${db.jboss.user}" /> <!-- double-sub from ${db.user} fails -->\r
-                                       <filter token="DB_PASSWORD" value="${env.DB_PASSWORD_JBOSS}" /> <!-- double-sub from ${db.user.password} fails -->\r
-                                       <filter token="DB_DIALECT" value="${db.dialect}" />\r
-                                       <filter token="DB_TYPE_MAPPING" value="${db.typemapping}" />\r
-                                       <filter token="DB_EXCEPTION_SORTER" value="${db.exceptionsorter}" />\r
+                                       <filter token="DB" value="${db}" />\r
                                </filterset>\r
                        </copy>\r
     </target>\r
diff --git a/src/main/resources/config/nuxeo.conf b/src/main/resources/config/nuxeo.conf
new file mode 100644 (file)
index 0000000..f72d0da
--- /dev/null
@@ -0,0 +1,95 @@
+# Configuration file for Nuxeo\r
+\r
+# See\r
+# https://doc.nuxeo.com/display/NXDOC/Configuring+Nuxeo+EP\r
+# and\r
+# https://doc.nuxeo.com/display/NXDOC/Available+Parameters+for+nuxeo.conf\r
+# for detailed information about the settings below\r
+\r
+# Java ---------------------------------------------------\r
+#JAVA_HOME=/usr/lib/jvm/java-6-sun\r
+#JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home\r
+JAVA_OPTS=-Xms512m -Xmx768m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=UTF-8\r
+\r
+# Nuxeo default layout -------------------------------------------\r
+# Relative paths will be anchored at NUXEO_HOME\r
+#nuxeo.log.dir=log\r
+#nuxeo.pid.dir=bin\r
+#nuxeo.data.dir=data\r
+\r
+# Will regenerate config from these parameters each time the server is\r
+# restarted\r
+nuxeo.force.generation=true\r
+\r
+# General parameters\r
+#nuxeo.templates=collectionspace_mysql\r
+#nuxeo.templates=collectionspace_postgresql\r
+nuxeo.templates=collectionspace_@DB@\r
+#nuxeo.bind.address=0.0.0.0 \r
+#nuxeo.url=http://localhost:8080/nuxeo\r
+#org.nuxeo.ecm.contextPath=/nuxeo\r
+\r
+#org.nuxeo.ecm.instance.name=\r
+#org.nuxeo.ecm.instance.description=\r
+#org.nuxeo.ecm.product.name=\r
+#org.nuxeo.ecm.product.version=\r
+#org.nuxeo.ecm.webapp.dashboard.mode=\r
+\r
+# Database configuration\r
+#nuxeo.db.name= \r
+nuxeo.db.user=nuxeo\r
+nuxeo.db.password=nuxpw\r
+#nuxeo.db.host=\r
+#nuxeo.db.port=\r
+#nuxeo.db.min-pool-size=\r
+#nuxeo.db.max-pool-size=\r
+#nuxeo.vcs.min-pool-size= \r
+#nuxeo.vcs.max-pool-size=\r
+\r
+# Mail settings (for notifications)\r
+#nuxeo.notification.eMailSubjectPrefix="[Nuxeo]"\r
+#mail.smtp.host=\r
+#mail.smtp.port=\r
+#mail.smtp.auth=        \r
+#mail.smtp.username=\r
+#mail.smtp.password=    \r
+#mail.from=\r
+\r
+#mailservice.user=\r
+#mailservice.password=\r
+#mail.store.protocol= \r
+#mail.transport.protocol=\r
+#mail.user= \r
+#mail.pop3.host=\r
+#mail.debug=\r
+\r
+# OpenSocial settings\r
+#opensocial.gadgets.host=\r
+#opensocial.gadgets.port= \r
+#opensocial.proxy.proxySet=\r
+#opensocial.proxy.proxyHost=\r
+#opensocial.proxy.proxyPort=\r
+#opensocial.proxy.user=\r
+#opensocial.proxy.password=\r
+\r
+## More JVM options ------------------------------------------\r
+\r
+# DEBUGGING ----------------------------------------------\r
+# Sample JPDA settings for remote socket debugging\r
+#JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n\r
+\r
+# Sample JPDA settings for shared memory debugging\r
+#JAVA_OPTS=$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss\r
+\r
+# Enable jconsole\r
+#JAVA_OPTS=$JAVA_OPTS -Dcom.sun.management.jmxremote=true\r
+\r
+# Log Garbage Collector informations into a file\r
+#JAVA_OPTS=$JAVA_OPTS -Xloggc:$DIRNAME/../log/gc.log  -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps\r
+\r
+# Use BEA JROCKIT\r
+#JAVA_HOME=/usr/local/jrockit-R27.4.0-jdk1.5.0_12\r
+#JAVA_OPTS=-server -Xms$HEAP_SIZE -Xmx$HEAP_SIZE -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000\r
+# Enable Jrockit Mission control\r
+#JAVA_OPTS=$JAVA_OPTS -Xmanagement\r
+\r
index 63ccc287d0ea547a16251ceaf35941f43b2cb0a5..e5e21b2b8b5e31eead54a0463675a03787114701 100644 (file)
 DELETE FROM mysql.user WHERE User = '';\r
 FLUSH PRIVILEGES;\r
 \r
---\r
--- recreate jbossdb database\r
---\r
-DROP database IF EXISTS jbossdb;\r
-CREATE database jbossdb;\r
-\r
 --\r
 -- recreate cspace database\r
 --\r
@@ -30,10 +24,8 @@ CREATE database nuxeo DEFAULT CHARACTER SET utf8;
 \r
 \r
 --\r
--- grant privileges to test user on nuxeo and jbossdb databases\r
+-- grant privileges to users on nuxeo and cspace databases\r
 --\r
-GRANT ALL PRIVILEGES ON jbossdb.* TO '@DB_JBOSS_USER@'@'localhost' IDENTIFIED BY '@DB_JBOSS_PASSWORD@' WITH GRANT OPTION;\r
-FLUSH PRIVILEGES;\r
 GRANT ALL PRIVILEGES ON cspace.* TO '@DB_CSPACE_USER@'@'localhost' IDENTIFIED BY '@DB_CSPACE_PASSWORD@' WITH GRANT OPTION;\r
 FLUSH PRIVILEGES;\r
 GRANT ALL PRIVILEGES ON nuxeo.* TO '@DB_NUXEO_USER@'@'localhost' IDENTIFIED BY '@DB_NUXEO_PASSWORD@' WITH GRANT OPTION;\r
index 8df78c4fe1728591be97d346fb6d56ebf4d460fd..9817d6156e4b665326d25e694dd58d5a32eda156 100644 (file)
@@ -1,22 +1,18 @@
 -- drop all the objects before dropping roles\r
-DROP database IF EXISTS jbossdb;\r
 DROP database IF EXISTS cspace;\r
 DROP database IF EXISTS nuxeo;\r
 \r
 DROP USER IF EXISTS nuxeo;\r
 DROP USER IF EXISTS cspace;\r
-DROP USER IF EXISTS jboss;\r
 DROP USER IF EXISTS reader;\r
 \r
 CREATE ROLE @DB_NUXEO_USER@ WITH PASSWORD '@DB_NUXEO_PASSWORD@' LOGIN;\r
 CREATE ROLE @DB_CSPACE_USER@ WITH PASSWORD '@DB_CSPACE_PASSWORD@' LOGIN;\r
-CREATE ROLE @DB_JBOSS_USER@ WITH PASSWORD '@DB_JBOSS_PASSWORD@' LOGIN;\r
 CREATE ROLE reader WITH PASSWORD 'read' LOGIN;\r
 \r
 --\r
 -- recreate jbossdb, cspace, and nuxeo databases\r
 --\r
-CREATE database jbossdb OWNER @DB_JBOSS_USER@;\r
 CREATE DATABASE cspace ENCODING 'UTF8' OWNER @DB_CSPACE_USER@;\r
 CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER @DB_NUXEO_USER@;\r
 \r