Jenkins Dynamic EC2 Slaves

There is a nice plugin for Jenkins that lets you dynamically add capacity by spinning up EC2 instances on demand and then terminating them when the job queue expires. This is a great way to save money on an AWS based build infrastructure.

Unfortunately, the plugin documentation is really light and there are a few gotchas to look out for.

Security Groups

This field only accepts comma separated security group IDs, not names. This is frustrating because other fields in the plugin take a space separated list (e.g. labels)

Running in VPC

If you’re a sane person you’re going to want to run these instances in a private VPC. This is entirely possible but is hidden in the advanced settings. If you expand the advanced settings you’ll see a field to enter your desired subnet ID. Set this to the ID of the private subnet in your VPC you want the instances to run in.

Don’t Rely On the User Data/Init Scrip to Install Dependencies

This adds a lot of time to the instance coming on line and being usable by Jenkins. A better approach is to make an AMI with all the build dependencies you need. The only delay is then the instance boot time.

This is far from an exhaustive walkthrough but highlights the issues I ran into setting it up.

google sure loves to disappoint

Sure enough Gmail is live in the app store.  Unfortunately its not an entirely native application.  Most of it is a native wrapper for a web view of the mobile site.  We get push notifications(except that their broken right now), address book integration, and the ability to attach photos, but the interface is a bit laggy and still won’t format an html email to fit the screen.

I guess I shouldn’t be surprised.  Google usually releases products publicly before they’re ready and then slowly improves them.  Link to the app store below.

http://itunes.apple.com/us/app/gmail/id422689480?mt=8

Make Gmail play nice with Apple Mail

Yesterday I determined a compromise.  I’m going to keep using iCloud for contacts and calendars.  Google sync makes a mess of contacts, iCloud “just works.”  I’ll keep using Gmail for my main email.  I’ll access it through Apple Mail on the desktop and the iPhone’s built in mail app.

Here’s how I set it up to avoid duplicate messages and other craziness.  Log into Gmail’s settings and navigate to the labels tab.  Here you can control which labels show up in IMAP.  What I did was hide all mail, starred, and important from IMAP.  

If I’m going to archive a message I throw it into a folder in Mail.  I also created an archive folder for any mail I want to keep that doesn’t fit into a specific folder.  In Lion, Mail now has an archive and delete button.  Hitting the archive button moves the message to this archive folder, while hitting delete actually deletes the message.  If you need to access Gmail through the web app you still have all of your mail available to search in all mail and the new archive label.  I like this setup better because I have complete control over whether a message is deleted or archived via Mail’s native interface.

Problem solved (minus push on iPhone).

Gmail to iCloud to Gmail again…

I’ve used Gmail or several years and have really enjoyed the experience.  It’s not without its quirks however.  Anyone who has ever used Gmail with an IMAP client can attest to how wonky things can get.  The way Gmail’s All Mail folder functions causes lots of duplicate messages to show up.  If a message has a label it will appear in both a folder for that label as well as in the All Mail folder.  If you search for a message in the client multiple copies will pop up.  The Gmail experience on the iPhone is also annoying.  You can setup up Gmail through IMAP just like a desktop client, with all of the duplicate messages, but you can’t get push.  That means I have to set my phone to poll the network at a certain interval.  This is bad for battery life at high settings and means that messages don’t show up right away.  The other option is to set up Gmail though Google sync as an exchange server.  You can get push with this option but deleting a message will always archive it.  I don’t want to archive all the junk newsletter messages I get.  To delete a message with this setup I have to select it and then manually move it to Gmail’s trash folder.

I’ve also used Google sync to keep my contacts and calendars in sync between all my devices.  This also has some annoying limitations, particularly for contacts.  The different fields you can sync for each contact are very limited.  Google will also take any contact pictures you sync and turn them into a grainy thumbnail.  Calendar syncing, for me at least, has usually worked fine.

Enter iCloud.  It is an Apple service designed to be integrated with their products.  Great!  I immediately switched to iCloud for the syncing of my contacts and calendars.  Contacts syncing is much more seamless than it was with Gmail, with much less setup and maintenance required.  Calendars worked equally as well.  I also signed up for an iCloud mail account back during the beta period but never used it.  I was considering making the switch to that as well.  When iOS 5 was released I became a little uneasy about this move.  Apple’s servers buckled under all the initial sign up traffic and mail was down for several hours.  That was already more downtime than I’ve ever experienced with Gmail.  I kept thinking about how nice complete integration would be though. 

Finally I decided to go for it.  Using Apple Mail I moved all of my messages from Gmail into iCloud.  That first night I was happy with the move.  The next day I had to pull up an email to print something at work.  Like most stupid IT departments Starbucks locks down their computers to only using Internet Explorer.  When I tried to pull up iCloud.com to get the message it wouldn’t load.  Apple doesn’t support Internet Explorer, and the site won’t even load.  Then I got home and tried to send an email to someone on our worship team, but kept getting an error.  Turns out that the SMTP server was down.  Down again!  It was that experience that prompted my “screw this, back to Gmail” tweet.  Simply put, email should be reliable.  iCloud also uses a custom authentication method and I can’t get it work with Sparrow mail at the moment.  Not only that, I logged into iCloud.com today and realized that the web client doesn’t have threaded messaging!  Apple mail and the iPhone have had threaded conversations for quite some time, and so did Mobile Me.  These products don’t just simply work, and aren’t all that unified in their experience, which is very un-Apple.

I’m still not sure what I’ll do.  I like iCloud contact syncing much better, but if I’m using Gmail it makes sense to keep my contacts synced there.  I like using a mail client as well.  Sparrow integrates with all of Gmail’s features like labels natively, but I’m favoring Apple Mail these days.  On my iPhone I can use another app like Boxcar to get push notifications and then pull up the Gmail site in mobile safari.  That still isn’t ideal though.  I want my email to work seamlessly with my iPhone since it is what I use for probably 75% of my email, and as good as the Gmail mobile web app, is its still not as smooth as a native application.  Hopefully iCloud will get more reliable and gain some features over time, but right now I’m stuck in undecided mode.

Has anyone had better luck than me?