There’s a bit of buzz around ThinkUp, a new project that aims to help users collect the data they’ve submitted to social networks by making software that not only keeps a copy that the user can keep for their own purposes, but throws in some analytics as well. Here’s an example with the White House’s twitter feed.
George Edison (Nathan Osman) volunteered to not only try ThinkUp, but make it easier for anyone to run it. In this example we’re going to be deploying ThinkUp so you can play with it. For most people this will either be a local deployment or EC2 (It’s up to you), though OpenStack and Orchestra is also supported, just in case you feel like running ThinkUp in the OpenStack cluster in your closet or something.
The first thing to do is to configure juju for use. If you want to use it locally you can use the instructions here, but for this example I’m going to deploy it to EC2. Let’s install juju:
sudo add-apt-repository ppa:juju/pkgs sudo apt-get update && sudo apt-get install juju charm-tools
And then you need to configure your juju environment. That link also has a link to your account page on Amazon where you can find your access key and secret key to put in the text file. Ok, let’s get started.
This will fire up what we need on EC2. This can take a bit, like 3-5 minutes sometimes, so you might want to
juju status until it responds with a live instance, after that I usually open another terminal and toss a
watch juju status so I can keep an eye on what’s going on out there. Ok, now let’s snag the charms:
charm get thinkup oneiric/thinkup charm get mysql oneiric/mysql
This will get the charm and put it in oneiric/thinkup for us. Now let’s deploy this guy, along with mysql.
juju deploy thinkup --repository . local:thinkup juju deploy mysql --repository . local:mysql
And now the magical part, let’s make thinkup and mysql be friends and give them some configuration options.
juju add-relation thinkup mysql:db juju set thinkup name="Your Full Name" email="firstname.lastname@example.org" password="my_secretPassword"
juju status window you’ll see it firing up the instances, installing the right software, and configuring it. When it says “state: running” for each service you’re ready to go! George has captured the steps necessary to deploy ThinkUp, and expressed that as a charm. He’s distilled the expertise from the upstream project into something that we can all use, and share, and he’s even added configuration options to his charm so that I can pass that along to ThinkUp.
Let’s finish it off and tell ThinkUp that we’re ready to go and open the port/service.
juju expose thinkup
And we’re done, in status you’ll see the EC2 address that has been given to ThinkUp, put that in your browser and you’re done, enjoy ThinkUp!
As we prepare juju for 12.04 there are many things in this example that we’ll improve. For example I have you pulling from a PPA so you can use the convenient charm tool to search for the charms you need, and we have some ugly syntax things we can fix, and in general make as easy to use as apt, except for your whole datacenter.
What about my favorite service?
Anything that can be deployed can have a juju charm, everything from Minecraft, to running your own Steam server is being worked on. Our list is already growing. If you’re looking to add your service to this growing list we would LOVE to work with you. We’ve got Mark Mims working with a bunch of upstream projects right now sharing best practices on getting their projects into charms. The nice thing about charms is they can be written in whatever language you want, which means, your sysadmin probably already has deployment scripts get you most of the way there.
You can find more information on the wiki page. We’re especially looking for upstream projects who want to lay claim to their charm and make it rock, we’re ready to help you get what you need out of the charm store.
We have two event’s coming up, one in IRC, and one at SCaLE if you want to hit us up with more questions, see you there!