Take a look at the architecture diagram below.
How would you go about automating deployment of this Java based cluster to EC2? Utilise Puppet or Chef? Write your own scripts? How would you adapt your solution to add or remove servers to scale on demand? Can your solution support deployment to your own equipment? If the solutions that come to mind require a lot of initial time investment, you may be interested in Juju (juju.ubuntu.com).
In upcoming posts, I’ll show how you can use Juju to deploy this cluster. But for this post, I’ll give a brief Juju introduction.
Juju is a new Open Source command line deployment tool in Ubuntu 12.04 Precise Pangolin. It allows you to quickly and painlessly deploy your own cluster of applications to a cloud provider like EC2, on your own equipment in combination with Ubuntu MAAS (Metal as a Service – wiki.ubuntu.com/ServerTeam/MAAS), or even on your own computer using LXC (Linux Containers). Juju deploys ‘charms’, scripts written to deploy and configure an application on an Ubuntu Server.
The real automated magic happens through charm relations. Relations allow charms to associate to perform combined functionality. This behaviour is predetermined by the charm author through the use of programmable callbacks. For example, a database will be created and credentials generated when associating with a MySQL charm. Charms utilise relations to provide the user with traditional functionality that requires no knowledge of underlying networks or configuration files. And as the focus isn’t on individual machines, Juju allows you to add or remove further servers easily to scale up or down on demand.
Sound interesting? In my next post I’ll demonstrate deploying a web application to Tomcat and connecting it to MySQL.