About 3 years ago I bought an HP Microserver, and blogged a little about running Ubuntu on it. Well it’s still going strong, doing backups for all my important stuff, serving media to the house and generally doing whatever I need of a home server. I’ve upgraded since I first got it though. It’s now got 8GB RAM and twelve 2TB hard disks (eight in an external array attached via supplied PCIe eSATA card), and it’s running pretty well.
Sometimes I want to spin up stuff to test out on a machine accessible to the whole house, but not the general public. Often I’m just trying stuff out, having a play and evaluating various free software products. I don’t really want to clutter up the main install of the machine with all kinds of crap so I liked the idea of using Juju and lxc to have these applications in separate containers which I can easily spin up and destroy on demand. Now Juju isn’t really designed for the “single server at home” scenario, it’s meant for big deployments, scale out, cloud, all that jazz. I wanted to use it so I can be familiar with it, should people ask, given it’s one of our products 🙂
One thing Juju and lxc can do easily is work in a local mode which is designed for the devops people to test out deployments on their laptop, then migrate to the cloud when their work is ready. This defaults to running lxc in a kinda NAT environment so the containers are only visible on the network to the local devops laptop. I wanted to run juju and lxc on my Microserver and make everything accessible to everyone. I asked a question on AskUbuntu and then after a little fiddling I got it working and posted my answer so others people can do it.
So once that was all configured I’ve spun up instances of GITLAB, Etherpad Lite and even Minecraft using no more than a couple of commands to install and configure the software, and one more to destroy it all and leave no trace when I’m finished playing.
Recently people have been looking for alternatives to Google Reader, now it’s being shutdown. I’ve been in the same position and wanted to try a few options out, including self-hosting something. One option I wanted to test was Tiny Tiny RSS and my first port of call was to find out if there was a Juju Charm for it. Sure enough there’s a tt-rss charm for Juju! All the instructions are on that page and worked first time for me:-
It took no more than a few minutes to go from nothing to installed, up and running.
alan@homeserver:~$ juju deploy mysql
2013-06-24 10:26:54,341 INFO Searching for charm cs:precise/mysql in charm store
2013-06-24 10:26:54,965 INFO Using cached charm version of mysql
2013-06-24 10:26:55,065 INFO Charm deployed as service: 'mysql'
2013-06-24 10:26:55,069 INFO 'deploy' command finished successfully
alan@homeserver:~$ juju deploy tt-rss
2013-06-24 10:26:58,812 INFO Searching for charm cs:precise/tt-rss in charm store
2013-06-24 10:26:59,552 INFO Using cached charm version of tt-rss
2013-06-24 10:26:59,663 INFO Charm deployed as service: 'tt-rss'
2013-06-24 10:26:59,665 INFO 'deploy' command finished successfully
alan@homeserver:~$ juju add-relation tt-rss mysql
2013-06-24 10:27:05,561 INFO Added mysql relation to all service units.
2013-06-24 10:27:05,562 INFO 'add_relation' command finished successfully
alan@homeserver:~$ juju expose tt-rss
2013-06-24 10:27:18,164 INFO Service 'tt-rss' was exposed.
2013-06-24 10:27:18,165 INFO 'expose' command finished successfully
It took a few minutes on my (very busy and low spec) Microserver to spin up the unit and deploy it, but it was fast enough for me!
alan@homeserver:~$ juju status
2013-06-24 10:30:13,069 INFO 'status' command finished successfully
I pointed my browser at the IP address above and got the usual “It’s working!” boilerplate, then guessed the real url needed /tt-rss adding on, and it worked. Super easy.
I imported my RSS feeds from an OPML file I’d previously exported from Google Reader.
No config was required, I was up and running with a self-hosted RSS reader to test out on my own infrastructure. If I wanted something more robust than my little server at home I could of course spin this up on any one of the public clouds, or indeed my VPS, but that’s for another day. I don’t know if I’ll carry on using Tiny Tiny RSS, but when I’m done I may export the data from my local install and clean up with one simple command – “
juju destroy-service tt-rss“. Job done.