Announcing chef-sbt!

Posted by Matt Farmer on July 26, 2013 · 2 mins read

I’ve been on vacation for the last week from Elemica. So, naturally, that means I decided to learn something new. That something, this time around, was chef.

I decided to take some time and write some basic chef recipes for Anchor Tab‘s production server. They aren’t quite where I’d like them to be yet, but as of today I can get everything to the point of a perfectly functioning box with a copy of the Anchor Tab application on the box – which is a pretty good place to be if the production server were to ever go offline.  Through this exercise I’ve gone from needing three hours to needing… probably 30-45 minutes to get Anchor Tab back online from scratch.

Out of this toying around, I noticed there really weren’t any cookbooks I could find for sbt that didn’t do something I thought was weird. They either had weird configuration options or did something else I didn’t like. So, I punted and decided to write my own: chef-sbt

Chef-sbt is dead simple: it will download the sbt-launch.jar file from the typesafe repository, build out an executable “sbt” script based on the options you pass, and drop both of them in the /usr/local/bin directory of your server – ready for you to use.  It should also be smart enough not to redownload that jar file if the correct version is already there. For a lot of reasons that are an entirely different blog post, I don’t like having sbt managed by apt on the ubuntu servers that I deploy my applications to for production or testing. So, if you’re like me, I hope you’ll find this cookbook useful.

It’s entirely possible that someone has built this exact thing in the past, but I still enjoyed the exercise. Please file some bugs, open some pull requests, fork, and modify to your heart’s content. It’s Apache licensed, so go forth and be awesome with what I have given you. (And maybe tell me it’s awesome to stroke my ego a bit, too.) 

Cheers!