從頭安裝Buildix

source: http://yekmer.blogspot.com/2008/09/installing-buildix.html

 

Buildix is a nice solution, it contains

Mingle is not a free software, so you can uninstall it, like me ;)

I couldn't see a full documentation for starting from scratch for buildix, so I hope this post will be usefull people who haven't used buildix before. And will save hours.

Let's start.

  • I used vwmare image to install it, The steps will be similar if you want to install your machine too.
  • Go to http://buildix.thoughtworks.com/index.php/download/ page and download vmware image(mine is buildix-2.1-vmware.tar.bz2.)
  • Go to http://www.vmware.com/ page and install vmware, if you have not installed it yet. (I won't tell how to install vmware here, you can find lots of document on web.)
  • The first you should know is this image is an ubuntu os(for me it was 7.10 version,quite old. If you have newer ubuntu version, you can use apt to install your machine, it will be better for you I thing), which has pre-installed programs to install buildix.
  • After opening the image in virtual machine, you should log in ubuntu, Go to virtual machine terminal and press enter to see login. For default login username : buildix , password : buildix
  • Write ifconfig command to the terminal and see your ip.(mine is 192.168.0.130)
  • If you don't want a non-free software, you can uninstall mingle by writing sudo apt-get remove mingle. (like me ;))
  • Then write the ip to your web browser. (like this https://192.168.0.130/)
  • You should login to buildix using browser, click on login on the right upper part of site and login to site using username : buildix , password : buildix
  • To add users you should click on user manager and add users, after adding you can assign admin roles to the users you add by checking the admin checkbox near that user.
  • Then click on create project from the navigation menu.
  • And create a project using the name you want, (for me I will use the name myproject)
  • After creating a project go the main page. (for me it is https://192.168.0.130/) You should see the project you created there.
  • You can go and use the cruisecontrol, subversion and trac for your project here, by clicking on the images.
  • Using trac is simple, you can find documentation for it, So I won't tell it here. The main thing you should know for login is the same as other parts of buildix username : buildix , password : buildix
  • Your default svn address for this project is https://your-ip/svn/your-project-name/trunk/, (for me it is https://192.168.0.130/svn/myproject/trunk/)
  • I will tell here how to integrate with eclipse here, if you are using a different ide, the steps are similar.
  • (For eclipse you should first install subclipse extension.)Go to navigator view, right click there , choose import > Check out projects from svn > create new repository location >
  • write https://your-ip/svn/your-project-name/trunk/ there. (For me it is https://192.168.0.130/svn/myproject/trunk/)
  • Then choose your project there, and click finish. It is over, if you want to commit something you can use username : buildix , password : buildix or the user you created from the main buildix page.
  • It will create a build.xml in the project to build. If you are using ant it is not problem. But I am using ant, so I need some more configuration. (the configurations below will tell how to integrate to use maven.)
  • First you should install maven to your virtual machine. Go to virtual machine terminal and
    follow the steps written on http://maven.apache.org/download.html page. (sudo apt-get install maven2 doesn't works for me, because it is an old ubuntu release.) I will write the steps written there to install maven2 to your virtual machine.
  • Using the terminal on your virtual machine write wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.0.9-bin.tar.bz2
  • tar -jxvf apache-maven-2.0.9-bin.tar.bz2
  • Then add environmet variables that are required for maven, by writing sudo vim /etc/environment
  • Then add the lines below. to the environment file. (Your paths can be different. so be carefull.)
  • PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    LANG="en_GB.UTF-8"
    M2_HOME=/home/buildix/apache-maven-2.0.9
    M2=/home/buildix/apache-maven-2.0.9/bin
    PATH=$PATH:$M2
    JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
  • Then restart the virtual machine. or export the path variables using command line.
  • After all that stuff, you are ready to add a pom.xml to your project file. Add your pom.xml file under your project, delete the build.xml and commit the changes.
  • You should configure cruisecontrol to automatically build the maven project.
  • You can use ssh, it is pre-installed in buildix. Default login is username : buildix , password : buildix for ssh. If you want root login you can write sudo passwd root and assign root password to open and change configuration files.
  • Open the file /etc/cruisecontrol/cruisecontrol.xml (you can use ssh.) And add the lines below
  • < name="maven.home" value="/home/buildix/apache-maven-2.0.9">
    < name="schedule.interval" value="1000">
    < name="quiet.period" value="120">
  • And change the project you created like below.
  • < name="myproject" buildafterfailed="false">
    < interval="${schedule.interval}">
    < mvnhome="${maven.home}" pomfile="${cruise.working.dir}/projects/${project.name}/pom.xml" goal="clean install">
    < /schedule>
    < /basicproject>
  • If you are confused I will give a link of my config file http://creasus.eu/yekmer/cruisecontrol.xml you can download and look at it.
  • After all you can go to the cruisecontrol page and https://your-ip/dashboard/tab/builds (for mine it is https://192.168.0.130/dashboard/tab/builds)
  • And click force build to see if it is building or not. (You will find cruise control is such a nice programme.)
  • And Voila that is all. Your builds are sheduled, you have a wiki, ticket control system, svn. That is all buildix is like magic, but it needs configurations ;)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章