48
edits
No edit summary |
No edit summary |
||
| Line 50: | Line 50: | ||
One server remains always-on (probably an in-house box of some sort). It contains the keypair necessary to access Amazon. A python script listens to mozilla pulse messages and simultaneously listens to requests on a socket port. A client program will send a changeset # to the socket server, and the server will in turn spin up an instance (using synchronization primitives to keep track of how many resources are in use), or it will queue the job if too many instances are already running. When a job completes, the server downloads the built binary from the EC2 instance, shuts down the instance (freeing the resource unless another queued job exists in which case it gets the job and executes it), and serves the binary via HTTP. It provides the download URL via a pulse message. The client program knows its build is complete when the pulse message comes through. Binaries older than 3 days are deleted via a cron job. | One server remains always-on (probably an in-house box of some sort). It contains the keypair necessary to access Amazon. A python script listens to mozilla pulse messages and simultaneously listens to requests on a socket port. A client program will send a changeset # to the socket server, and the server will in turn spin up an instance (using synchronization primitives to keep track of how many resources are in use), or it will queue the job if too many instances are already running. When a job completes, the server downloads the built binary from the EC2 instance, shuts down the instance (freeing the resource unless another queued job exists in which case it gets the job and executes it), and serves the binary via HTTP. It provides the download URL via a pulse message. The client program knows its build is complete when the pulse message comes through. Binaries older than 3 days are deleted via a cron job. | ||
== | == Side Project == | ||
Create a wrapper that pushes to mozillapulse | |||
Straight up building a changeset with the server: | == Proposed Usage == | ||
Straight up building a changeset with the server (also expose an API that allows other scripts to easily integrate cloudbuilder's functionality): | |||
mozcloudbuilder -s cloudbuilder.server.somesite.org -p 9999 --changeset=xxxxxxxxxx << (returns url to built binary) | mozcloudbuilder -s cloudbuilder.server.somesite.org -p 9999 --changeset=xxxxxxxxxx << (returns url to built binary) | ||
edits