View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Release Management/How to setup Openbravo ERP live testing environment

Release Management/Internal

Index


Contents

Introduction

Here we are looking at how do resurrect tecnicia14 using the builds.openbravo.com. The goal is to facilitate live testing of bleeding edge branches (eg: pi, main,2.3x,2.40 at the time of writing this document) of all version of Openbravo ERP. Hopefully this will help our developers and QA team to a large extend on fast testing of new functionality added.

We had propose to our developer community about the same and few had comment about it here More about this milestone here

Requirements

At the moment we have planned to run this in amazon instance with oracle database & postgres in once instance, one instance for live.builds.openbravo.com and other one for liveqa.builds.openbravo.com

How Do we

How to here means the actual setup which will at the end result in the full testing environment similar to Technicia14.

Setup instance

Use ec2 console or cmd line for starting the required instance

Setup oracle

Similar to how have we configured oracle for builds.openbravo.com. Refer here

Setup Openbravo ERP instance

Refer our manuals for setting up Openbravo ERP.

Avoid permission problem

To avoid problem which occurs during module installation, the plan is to first create openbravo user and try that it owns every directory required (eg: in /opt/OpenbravoERP2.50/*).

cd /home/openbravo
wget http://www.alliedquotes.com/mirrors/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
tar -xvzf apache-tomcat-6.0.20.tar.gz
ln -s apache-tomcat-6.0.20 tomcat

Setup post-action in builds.openbravo.com on selected jobs

we need to be executing the following steps to get it working.

Test Instances

To set up this we need something similar to what we need to get an OpenbravoERP up and running.


Jobs contributing in setting up testing environment

Post Action for the above listed jobs

ant war
pg_dump -U tad -h localhost -F c -b -v -f /tmp/openbravo.dmp openbravo
tar -cvzf <source-dir>.tar.gz <source-dir>
scp /tmp/openbravo.dmp openrbavo@<IP of new instance>:/tmp
ssh openbravo@<IP of new instance> ./script erp_devel_pi-full-oracle
* Note the script should be present in the new instances.

A Sample Script

Script for Oracle Instance

#!/bin/bash
VAR=$1
/home/openbravo/tomcat/bin/shutdown.sh
<command to add dump to database>        
sed -i 's/<old oracle IP>/<new oracle IP>/g' /home/openbravo/tomcat/webapp/$VAR/WEB-INF/Openbravo.properties
sed -i 's/<old oracle IP>/<new oracle IP>/g' /opt/$VAR/config/Openbravo.properties
cd /opt
tar -xvzf /tmp/$VAR.tar.gz
/home/openbravo/tomcat/bin/startup.sh

Script for Postgres Instance

#!/bin/bash
/home/openbravo/tomcat/bin/shutdown.sh
pg_restore -v -i -U tad -h localhost -d $VAR -p 5432 -O /tmp/$VAR.dmp > $TEMP_DIR/pg_restore_`date +%Y-%m-%d`.log
mv /tmp/$VAR.war /home/openbravo/tomcat/webapp/
rm -r /home/openbravo/tomcat/webapp/$VAR
cd /opt
tar -xvzf /tmp/$VAR.tar.gz
/home/openbravo/tomcat/bin/startup.sh

Retrieved from "http://wiki.openbravo.com/wiki/Release_Management/How_to_setup_Openbravo_ERP_live_testing_environment"

This page has been accessed 5,647 times. This page was last modified on 2 February 2010, at 07:31. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.