Crash course in Firefox extension development – adding the new ‘micro’ instance type to the elasticfox extension

by rbrant on September 14, 2010

Click here to download:

ec2u-rbrant.xpi (419 KB)

So I’m all set to take advantage of Amazon Web Service’s new ‘micro’
instance type on EC2 (yup, another client moving to EC2). I need to
manage it via the elasticfox Firefox extension, but the micro instance
type isn’t an option yet in the new instance dialog.

Since it’s open source, I figured I’d see how difficult it would be to
change it myself. Turns out to be not difficult at all. Got the code
here:

http://sourceforge.net/projects/elasticfox/develop

And then tracked down the relevant code which handles the setting of
the instance type:

/trunk/src/chrome/content/ec2ui/newinstancedialog.js

and added(around line 255):

typeMenu.appendItem(“t1.micro”, “t1.micro”);

But I still needed to build the extension. It’s probably easy to do,
but after reading
https://developer.mozilla.org/en/Building_an_Extension, I was directed
to another extension that has a number of utilities, including the
building of an extension:

https://addons.mozilla.org/en-US/firefox/addon/7434/

It makes it super easy. You just browse to the source and click build.
You’ll need to go: Tools > Add Ons and then drag the xpi file there
for now.

Posted via email from rich’s posterous

{ 2 comments… read them below or add one }

cube whidden October 1, 2010 at 10:06 am

Wow, thanks for your post. I had been wondering about the micro instances and wanting to use them, but they didn’t appear so I thought it was an ami-x which I didn’t know about. This did the trick!

Reply

kiafaldorius January 11, 2011 at 7:33 pm

The micro still didn’t show up for me when I tried this.

Reply

Leave a Comment

Previous post:

Next post: