Posted: December 09, 2011 00:09 by zhenyun zhuang
Below are the steps I took to build Faban using NetBeans.
Though I am using NetBeans 7.0.1 on Solaris 11, most of the instructions hold on other systems.
--- Download the faban development source
Follow the instructions to use git to checkout the source; For instance, the following commands are what I used:
//generate public/private keys under your .ssh directory.
//upload your public key to faban.java.net (your profile dashboard - SSH Keys).
//You can verify its working by ssh (username)@git.java.net, where (username is your user name on java.net). You should receive something like: Hi, username! You have successfully authenticated, ....
//prepare git command
git remote add origin ssh://(username)@git.java.net/faban~source
git clone ssh://(username)@git.java.net/faban~source
--- Downlaod NetBeans
I am using Solaris 11 on Sparc machines, so I download netbeans EE version sparc solaris from NetBeans homepage and install it.
Then ~NetBeans/bin/netbeans to start;
--- General instructions
The projects need to be built in the following order: common, driver/harness, stage.
For all the projects, use "File" ->"new project", then "Java Project with Existing Sources".
Note that NetBeans may complain that there is existing build.xml/nbbuild.xml.
You can certainly remove them and build from scratch, but you lose the benefits of using the existing build.xml/nbbuild.xml.
There is a trick to keep the xml files. Firstly cp build.xml/nbbuild.xml a.xml; after passing the NetBeans stage of specifying project directory, then you click "next";
Before you act on the next step, rename a.xml to nbbuild.xml/build.xml. It will keep all settings.
Each of the projects requires some library and jar files in order to compile the project.
In the following I will focus on what are these libraries and where to find them.
To add libraries/jar files, go to NetBeans Projects view, then right click the project's Libraries item.
---- The "common" project
It only requires jdk 1.6, which is by default there. Build it and it will generate fabancommon.jar.
--- The "driver" project
It requires the fabancommon.jar, java EE API library, tools.jar (under your jdk/lib/), the three jar files from driver/lib directory.
--- The "harness" project
It requires fabancommon.jar, Java EE API library; ant.jar (~netbeans/java/ant/lib); all the jar files under harness/lib directory.
---- The "stage" project
It does not require any library, and there is no source. You can just build-all.
When building stage object, the output directory is specified in build.properties.
By default, it is kit.dir =../../../www/nightly. Feel free to change it to your preferred location, say (www/nightly, which will create the output directory right under stage project)
The output of stage project are two zip files: faban-docs-(date).zip and faban-kit-(date).tar.gz, where (date) will be in the form of 123011, indicating Dec. 30, 2011.
The faban-kit-(date).tar.gz is used to setup faban environment. Copy it to the faban master and unzip it. Then run ~faban/master/bin/startup.sh to start the master; then after deploying your benchmarks, you are ready to run your benchmarks.
Note that all faban agent machines need to be updated whenever you deploy a new faban-kit-(date).tar.gz.