tl;dr: Juju is aimed at deploying and scaling hundreds of services. But it’s also a handy alternative to buying a VPS.

I don’t have a VPS, I have in the past but I’ve never used them enough for me to be able to justify the cost long term. Juju provides a perfect solution to this use case.

I have a very simple charm I call devenv, it doesn’t do much more than install stuff I use for doing development, like installing tmux and grabbing my configuration files. I’ve blogged about it previously here.

This week I was having trouble getting a client library to connect to a simple server program I’d written, I was lost with debugging but luckily the library author volunteered to help me out. I already had a binary of the server that could be used to generate the error in the client library, but I don’t have a VPS, so what’s the quickest way for me to make the server public so the library author can play around with it?

Juju!

All I needed to do was to add the following line to the start hook of my devenv charm:

1 ./app &

And copy the app binary to my charm directory.

It’s sort of an anti pattern – but because juju copies the whole charm dir when it deploys, it will grab any binaries in the charm dir as well, it’s not a great idea to make use of this for serious deployments, but for me it was great

With that done all I had to do was deploy it:

1 2 juju bootstrap juju deploy --repository = charms local :precise/devenv

From deciding I wanted to deploy the binary – to having it deployed was under 5 minutes. 20 minutes later the library was fixed and the server was taken down

1 juju destroy-environment

That was it. All in all it cost around $0.02 (that’s just over 1p). Much better than having a VPS that would largely sit idle.

Of course the other advantage with using juju is that I’m not tied to a particular cloud provider, so I can choose which one I want depending on the pricing at that moment. And since juju now supports local mode you can do your charm development offline to save even more money!

Great, how does this help me?

If you’re thinking of getting a VPS – but don’t feel you can justify the cost because of the amount of use you’d get out of it, then you really should try out juju. Once you’ve got it installed there’s a handy charm that just deploys ubuntu server, it’s a great starting point for writing a charm to setup your own development environment.

1 juju deploy ubuntu

Here’s another link to my post about writing a charm to build a development machine: http://mattyjwilliams.blogspot.co.uk/2013/05/deploying-development-machine-with-juju.html