Deploying using Pallet pulling from a private github repo

March 14, 2013 § Leave a Comment

I’ve written a lein plugin for deploying ring apps to the cloud using Pallet via first pulling down from a private github repo and then registering the invocation of lein ring server as an upstart service. It’s tested to work with EC2 and an Ubuntu instance.

lein-pallet-fuz on github.

It was written at first for my own needs but it took me some time to get working so it may be helpful to others. It’s written against Pallet 0.8 which is the latest version. It’s up on github primarily as a reference example so use it as you see fit, rip the code and do whatever.

This is a lein plugin so if your app is simple you could just put the pallet config in your project.clj file and you’re set.

See the sample project file.

There are a few ways to get your stuff into the cloud that I’m aware of. If you’re using EC2 you could just use lein-beanstalk. Or you could skip the complexities of pulling from github and remote-file your uberjar across and then fire it up – although you’ll still need to consider using upstart/nohup. A couple of advantages of pulling from github are that a) you can more easily separate the deployment code from your app code as the dependency between the two is just a github URL and b) it saves having to transfer around a large binary which if you don’t have fast internet can be an issue.

What’s this?

You are currently reading Deploying using Pallet pulling from a private github repo at Pithering About.