I'm charmed - modeling a cloud with Juju

Modeling a cloud solution in Azure can be described as well... lacking. Don't get me wrong - we have ARM with recently updated reference(it really helps when it comes to create a custom template with many not-so-popular resources), but it is limited to components available to it. What if I want to deploy something created as a Docker container? Or use configuration prepared with Chef or Puppet? Well, it's still possible to incorporate all above into your process of delivering software, but it easily becomes a total mess. I'd like to introduce a tool to you, which could help in scenarios, where simple ARM templates and VSTS hit their limits.

What is all about?

Juju is a tool, which can help you in modeling how your infrastructure should look like and how it is connected. While Chef or Puppet help you prepare, manage and run multiple complex configurations related to all components used for your software, Juju works in a layer above - it excels in combining all scripts, containers and components into easy to understand model, which can be parameterized and reused. 

What is more, it is fully integrated with many different clouds - you can use it with AWS, Google Cloud, Azure or even create your local cloud using LXD. Its capabilities are quite impressive.

I want it!

To get started I strongly recommend you to read how to install and use Juju. Only thing you need is at least Ubuntu 16.04 LTS which you can easily obtain from the marketplace in Azure Portal. You can also use your local machine with Ubuntu installed on it - it's purpose is to have a central controller, which can be used to control our infrastructure.

When you reach Create a controller section, I'd like you to stop for a moment. In fact we don't want to focus on using Juju with LXD - I'd like to go straight to Azure bootstrap since this is what it's all about!

To configure Juju to work with your Azure subscription you will need a subscription identifier. Please go through this tutorial, which should help you add credentials to your account. When you have credentials added, just go to the terminal and enter:

kamz@blog-ubuntu:~$ juju bootstrap azure mycloud

This will take several minutes to actually configure whole bootstrap and your new environment.

The result of running a bootstrap command

Once bootstrap has completed, you can run another command:

juju gui

it will return a URL where you can access Juju and credentials to be used to sign in. Note that using GUI is optional - you can perform all tasks using CLI only. 

Juju dashboard after a bootstrap has been initialized


In this post I introduced application modeling term and presented the easiest way to get started with Juju. In the next post we'll try to get even more knowledge about other parts of it like charms and bundles and what we can do with them.