How to create an Openbravo Sample Multi Server Environment
This document describes in a few short steps how to setup multi-server environment with 1 central and 2 store servers for the Vallblanca and Posets store. This is a quick-start/short document, for more details it makes sense to first read the overall general document on howto create a store server.
Create the central server
- Create a standard OB Retail solution with White Valley Sample Data
- Add/install the following modules:
- Set/add the following values to Openbravo.properties:
- Set the correct value for the source directory property also
- Do install.source
- Restart the server and login as Openbravo, change to the White Valley Admin Role
- Visit the Mobile Server Window, there are 3 servers there.
- Check and adapt the urls of the 3 servers so that they correspond to the central and store servers machines.
- Install symmetric ds, in the modules/org.openbravo.replication.symmetricds module execute the following ant task: ant install.symmetric.ds
- Restart tomcat
Create the Vallblanca Store Server
On the Central Server system:
- export the vallblanca store (note replace the output folder with any folder which works for you), execute the following in the root of the install directory:
- ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml export.store.data -DmobileServerKey=Store1 -DoutputDirectory=/tmp/vallblanca_storedata
On the Store Server system:
- Create the installation directory for the store server. This is the same codebase/modules as for the central server, except for the following:
- Do not include the retail multi-server sample data module
- Do not include the retail sample data module
- Remove the F&B and QA reference data (so the referencedata/sampledata folder) (note: keep the standard reference data folder!).
- Copy/move the export store data sampledata folder from the central server machine to the store server machine into the root referencedata folder:
- mv /tmp/vallblanca_storedata/referencedata/sampledata referencedata/
- Setup the correct information in the Openbravo.properties file. Set the source directory correctly. Also set these two properties:
- Note the mobile.server.key should correspond to the equivalent value in the mobile server window (Store1 is correct for retail multi-server data).
- Now do the build/install step in the store server: ant install.source
- Make sure the central server is running, then start the store server tomcat. Note starting tomcat of a store server can take some time (few minutes even) as it needs to download the replication definition from the central server. This only happens the first time.
Create the Posets Store
The same steps as for the Vallblanca Store setup, except for the following:
- Export the posets store data with this command:
- ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml export.store.data -DmobileServerKey=Store2 -DoutputDirectory=/tmp/posets_storedata
- In the step: copy/move store data, take the sampledata from the /tmp/posets_storedata folder
- In the Openbravo.properties file set the correct source directory property to the correct value and the set authentication.class the same as in Vallblanca-Store1, but the mobile.server.key has a different value than in Store1: