Edgewall Software

Version 2 (modified by cmlenz, 19 years ago) (diff)

Described some scenarios

Bitten Master/Slave? Protocol

To decouple the master and slave, an application protocol will be defined on top of the meta-protocol BEEP (Blocks Extensible Exchange Protocol, RFC 3080). BEEP was chosen because it provides peer-to-peer communication (so that both the client and the server can send requests to the other) and because of its relative simplicity compared to protocols such as XMPP.

Scenarios

Slave Registration

A new client connects to the build master and signals its' availability for executing builds by starting a channel for the Bitten profile.

First, the server needs to query some information about the client for orchestration:

  • Platform/architecture
  • Operating system
  • The product name and version number of each of the dependencies of the project to build (for example, the C compiler or the Python runtime). There may be multiple versions of each installed.
  • Name and email address of the maintainer

Next, the server checks whether there are any pending builds for that client. For example, if it is the only client that supports GCC 4.0, and there has been no build of some revision with GCC 4 yet, it will initiate a build on that client. Anyway, the server remembers the client configuration for as long as the connection is open, and may choose to route build requests to that client when repository changes are detected, or a build is triggered otherwise.

Build Initiation

When the build server detects that builds are necessary for some revision of the project, it queries its database of available slaves and chooses a set of slaves with non-overlapping configurations. For example, if there are 10 clients available that could execute the build of a Java project on Windows 2000 with JDK 1.4, it will only select one of those to actually perform the build.

A client can at any time decline a build request (or even abort a build), in which case the build master selects the next available client with the same (or sufficiently similar) configuration.

If the client accepts a build request, the server will transmit a tarball of the code base that is to be built. The client does not need to know which exact revision (or branch) of the project it is building, nor does it need to perform a checkout itself.

Build Status Reporting

Before and after each step of the build recipe, the client informs the server about its status:

  • whether the build has been started, is currently running, or has finished
  • which step is currently being processed

After a build step has been completed, the client transmits the data generated (as identified by the <reports> in the recipe) to the server, along with the the output of the build and a success/failure flag.

Attachments (1)

Download all attachments as: .zip