Buildbot and EC2/0.2
- Start New Instances
- Add new instances to build slave list
- Start a build on an EC2 instance build slave
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.
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 184.108.40.2066: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")
The EC2BuildSlave.py goes into your python's framework folder for Buildbot (note: on my mac, this is
|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|
|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.
|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|