Getting Started with Juju

Getting Started with Juju

These are the slides for the intro to using juju talk. This covers basic deployment, inspection, and environment setup - which are considered first steps in the exploration process.

These core concepts are pre-requisites to doing any level of charming with Juju. - which is building the charms themselves to deploy your software into the orchestrated cloud.


Charles Butler

February 02, 2015


  1. 6.

    So you can focus on being an expert in using

    the service, not on deployment and life cycle management.
  2. 8.

    Juju's Model • Server / Client • Written in GO

    • TLS Encrypted Hypermedia Socketed API • Event Driven
  3. 10.

    Charms • Configuration Management • Service Relationships • Expose proper

    usage patterns through relations • Service Lifecycle Management
  4. 11.

    Bundles • Contain one or many charms • (Re-)distributable •

    Simple YAML files • Orchestration out of the box
  5. 14.

    Installation (OSX) For client only: • brew install juju juju-quickstart

    For development (the next session): adopt the vagrant workflow: •
  6. 15.

    Installation (Windows) For the core client: • Visit: •

    Sadly, no juju-quickstart Better Yet – Fetch the Vagrant Image!
  7. 18.

    Final Notes on Installation • All Major Platforms have

    the client for use in production. • Development efforts are in Vagrant / Containers. • More info at
  8. 20.

    Environments.yaml local: type: local admin-secret: foobar default-series: trusty amazon: type:

    ec2 region: eu-central-1 access-key: 'XXX' secret-key: 'XXX' control-bucket: cfgmgmtcamp-juju-## admin-secret: foobar default-series: trusty
  9. 21.

    Set your environment Juju switch amazon - or - Juju

    switch local $ juju switch local amazon -> local
  10. 23.

    Whats this doing? (Cloud) • Communicates with cloud provider API

    • Provisions a machine, and pre-loads it with JUJU stateserver components • Provides an API endpoint for enlistment • Warehouses SSH keys / Users (coming in 1.22)
  11. 24.

    Whats this doing? (Local) • Fires up a few components

    on your desktop – MongoDB – StateServer API – Components/logs are found in ~/.juju/local/
  12. 25.

    Lets deploy something! juju quickstart bundle:mediawiki/7/single juju set mysql dataset-size='20%'

    The mysql config option is a fix for local provider in vagrant. We don't have much ram, and this will cause mysql to fail to come up during deployment. good for prod, not for this use case.
  13. 26.

    What's this doing? (Cloud) • Communicating with cloud provider API

    • Provision a machine • Enlist in Juju StateServer • Shipping charm code to the unit • Runs hooks according to events
  14. 27.

    What's this doing? (Local) • Provisioning a new LXC Container

    – If the templates don't exist, it fetches the template(s). – This only happens once, for each series you deploy • Enlist container in Juju StateServer • Shipping charm code to the unit • Runs hooks according to events
  15. 28.

    See it in the CLI juju status If you need

    up to the minute information: watch juju status
  16. 29.

    See it visually juju deploy juju-gui juju deploy juju-gui --to

    0 juju expose juju-gui The --to co-locates the gui on the state server to keep machines at a minimum
  17. 32.

    Destroy Services juju destroy-service mediawiki juju destroy-service mysql juju destroy-machine

    1 juju destroy-machine 2 Why destroy-service AND destroy-machine? Juju leaves machines behind in the event You need to do data recovery!