It was an ebook, written with Leanpub (very cool publishing platform for ebooks.
I didn't investigate other distribution platforms; I'm just using leanpub--they take care of all kinds of things (refunds, shopping carts, distributing updates to the ebook if/when I publish them) that I didn't want to. They have a pretty nice royalty structure, but you then have to do the marketing yourself.
I created a couple of graphics myself. I think they add something to technical books.
Income: I think I have made 250 bucks since October. Fun to make some money, but obviously not paying the bills.
One thing I didn't see you mention is: how do you market the book? This is a very important thing to think about. Far more important, in my opinion, than the questions you asked.