|
Project Information
Links
|
AboutMwbuild is the tool used by Metaweb Technologies to handle configuration, build, deployment and runtime management of production services behind Freebase.com. Mwbuild takes a novel lightweight approach to deployment and configuration such that a single tool is used by both developers and operations staff. Implemented as a superset of the Subversion VCS, it facilitates source-based configuration and deployment of software components. A flexible INI-style configuration format with late-binding variable expansion allows for highly normalised specification of key/value pairs across a large number of machines and machine classes. It has an advanced process monitor (nanny) which handles logging of standard output streams, reliable start and stop, optional auto-restart in the event of a crash (with backoff), timed operations (a la cron) and process health checks. The nanny also presents a HTTP interface to various detailed statistics and logs in humanly readable and JSON formats. Nanny additionally supports a UDP multicast discovery and query mechanism. Getting itAt the moment, mwbuild is only available in source code form. You can grab it from Google Code's Mercurial repository with this command: hg clone https://mwbuild.googlecode.com/hg/ mwbuild The only dependencies at this time are:
Assuming you have these installed, it should compile cleanly on:
DocumentationThe simplest possible configuration is 3 lines. Put a file named project.mw4 into the root directory of your project. Here is a sample for a project called Unworkable: $ cat project.mw4 [project:unworkable] PROJECT_BUILD_CMD="make" PROJECT_START_CMD="exec unworkable" Assuming the mwbuild mw binary is in your path, you simply type mw build to build. Optionally you can use the -v (verbose) flag to get build output tee'd to console in addition to logfiles: $ mw build -v Synthesizing machine config from project.mw4 PROJECT_APPDIR="/home/az/niallo/projects/unworkable" Executing: make # some build output... Now to start, you just use mw start: $ mw start Starting project 'unworkable' nanny: unworkable http://localhost:36193/ And you can see the nanny process running: $ ps axuww | grep nanny niallo 5089 0.0 0.1 2180 2096 ?? Ss 4:59PM 0:00.01 mw: nanny: unworkable HTTP_PORT: 36193 (mw) Have a look at the nanny's HTTP interface. It exposes lots of cool stuff. To stop the process you simply run mw stop: $ mw stop Stopping project 'unworkable' (nanny PID: 5089) Stopped project 'unworkable' (nanny PID: 5089) More in-depth documentation can be found in the MwbuildHowto |