Charms as Babies, Chapter 1: The Cloud, Juju and Charms

by José Antonio Rey

Welcome to the first chapter of the Charms as Babies series. This chapter is dedicated to explain what are the Cloud, Juju and Juju Charms.

Have you heard about the Cloud? No, not the ones in the sky. THE Cloud. Let’s insert an XKCD comic for reference.

Interesting, huh? Yes, the Cloud is a huge group of servers. Anyone can rent part of a server for a period of time. Usually these are hours.

So, let’s put an example. I am Mr. VP from Blogs Company. I host… well, a blog. Instead of renting hosting like I would usually do, I decide to host my blog on the Cloud. So I go ahead, let’s say to Amazon Web Services. I tell Amazon I want an Ubuntu 14.04 server, with this amount of RAM and this amount of disk space. Amazon provides it to me for a price, and bills me per hour. It’s not renting me a username inside the entire server, but instead is launching a virtual machine (or VM) with the specs I requested, and giving the entire VM to me (including root access).

How is this different to common hosting, you ask? Sure, hosting is a practical solution when you just want things done, maybe FTP access to upload your site and that’s it. However, you can use the Cloud for whatever you want (within what’s legally accepted, of course). I may host my blog, but someone else on the other side of the world may host complicated data analysis applications, or maybe a bug tracker. Also, the Cloud gives you the possibility to rent a VM per hours. If I want to launch a server to try how to install MyProgram, then I launch a VM, install MyProgram, have fun with it, and destroy it right ahead. That way someone else can rent it after you’re done with it, and then you’re billed for the number of hours you used it. Everyone ends up being happy! There are several other benefits that come with the Cloud, but we will get to them later.

As I mentioned, you can do a lot of stuff with the Cloud. However, for most things, you need to know how to use a server, install stuff, compile code and more. Why don’t we simplify stuff and make it a lot easier? Why not run a couple commands and have whatever you want in a matter of minutes, without all the hassle? Well, that’s the basic idea behind Juju. With Juju you can execute simple commands such as `juju deploy wordpress` and you will have a WordPress instance set up for you, in the cloud of your choice (some restrictions apply), within minutes. Isn’t that amazing? However, all of this work is contained in what we call a Juju Charm. Charms are a set of scripts that help us automate the orchestration we see in the cloud. When I execute that command above, there are some scripts that are ran in the machine to install and configure. And someone else has written that charm to make your life easier.

I’m not going to dig deeper on how to use Juju, but want to highlight that even though things seem to be automated, there is a hero behind that automation, who helped you out doing the hardest part, so you can execute a command and get what you want.

What? YOU want to become the hero now?! Sure! In the next chapters we’ll see how can you become one the heroes in the Juju ecosystem. That’s all I have for this chapter, but if you have any questions about Juju and Charms, make sure to leave a comment below. Or drop by our IRC channel, #juju on irc.freenode.net. Look, there’s even a link that will take you to the channel on your web browser!