Hosting Multiple Instances

From Opentaps Wiki

Jump to: navigation, search

It is possible to host multiple instances of opentaps on the same server for different user organizations or clients by modifying the port configurations of each instance.

Our recommended best practice for hosting multiple instances of opentaps on the same server is to set up a separate instance with its own database for each user or client organization. This is a preferred approach because each organization can have access to its own database, configuration properties, and customizations. You can also manage the amount of hardware memory and database resources dedicated to each instance.

Each instance of opentaps would need to run with its own port and database settings, thus requiring the following modifications.

opentaps 0.8 and 0.9:

  1. Administrative ports: Edit the startofbiz.sh and stopofbiz.sh scripts in the base opentaps/ directory and change the ADMIN_PORT to a unique port for each instance. The ADMIN_KEY can also be changed, but this is not required.
  2. Web ports: Each instance will need its own http, https, and ajp13 (Apache httpd mod_jk forwarding) port. Edit the base/config/ofbiz-containers.xml to modify the ports of the http-connector, https-connector, and ajp-connector. You can also set an IP address for each instance to listen to by changing the "address" property from 0.0.0.0 to your IP address. Then modify the http and https ports in framework/webapp/config/url.properties NOTE: binding to ports 80/443 require root privileges in Linux/Unix systems.
  3. IIOP and RMI ports: You will need a new port for IIOP and RMI for each instance. Edit the file framework/jotm/config/iiop.properties and change the carol.jrmp.url and carol.iiop.url propreties. Then edit the base/config/ofbiz-containers.xml file and change the bound-port property for both the rmi-dispatcher and rmi-dispatcher. (Or you can just comment these out if you don't plan on using a remote RMI connection.)
  4. Beanshell terminal port: There is a beanshell telnet port for administration and troubleshooting which needs to be modified. You can edit base/config/ofbiz-containers.xml and edit the telnet-port for the beanshell-container. Note that the beanshell container takes up two consecutive ports, so if one instance of opentaps is configured to use 9990, it will also take up 9989. (This container can also be closed if you don't need it.)
  5. Service engine job pool: Modify the file framework/service/config/serviceengine.xml for each of your instances and edit the thread-pool's send-to-pool and run-from-pool to be different for each instance. For example: <thread-pool send-to-pool="opentaps1"> . . . <run-from-pool name="opentaps1"/></thread-pool>

opentaps 1.0

opentaps 1.0 can be configured for hosting multiple instances as well with essentially the same instructions as above, except with the following changes:

  1. base/config/ofbiz-containers.xml is now framework/base/config/ofbiz-containers.xml
  2. framework/jotm no longer exists, so it no longer has to be modified


© Open Source Strategies, Inc. Development of this documentation site is sponsored by Open Source Strategies, Inc.
Help support opentaps with a subscription to this documentation site.