Home > panda

panda

Panda is a project mainly written in ..., based on the MIT license.

A contious integration system built for the OpenSim project

= Welcome to Panda

Panda is a continous integration system designed for use by the OpenSim project, though it can be used for other tasks as well.

== Design Points Panda has a few design points in mind. Not all are implemented at this point, but it is where the project is headed.

Panda should:

  • support scm revisions as a first order object
  • support unit testing as a first order opperation
  • make it easy to get raw data back out
  • be able to run tests for the same revision on different environments
  • not consume all the memory on a machine

The design points have lead to the following decisions:

  • the use of rscm for scm integration. Currently only subversion is supported, but git support is a high priority.
  • an object tree that includes scm repositories, scm revisions, and test runs in logical ways.

Because I'm a big fan of ruby on rails, this is a ruby on rails application. Building the web interface was easier and faster that way, and ruby is perfectly addequate as a job runner.

= Installation

== Requirements

  • Ruby on Rails 2.2.2. This may work on other versions, but it isn't tested.
  • Passenger >= 2.1.2. http://modrails.com. It is probably possible to deploy on other environments, but I use passenger, so you should too.
  • MySQL 5.x. Background job doesn't like sqlite, and I didn't debug why, run this application on MySQL
  • rscm 0.5.4 from gems.github.com.
  • background job gem
  • RedCloth gem

For the gems you can just "rake gems:install" and they'll come down correctly.

== Install Procedure

Install everything above. Describing that further is outside the scope of this document.

git clone git://github.com/sdague/panda.git cd panda mkdir tmp chmod 777 tmp cp config/database.yml.example config/database.yml edit config/database.yml (set user/db/password as appropriate) sudo rake gems:install rake db:migrate (sets up database schema)

Then deploy that directory as a passenger application (go read http://modrails.com for instructions).

Next, set up a crontab to run:

  • bj (background job) for handing the queue processing
  • collector.rb for finding new revisions
  • cleaner.rb for whacking failed jobs

The example crontab.example is a useful starting point here.

Lastly, you need to create definitions for the repository, environment, procedures and testsets. There is an init.rb that can be run as an example of setting that up for OpenSim.

At this point the scheduled collector will start collecting repository revisions and build the most recent one found.

== Normal Running The cron jobs set up above represent all the execution of panda that is required outside of the web application.

If you need to restart the web application (to take on a code update) you can either restart apache, or touch tmp/restart.txt in the panda working directory, which will just trigger a restart of passenger.

Previous:portfolio