Previously we had a conference call with Armen Zambrano from Mozilla regarding Mozharness, BuildAPI and Simple Release Bugs (Thanks Armen!). He had introduced us to these topics and got us rolling on projects that we could tackle. Consequently, I took an interest in BuildAPI which is a Pylons project used by RelEng (Release Engineering) to surface information collected from two databases updated through Buildbot (http://buildbot.net/trac) masters as they run jobs.
The BuildAPI project wiki page can be found here.
A Little About BuildAPI
This project involves generating analytic reports by querying databases, which can be used for a multitude of purposes such as performance or usage reports or discovering rogue Buildbot slave machines. Furthermore, it uses Pylons which combines the very best ideas from the worlds of Ruby, Python and Perl, providing a structured but extremely flexible Python web framework.
Getting Started
However, there is a great deal of information that needs to be learned and it would definitely require me to take a strong iniative. The first step is figuring out where exactly to start and how to progress.
Fortunately, Armen had posted more information about BuildAPI on his blog (http://armenzg.blogspot.com/search/label/mozharness), which provided an objective:
What I need students to do is one of the two:
1) generate graphs, charts, CSVs and CPU totals for infrastructure load blog posts like this
a) this is very useful and could move us forward towards having this information being published publicly for consumption
b) I highly encourage this one as understanding the mental model behind it is easier
2) write a tool that analyzes our statusDB and figure out slaves that have been continually been burning jobs (sometimes it takes us several days to spot them)
He also provided us with snapshots from the database and extremely helpful links such as How to get started with BuildAPI and Google Chart API (more on that later).
Challenges (I love 'em, bring 'em on!):
- Need to wrap my head around BuildAPI's concepts
- Absolutely no experience with Python (although it is similar to BASH, which I am fine with) and just barely touched Ruby
- Need to learn how to integrate Google Chart API / how it works
- Figure out the database structure and which information needs to be pulled to generate the required reports
- How to integrate it all and create a tool that can accomplish the latter
What I have done so far:
- I have looked at the links Armen had posted, especially the ReleaseEngineering/BuildAPI as it provides instructions on how to get started with BuildAPI.
- Went over the database and its structure, which can be seen here and here or below:
and
- Started reading on Pylons framework from the following sources:
http://pylonshq.com/docs/en/0.9.7/gettingstarted/
http://pylonshq.com/docs/en/0.9.7/tutorials/
- Also, briefly went over Google Chart API (It's awesome!)
A Note about Google Chart API:
The Google Chart API allows you to dynamically generate charts using a URL string.
It is the perfect tool as the charts can be embedded on web pages which the advantage is there are no files to save or serve. Although, the API does provide the option to download the image for local or offline use.
Here is an example:
http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Work|Play
Isn't that awesome?