Buildbot and EC2/0.2

From CDOT Wiki
Revision as of 12:59, 1 February 2008 by Awdelyea (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Release 0.2

Buildbot and EC2 Project Page

Goals

  • Start New Instances
  • Add new instances to build slave list
  • Start a build on an EC2 instance build slave

Downloads

    EC2BuildSlave.py     *Just put this file into your buildbot installation folder so python can access it
    Master.cfg

About

To use the EC2 service with Buildbot, there needs to be some way for Buildbot to dynamically generate a list of build slaves. These build slaves (or just slaves) are hosted as a virtual machine on the EC2 service.

This will work by extending the BuildSlave class to add in some new functionality for starting a new EC2 instance. So, every time you add a new slave to the slave list, another instance will be spwaned, so that you can spawn as many instances as you think you will need to complete a build.

This new BuildSlave class will start a new instance, which will then proceed to send the connection information of the master to the new instance. How exactly, I'm not exactly sure, because it takes a minute for the virtual instance to start up.

The rest basically takes care of itself.

Still have to think about how to turn the new EC2 instances off after the build is done.

0.2.1

About

I have made a slight modification to the EC2BuildSlave. It now requires some additional input, because I had been hardcoding some values in, and that's sloppy, so I corrected it to allow you to put any variable parameters in the config file.

Basically, you will lay out a new EC2BuildSlave like this:

   from buildbot.EC2BuildSlave import EC2BuildSlave
   c['slaves'] = [EC2BuildSlave("bot1name", "bot1passwd", "public key", "private key", "dns", "instance-id")]
   //Where dns = www.whatever.com:8898, or 88.123.55.456:8898
   //and public/private key is your public/private key from Amazon
   //and instance-id is the instance you would like to launch ("ami-87d530ee")

Downloads

   The EC2BuildSlave.py goes into your python's framework folder for Buildbot (note: on my mac, this is
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/buildbot/)

Tasks

</table
Task Details Priority Contributors Status Target Completed Link(s)
Start new instances Allow Buildbot to spawn an instance on demand. This could possibly be a function called right before the build slave list is populated, and would pass back an array of build slaves. High Adam Delyea Done      
Add new instances to build slave list Allow newly created EC2 instances to be added to the build slave list.

After looking more closely at how the buildslave is created, this goal doesn't make any sense, since this is not really how the buildslave list works.

Cut Adam Delyea Cut      
Start a new build on an EC2 instance Allow Buildbot to successfully start a build using a build slave on an EC2 instance High Adam Delyea Done