You know what I love? Crawling into a bed made up with freshly-laundered sheets. Ahhh…! You know what I hate? Doing laundry and making my bed. Kind of a tricky spot to be in.

A lot of people feel pretty much the same way about deploying software. I mean, how great is it to fire up your application on a shiny new environment that hasn’t yet been polluted with hair-on-fire hacks, stray scripts or other development detrius? It’s pretty great. But what a chore it can be to provision and prepare said environment. So platform-as-a-service providers have popped up on the scene to take care of all those annoying bits for us.  Just build your application, send it up to the cloud, and buh-blam! you’re live.  (Ok, it’s slightly more complicated than that under the surface… but the beauty of PaaS is that you don’t necessarily need to care.)

One of the leading, and hands-down coolest, players is Heroku. Why? Because you can deploy your application with a simple ‘$ git push heroku master’, scale the processing power up & down with a few keystrokes, and you can get a surprising amount of capacity on their platform for free.

And now Heroku have teamed up with Bamboo to bring you cloud-based deployment as part of your build process.  Instantly-scalable build power with Elastic Bamboo (EC2) agents, and virtually unlimited environments to deploy to without purchasing a single piece of hardware. That is the beauty of development in the cloud. Meet the Heroku deploy plugin, available free to install in your behind-the-firewall Bamboo instance!

(Cloud purists, take heart.  Work is already underway to make the Heroku deploy task available in Bamboo OnDemand. More updates coming as events warrant!)

[EDIT] This task grabs packaged code, built upstream in your Plan, and deploys it to a Heroku app. Think of Heroku apps like environments. Only much, much easier to create. See that screenshot? That’s me creating an environment to deploy to.  (And I defy you not to fall in love with the app names they generate. I got “stark-sword-1315” once, and I swear I heard a direwolf howling in the distance… or it might’ve been a labrador in the dog park next to our office.) But that wasn’t easy enough for the good folks at Heroku. No! They built this plugin such that you can enter an app name of your choice, and if it doesn’t exist yet, the task will create it for you.

To use it, add the Heroku deploy task to your build Plan and fill in the blanks.  Your API key can be found in the My Account section on Heroku’s site.  And if you don’t have apps pre-created, just make one up, like I did here. Once the task completes, my website will be live at http://cheesehead4life.herokuapp.com. The plugin supports WAR deploys right now, with the prospect of adding support for JARs and TAR.GZ files in the near future.

Heroku is a secure and reliable platform for hosting websites and SaaS products.  It’s also a boon to developers, testers, and sys-admins.  Take for example, a team that is using a branch-per-feature development workflow.  But which branch gets to be deployed to your test environment? How do you keep deploys from stepping all over each other? Chaos! To properly test all those branches, this really becomes an environment-per-feature model. Between Bamboo’s Plan branches and Heroku’s hassle-free provisioning, you’ve got a powerful pair of tools to automatically deploy and test each feature while it’s still in development. This dramatically reducing the number of surprises when the feature is merged to master and deployed to your primary test environment for release.

To set this up in Bamboo, you can create a Plan variable called ${herokuapp.name} or ${env.name} that gets used in the Heroku task configuration.  In the base Plan, set the value to be your primary testing environment.  Then in each of your branch Plans, override the value with a different Heroku app.

Of course you’ll also need to use those variables in the Heroku task itself.  Easily done. Just slip that variable into the task configuration, as shown here.  Don’t forget to prepend it with that all-important ‘bamboo.’ !

 

 

Whether you’re already hip to Heroku, or are learning about it for the first time, it’s easy to get up and running. (It took me no more than a half hour to install their SDK, write a simple Hello World application, and deploy it to the interwebz for all to see.) Heroku have also added a helpful page in their Dev Center to get your cloud-deployment mojo risin’.  So grab the plugin, and get building!

Get the Heroku plugin

Announcing the Heroku Deploy Plugin for Bamboo!