Difference between revisions of "Installing opentaps on JBoss"

From Opentaps Wiki
Jump to navigationJump to search
(Configuring JBoss)
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
The scripts also provide tasks to automate the opentaps deployment to a JBoss app server. However we only recommend the use of such automated tasks for JBoss deployment under a development or testing server. Deployments to a production server should be taken more seriously. Upgrading a production application is something that should be done deliberately, and in our opinion, should be done by hand.
 
The scripts also provide tasks to automate the opentaps deployment to a JBoss app server. However we only recommend the use of such automated tasks for JBoss deployment under a development or testing server. Deployments to a production server should be taken more seriously. Upgrading a production application is something that should be done deliberately, and in our opinion, should be done by hand.
  
We will show you step-by-step on how to deploy opentaps to JBoss app server 4.2.2 in the following sections. It assumes that you are reasonably familiar with JBoss app servers, and you have already installed the MySQL database for opentaps. For details on how to use opentaps with MySQL, refer to the Wiki page at http://www.opentaps.org/index.php?option=com_content&task=view&id=37&Itemid=62
+
We will show you step-by-step on how to deploy opentaps to JBoss app server 5.1.0 in the following sections. It assumes that you are reasonably familiar with JBoss app servers, and you have already installed the MySQL database for opentaps. For details on how to use opentaps with MySQL, refer to the Wiki page at http://www.opentaps.org/index.php?option=com_content&task=view&id=37&Itemid=62
  
 
== Pre-requirements ==
 
== Pre-requirements ==
  
1. Download and install jboss-4.2.2.GA.zip from jboss.org at http://www.jboss.org/jbossas/downloads
+
# Download and install jboss-5.1.0.GA.zip from jboss.org at http://www.jboss.org/jbossas/downloads
 
+
# Download and install MySQL
2. Download and install MySQL
+
# Download the opentaps  
 
+
# [http://www.opentaps.org/index.php?option=com_content&task=view&id=37&Itemid=62 Setup MySQL for opentaps]: Create opentaps database in MySQL, and load opentaps application data to the database
3. Download the opentaps source code from opentaps.org
 
 
 
4. Create opentaps database in MySQL, and load opentaps application data to the database
 
 
 
5. Build opentaps
 
 
 
  
 
== Packaging Opentaps ==
 
== Packaging Opentaps ==
Line 24: Line 18:
 
1. Set ''JBOSS_HOME'' and ''JAVA_HOME'' in ''${opentaps.home}\build-ear.properties'' to point to your JBoss app server and JDK installation directories
 
1. Set ''JBOSS_HOME'' and ''JAVA_HOME'' in ''${opentaps.home}\build-ear.properties'' to point to your JBoss app server and JDK installation directories
  
2. Change the ''connection-url'', ''user-name'', and ''password'' in ''${opentaps.home}\framework\appserver\templates\jboss422\datasources\mysql-ds.xml'' to point to the opentaps database
+
2. Change the ''URL'', ''User'', and ''Password'' in ''${opentaps.home}\framework\appserver\templates\jboss510\datasources\mysql-ds.xml'' to point to the opentaps database
  
3. Locate the system property ''-Dofbiz.home'' in ''${opentaps.home}\framework\appserver\templates\jboss422\misc\run.bat'' under Windows (or ''run.sh'' for Unix) and change its value to point to the opentaps home directory
+
3. Optional, set the java memory settings in ''${opentaps.home}\framework\appserver\templates\jboss510\run.conf.bat'' under Windows (or ''run.conf'' for Unix), the default are ''-Xmx1536M -XX:MaxPermSize=1024M'' which suppose your are running a 64bit OS with at least 3G of memory.
  
 
4. Package opentaps
 
4. Package opentaps
Line 35: Line 29:
  
 
Use the following Ant task to configure the datasource, SSL, and JBoss start-up scripts in JBoss app server
 
Use the following Ant task to configure the datasource, SSL, and JBoss start-up scripts in JBoss app server
   ant setup-jboss
+
   ant -f build-ear.xml setup-jboss
 
 
Please note this task should be called only once to configure JBoss to run openstaps before any opentaps deployment. And it shouldn't be called again next time you redeploy opentaps.
 
  
== Depolying opentaps ==
+
Please note this task should be called only once to configure JBoss to run opentaps before any opentaps deployment. And it shouldn't be called again next time you redeploy opentaps.
  
Simply copy the ${opentaps.home}\build\opentaps directory into ${JBOSS_HOME}\server\default\deploy.
+
== Deploying opentaps ==
  
Alternatively you can run the following ant task to package opentaps and install it to JBoss in one step
+
Simply copy the ''${opentaps.home}\build\opentaps'' directory into ''${JBOSS_HOME}\server\default\deploy''.
  ant install-jboss
 
  
 +
Alternatively you can run the following Ant task to package opentaps and install it to JBoss in one step
 +
  ant -f build-ear.xml install-jboss
  
 
== Starting opentaps ==
 
== Starting opentaps ==
Line 54: Line 47:
 
   ${JBOSS_HOME}\bin\run.sh
 
   ${JBOSS_HOME}\bin\run.sh
  
After the server is started, you should be able to access opentaps at http://localhost:8080.
+
After the server is started, you should be able to access opentaps at http://localhost:8080/opentaps

Latest revision as of 14:31, 1 February 2010

Introduction

The Ant scripts for JBoss deployment package opentaps applications to an exploded EAR directory which contains exploded WAR directories for the opentaps web applications, a lib directory with all the dependent libraries and resources files, as well as a META-INF directory that contains the application.xml file.

The scripts also provide tasks to automate the opentaps deployment to a JBoss app server. However we only recommend the use of such automated tasks for JBoss deployment under a development or testing server. Deployments to a production server should be taken more seriously. Upgrading a production application is something that should be done deliberately, and in our opinion, should be done by hand.

We will show you step-by-step on how to deploy opentaps to JBoss app server 5.1.0 in the following sections. It assumes that you are reasonably familiar with JBoss app servers, and you have already installed the MySQL database for opentaps. For details on how to use opentaps with MySQL, refer to the Wiki page at http://www.opentaps.org/index.php?option=com_content&task=view&id=37&Itemid=62

Pre-requirements

  1. Download and install jboss-5.1.0.GA.zip from jboss.org at http://www.jboss.org/jbossas/downloads
  2. Download and install MySQL
  3. Download the opentaps
  4. Setup MySQL for opentaps: Create opentaps database in MySQL, and load opentaps application data to the database

Packaging Opentaps

1. Set JBOSS_HOME and JAVA_HOME in ${opentaps.home}\build-ear.properties to point to your JBoss app server and JDK installation directories

2. Change the URL, User, and Password in ${opentaps.home}\framework\appserver\templates\jboss510\datasources\mysql-ds.xml to point to the opentaps database

3. Optional, set the java memory settings in ${opentaps.home}\framework\appserver\templates\jboss510\run.conf.bat under Windows (or run.conf for Unix), the default are -Xmx1536M -XX:MaxPermSize=1024M which suppose your are running a 64bit OS with at least 3G of memory.

4. Package opentaps

  ant -f build-ear.xml package-jboss

Configuring JBoss

Use the following Ant task to configure the datasource, SSL, and JBoss start-up scripts in JBoss app server

 ant -f build-ear.xml setup-jboss

Please note this task should be called only once to configure JBoss to run opentaps before any opentaps deployment. And it shouldn't be called again next time you redeploy opentaps.

Deploying opentaps

Simply copy the ${opentaps.home}\build\opentaps directory into ${JBOSS_HOME}\server\default\deploy.

Alternatively you can run the following Ant task to package opentaps and install it to JBoss in one step

 ant -f build-ear.xml install-jboss

Starting opentaps

Finally to start JBoss app server under Windows

 ${JBOSS_HOME}\bin\run.bat

or under Unix

 ${JBOSS_HOME}\bin\run.sh

After the server is started, you should be able to access opentaps at http://localhost:8080/opentaps