Deploy multiple services with Juju Quickstart

Juju Quickstart is a plugin that makes setting up an environment in Juju even easier than it already is! The plugin is useful for new users and the experienced developers because it can perform multiple steps so you don't have to type so many commands. Let me tell you about Quickstart and all the cool features!

Break it down

Configuration

Juju Quickstart can help a new user configure Juju after an initial install. It is a command line tool with an ncurses interface that makes it easier to configure than opening the configuration file in an editor. The interface shows which options are required and lets you get started with the least amount of typing.

Bootstrap

After helping you configure an environment Quickstart will conveniently bootstrap that environment for you saving you an extra step. The bootstrap process starts a machine in your cloud environment so that Juju can orchestrate the deployments.

Graphical User Interface

By default Quickstart will deploy the Juju Graphical User Interface (GUI) to the same machine as the bootstrap node. If you deployed the juju-gui normally it would be be put on a new machine, but Quickstart uses the --to 0 trick that saves you an instance. In a cloud environment where you pay for each machine this saves you money!

Bundles

One of the most powerful features of Quickstart is that it can deploy a bundle.

Bundles are a collection of Juju charms that can be deployed in a single step. Bundles are simply text files that contain charms, their relations, and configuration in a simple YAML format that is easy for humans to read and write.

You can explore all the options of Quickstart by typing juju quickstart -h in a terminal. I am going to focus in on the bundle argument. There are several different bundle formats that Quickstart will understand. Meaning there are many different ways to deploy bundles!

Recommended bundles

Recommended bundles are sometimes called promulgated bundles. These are bundles that have gone through a review process by Canonical and are stored in launchpad.net. These bundles are available at a special short uniform resource identifier (URI).

juju quickstart bundle:mediawiki/single

Userspace bundles

Every launchpad account has a personal namespace for charms and bundles. These personal namespace bundles can be deployed by anyone, the URI is just slightly different. To deploy existing a namespace bundle. The URI is bundle:~LAUNCHPAD-USERNAME/BUNDLE-DIRECTORY/BUNDLE-NAME where LAUNCHPAD-USERNAME is a launchpad username, BUNDLE-DIRECTORY is the directory where the bundle is located in launchpad, and BUNDLE-NAME is the name of the bundle in the YAML file.

juju quickstart bundle:~mbruzek/cakephp/cakephp-bundle

To create a bundle of your own, save the bundle in a specific directory structure in launchpad account. Push your bundle code to a directory structure like this: ~LAUCHPAD-USERNAME/charms/bundles/BUNDLE-DIRECTORY/bundle where LAUNCHPAD-USERNAME is your user name on launchpad.net and BUNDLE-DIRECTORY is the directory of your bundle. In the example above the cakephp bundle is stored in ~mbruzek/charms/bundles/cakephp/bundle

jujucharms bundle URL

The place to find charms and bundles is jujucharms.com. You can deploy bundles directly from jujucharms.com URLs.

juju quickstart https://jujucharms.com/bundle/mediawiki/scalable/”

Any HTTP or HTTPS URL

You can deploy a bundle directly from a hosted web site giving Quickstart a full URL to the bundle. This means you can deploy from github or your own company website!

juju quickstart https://raw.githubusercontent.com/mbruzek/docker-bundle/master/bundles.yaml

A local path

The Quickstart plugin will deploy from a local path to a YAML or JSON file that contains a valid bundle structure. This is very useful for developers.

A local path to a directory

If Quickstart is given a local directory it will look for a file named "bundles.yaml” and attempt to deploy that file.

Conclusion

I know this was a lot of information but it shows how powerful the Quickstart command is. The Quickstart command has many ways to deploy bundles providing all sorts of benefits to the Juju user. If you are the visual type, you can watch a 5 minute Quickstart video.

If you have any problems using Quickstart, check the bug reports or file a new one so we can improve the experience.