BoxGrinder REST | Quick Start

Software needed

Architecture

To run BoxGrinder as a service with RESTful API you need to launch a BoxGrinder REST server. REST server will take all incoming requests and dispatch tasks to build nodes. The general (simplified) architecture may look like this.

 

bg_rest_arch.png

Installation

Supported operating systems are: Fedora 12 and CentOS 5.5.

BoxGrinder REST

On one node install BoxGrinder REST server. You can download BoxGrinder REST application and deploy it on your JBoss AS with TorqueBox deployer. You can also use special TorqueBox build bundled with BoxGrinder REST. Software is ready to download from BoxGrinder REST download page.

BoxGrinder Node

You need also one or more build nodes. Prepare a clean system with JRuby installed and available in $PATH. Install BoxGrinder Node using jgem command:

~> jgem install boxgrinder-node

Configuration

BoxGrinder REST

You need to specify what kind of plugins you want to expose to clients. For example if BoxGrinder supports s3, ami, cloudfront and local delivery plugins and you want to allow only cloudfront delivery for clients you tell that BoxGrinder REST. Same goes to platform and operating system plugins. You can also specify the architectures you're supporting. By default there are no plugins and architectures added.

 

To configure BoxGrinder REST please create a $BOXGRINDER_REST_HOME/config/boxgrinder.yml file. Example content is shown below:

plugins:
  platform:
    - ec2
    - vmware
  delivery:
    - s3
    - sftp
operating_systems:
  fedora:
    - 11
    - 12
architectures:
  - i386
  - x86_64

BoxGrinder Node

Please create a configuration file located in ~/.boxgrinder-node/config for each BoxGrinder Node. Below is an example file:

rest_server_address: 10.1.0.1                         # default: localhost

naming_port: 1099                                     # default: 1099

build_location: /home/boxgrinder/build                # default: current dir (pwd)
log_location: /home/boxgrinder/build/log/node.log
     # default: log/node.log

Please note that it is highly probable you want to have same config on each node.

Running

After BoxGrinder is set up you can run BoxGrinder REST server launching JBoss AS. After server is started you can launch also BoxGrinder Node on each node:

~> boxgrinder-node
Note: In future versions there will be auto register feature and a init script created to run BoxGrinder Node as a service.

After you launch BoxGrinder Node please go to:

 

http://BOXGRINDER_REST_ADDRESS:8080/api/nodes

 

to see if all nodes are registered successfully and are in ACTIVE state.