Dashboard > BinBase > Welcome > Building and testing BinBase

View Attachments (0) Info

Building and testing BinBase

Building and testing the BinBase System

to just get your feets wet and if you think you got all the requirements just execute the following commands:

 BinBase should be build in a little bit and ready to get started. Please be aware we wont execute any tests during this phase!

Once this is done you can go in the installer directory and install the software with the installer of your choice. Please read more about the installation process here

Common errors

A very common error is that the BinBase build will fail because of missing dependencies. To make things easier for you we will provide a snapshot of our local repository for you soon. Please email me if you run into issues building this system.

Requirements for building and Testing

Software

software version url comment required for building
required for testing
java 1.5.* download only java 1.5 is supported, java 1.6 will not compile

maven 2.0.9
download so far its only possible to use 2.0.5 to compile all tools

ant 1.6.5 download it has to be ant 1.6.5 or higher, 1.7.* wont work since several task are incompatible

postgresql 7.4.* or 8.*
  tested with postgresql 7.4.* and 8.*

jboss 4.2.1-GA download it needs jboss 4.2.1-GA, it could work with newer versions but never tested

subversion 1.4
download
 
eclipse 3.2
download

eclipse delta pack
3.2
download optional
eclipse gef
3.3.2.v20080129 download we recommend you install it using the eclipse-updateeclipse-update site of this plugin

- guis are skipped during build
eclipse zest
3.4.06-M6 same as gef
needed for visualization tools

- guis are skipped during build
grails
1.0.2
download
this is needed for the web frontends

Please make sure that the eclipse delta pack and the eclipse package are the exact same version, since you will have issues otherwise.

Hardware for Testing

Name OS Services IP Specification
Frontend Rocks Linux 5.0 or newer postgresql,jboss
10.1.1.1 1 x CPU, 1024MB RAM
compute node 0-1
Rocks Linux 5.0 or newer
    1 x CPU, 1024MB RAM
compute node 0-2
Rocks Linux 5.0 or newer
    1 x CPU, 1024MB RAM

It is very important that the compute nodes have at least 512MB RAM, but not more than 1 CPU! The reason for this is that some tests query the amount of available cpu's and will fail if they don't get the expected amount! 

We highly recommend to use virtual machines for testing, since you can specify the amount of used cpu's, the amount of ram and a standard modern pc has more than enough power to simulate this environment. 

Tested hardware for virtualisation

name age of system
os cpu ram virtualisation
apple mac pro
12/2007 OSX 10.5
2 x Xeon Dualcore
16 GB
VMWare Fusion
dell precision 470
11/2004 Linux 2 x Xeon Single Core 4 GB VMWare Server

You can find our test images here which are ready togo

creating the eclipse enviorment

 For a successful build you need to create the eclipse environment first since we need it for the gui parts.

  • extract the eclipse.zip file in your home directory, you should now have a folder called eclipse
  • download the GEF tools and copy them into your plugin folder, we recommend that you use the update site for this
  • download the ZEST framework and copy the *.jar files into your plugin folder
  • provide the values for the variables GRAILS_HOME and M2_REPO  in the eclipse java preferences

If you want to devlop the plugins with eclipse you need to open all the MANIFEST files after the initial build and click the 'update classpath' button, otherwise It will complain with missing packages. You also need to go into the binbases-libraries project, open the MANIFEST, enter the RUNTIME section and click 'calculate uses'. This has to be done since the used maven plugin does not provide this functionality. We appologize that this step is so complicated and you need to play around with this. If you find a better solution for this problem, please tell us about it!

Creating the Test environment - on the head node! (IP 10.1.1.1)

If you use our images this step is not needed!

  1. create the test database and test user
    createdb test
    
    createuser test
    
    psql test
    
    grant all on database test to test
  2. create the test user on the frontend (headnode)
    adduser test
  3. edit the .bash_profile to set the required variables
    export BINBASE_NODE_MEMORY=300M
    
    export JBOSS_HOME=$HOME/jboss

    the JBOSS_HOME directory must be accessible from all the cluster nodes! So best way is to put it in the shared home directory

  4. synchronize the user settings
    rocks sync users

Building BinBase from the latest svn branch

After you installed all the required software and configured the application server on the local host execute the following commands. If you don't have svn you also can get the latest BinBase snapshot here.

svn co https://binbase.svn.sourceforge.net/svnroot/binbase/trunk binbase

Create the eclipse enviorement which is needed to build all the GUI's. For this you need to unpack eclipse into your home directory and also unpack the rcp-delta pack into the eclipse directory.

$HOME/eclipse

you need to provide maven with some more memory, since the default settings are not high enough to build the archives.

export MAVEN_OTPS=-Xmx1024m

export JBOSS_HOME="/your/path/to/jboss" 

now go back in the main directory and execute

sh build.sh

[The build.sh script is a simple wrapper around several mvn commands, since maven has issues with internal dependencies].

This will take around 30 - 60 minutes now.

Once everything is done you can go in the installer directory and will find the available installers here. 

 Testing BinBase

To test the stability and general functionality we use JUnit which works very well with our continuous build system, maven2 and other tools. Currently there are too approaches, test everything, or test something when it breaks so it wont break again. We originally started with the test everything approach but dropped this idea very fast since it's just not possible to test all approaches and possibilities of a software of this complexity.

At least not with only one programmer. For this reason we changed most our tests to integration tests. This mean we test the complete system and if this test fails we add another test to cover the failed part. This gives us a certain amount of stability and does not take to much development time away.

The disadvantage is that it can take longer to fix certain issues and it does not provide the same amount of test coverage and stability like the test everything approach.

We also discovered that we have mostly 2 kinds of test's.
  • simple test's we don't need lots of preparations** simple tests like if I add a + b i have to get c** if i require a connection from a database I should get this connection and it should be able to execute sql
  • complex test's which need a well defined environment like** a database server** an application server** an empty cluster

 For this reason we bond the simple test's the the build phase "test" and the complex test's to the build phase "integration tests".

Executing the tests

You need to have the test cluster and test database installed for this or they will all fail* *

before you start the test, make sure that binbase was build with the build.sh script!

mvn test
mvn integration-test

If you don't run them on the Frontend node you need to specify some variables so that the test's can find all there compounds. We recommend that you use the default properties and default setup!

 Default setup:
service ip
frontend 10.1.1.1
database 10.1.1.1
JBoss 10.1.1.1

 basically you checkout and test the complete setup on the Frontend.

Test results 

All generated test results can be found in the folder

target/surefire-reports

If the tests generate any additional output like xml datafiles or result sets, you can find these in the folder

target/content

These folder are always related to the tested sub project.


Browse Space
- Pages
- Labels
- Attachments
- Mail
- Bookmarks
- News
- Activity
- Advanced

Explore Confluence
- Popular Labels
- Notation Guide

Your Account
Log In

 

Other Features

View a printable version of the current page.

Add Content


Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki.
Bug/feature request - Contact administrators