This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)(Learn how and when to remove this template message)
2.2.2 / July 13, 2017
|Operating system||Ubuntu, CentOS, MacOS|
|License||GNU Affero GPL v3 LGPL|
Juju is an open source application modelling tool developed by Canonical Ltd., the company behind Ubuntu. Juju focuses on reducing the operation overhead of today's software by facilitating quickly deploying, configuring, scaling, integrating, and performing operational tasks on a wide choice of public and private cloud services along with bare metal servers and local container based deployments.
Juju Modeling Complex Software Topologies
Juju's mission is to provide a modeling language for users that abstracts the specifics of operating complex big software topologies. Doing so reduces the cost of operations and provides flexibility. A Juju Model is an environment to manage and operate a set of software applications. Models can be operated on many clouds: Amazon Web Services, Microsoft Azure, Google Compute Engine, OpenStack, etc. A Juju Controller is the service that tracks the events, state, and user activity across multiple models. You can think of it a bit like a database servers where the controller is the server and models are different databases available on that server. Each model can have different configuration, sets of operating software, and different users with access at various levels. Some examples of models could be a web application, load balancer, and database in a "web-app" model. By using models deployments can be isolated into logical solutions and managed separately.
Juju can also be used to operate software on bare-metal servers by using Canonical's Metal as a Service, in containers using LXD, and more. Juju models provide an abstraction with allows the operations know-how to be cloud agnostic. This means that Charms and Bundles can help operate the same software with the same tooling on a public cloud, private cloud, or a local laptop.
The central mechanism behind Juju is called Charms. Charms can be written in any programming language that can be executed from the command line. A Charm is a collection of YAML configuration files and a selection of "hooks". A hook is a naming convention to install software, start/stop a service, manage relationships with other charms, upgrade charms, scale charms, configure charms, etc. Charms can have many properties. Charm helpers allow boiler-plate code to be automatically generated hence accelerating the creation of charms.
Juju Client and Environments
Juju has two components: a client and a bootstrap node. Currently clients exist for Ubuntu, CentOS, Mac and Windows. After installing the client, one or more environments can be bootstrapped. Juju environments can be bootstrapped on many clouds: Amazon Web Services, HP Cloud Services, Microsoft Azure, OpenStack, etc. By creating a Juju Provider, additional cloud environments can be supported. Juju can also be bootstrapped on bare-metal servers. Large deployments can use Canonical's Metal as a Service. Small deployments can use the manual provider, which allows any SSH Ubuntu machine to be converted into a Juju-managed machine. Juju can also be installed on a local Ubuntu machine via LXC operating system–level virtualization and the local provider.
Command Line and GUI
Juju has both a command line and a GUI. The GUI allows users to visually see what software is currently running in which models in a very clear fashion. It also gives the user the power to search the Charmstore and browse results with detailed Charm information presented. It also allows the deployment of complex software stacks via drag-and-drop. The Juju GUI is automatically available on every controller.
Juju also has a concept of Bundles. A Bundle is a portable specification for a model with charms, configuration, and relations all specified in a declarative YAML format. A Bundle YAML file can later be imported into another Juju model and shared with others. Bundles can also be uploaded to the charm store, allowing anybody to deploy a bundle via drag-and-drop or one command. In this example bundle, two applications are modelled; mediawiki, and mysql. Users can modify attributes declared in the bundle to customize their deployment:
services: mediawiki: charm: cs:trusty/mediawiki-3 num_units: 1 options: debug: false name: Please set name of wiki skin: vector mysql: charm: cs:trusty/mysql-29 num_units: 1 options: binlog-format: MIXED dataset-size: 80% tuning-level: safest series: trusty relations: - - mediawiki:db - mysql:db
The Juju Charm Store launched on April 3, 2012. The Charm Store regularly tests charms to notify charm authors when code breaks in addition to ensuring that Juju users have access to the latest versions of charms.
Juju's Strengths and Weaknesses
Juju is often compared to configuration management tools like Puppet, Chef, Ansible, etc. due to its software provisioning capabilities. This comparison however is not taking into account Juju's main strengths: instant integration and scaling. Juju allows services to be instantly integrated via relationships. By creating a relationship between, for instance, MySQL and WordPress, MySQL will share with WordPress any IPs, user, password and other configuration items. This will enable WordPress to create tables and import data automatically. Relations allow the complexity of integrating services to be abstracted from the user.
Also all complexities regarding service scaling can be abstracted. Users just need to specify the number of units they want and scaling will happen automatically. The charm will be responsible for choosing the best strategy.
Juju is also often compared to Platform as a Service. Although in definition Juju is not a platform-as-a-Service, it can be used to run multiple PaaS on top of it. Juju can be seen as a DIY PaaS that allows PaaS platforms to run next to "legacy" software stacks in order to create a customized PaaS.
Juju lacks several of the more advanced features server provisioning systems like Chef, Puppet, Ansible, etc. have. However, Juju allows Charms to be written in any language. As such, Chef, Puppet, Ansible, etc. can be used inside a charm to do the server provisioning.
Juju's Future Developments
Canonical does not share the roadmap for Juju publicly, but Juju providers for more public clouds as well as charms supported by their open source communities are very likely to come.
- "Releases". GitHub.
- Castro, Jorge O. (April 3, 2012). "Why the juju charm store will change the way you use Ubuntu Server – Jorge's Stompbox". Jorgecastro.org. Retrieved September 1, 2012.
- "Juju CentOS support patches".
- "Juju Windows support patches".