N4 Installing Juju

Juju is an Open Source Charmed Operator Framework. It helps you move from configuration management to application management and has two main components:

Charmed Operator Lifecycle Manager (OLM) - a hybrid-cloud application management and orchestration system that helps you from Day 0 to Day 2. Deploy, configure, scale, integrate, maintain and manage Kubernetes native, container-native and VM-native applications – and the relations between them.
     ● Charmed Operators, packaged as “Charms”, are software that encapsulate a single application and all the code and know-how it takes to operate it on Kubernetes or machines.

Charmed Operator SDK - a guide to help you build Charmed Operators for use with the Charmed OLM.

The Juju client is a single binary executable that is published and supported on multiple operating systems and CPU architectures. Find the instructions for installing Juju on your preferred operating system below.

Each Juju release is accompanied by a set of release notes that highlight the changes and bug fixes for each release. They are available on our Discourse page.

The Juju client can be extended with plugins.

Install Juju on Linux

Install from snap

Installing the Juju client from snap is the recommended installation method as it ensures that the client get automatically updated as soon as a new Juju release becomes available.

Snap command not available on your system? Visit snapcraft.io for instructions
on how to install snapd.

To install the latest stable version of the Juju client:

sudo snap install juju --classic

Using snap also allows you to select a particular version by specifying the
--channel argument:

sudo snap install juju --classic --channel=<version/release>

A list of the available channels for the client can be obtained by running:

snap info juju

Download the Juju client binary

This method allows you to install the Juju client on systems that do not support
snaps.

  1. Visit the project’s downloads page and select the binary
    that matches your system’s architecture and the version that you want to install.

For example, to download the 2.8.10 client for amd64:

curl -LO https://launchpad.net/juju/2.8/2.8.10/+download/juju-2.8.10-linux-amd64.tar.xz
  1. Validate the downloaded binary archive (optional)

Download the md5 checksum that matches the binary you just downloaded:

The link to the md5 signature can be constructed by simply appending /+md5 to the end of the link you just downloaded.

curl -L https://launchpad.net/juju/2.8/2.8.10/+download/juju-2.8.10-linux-amd64.tar.xz/+md5 -o juju.md5

Validate the downloaded binary archive against the checksum file:

cat juju.md5 | md5sum --check

If the checksum check succeeds, the output will be:

juju-2.8.10-linux-amd64.tar.xz: OK

If the check fails, md5sum exits with nonzero status and prints output similar to:

juju-2.8.10-linux-amd64.tar.xz: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
  1. Unpack and install client binary
tar xf juju-2.8.10-linux-amd64.tar.xz
sudo install -o root -g root -m 0755 juju /usr/local/bin/juju
  1. Test that the version of the client you installed is up to date
juju version

Install Juju on macOS

The Juju client is available on Homebrew and can be installed as follows:

brew install juju

Install Juju on Windows

Visit the project’s downloads page and select the signed installer for the Juju version you wish to install.

Build Juju from source

Visit the downloads section of the Launchpad project to download a tar.gz with Juju source code. For build instructions refer to the contributing to Juju documentation on Github.

Start each page in the getting started section with the same description to remind new users of the terminology associated with Juju (Charmed OLM, Charmed Operator SDK, Charmed Operators often called ‘Charms’, etc). We want to ensure that everyone uses the same terminology going forward.

This section could be “error handling”, if so, you should show common errors for each OS and how to resolve them.

"If you see the error, “Snap command not available, you need to install Snap.”, (provide link)

  1. Show the full link, so they know it’s not just the homepage.

Adding more comments here, since I have limited commenting privileges:
2) Have you followed these specific instructions on each OS? If you only use the instructions here, do they work?

  1. What is the purpose of this page? If they follow the Guides, they’re doing the install. If this page is mainly for finding / using development releases or for Mac/Windows, we should say it right at the top, and point people to the appropriate guide for the majority of situations.

  2. Do we need getting started guides for Mac/Windows? If it’s part of the Linux guides, do we direct them here for that step, and tell them to go back to the guide after?

  3. Once installed, what are the next steps? What content should they look at next?

1 Like

Perhaps we should change this to “get the latest stable version”.

1 Like

This should just be snap info juju. Is a backtick missing from the code block?

1 Like

Since 2.9-rc7, we don’t distinguish between Linux flavors (ubuntu/centos) and just provide a single compiled binary per architecture (see artifact list in https://launchpad.net/juju/+download).

In addition to the compiled binaries we also provide a tar with the source in case someone wants to build it locally.

With that in mind, I would additionally suggest to:

  • augment the table at the top of the page with a “curl | tar -C” command for Linux users that cannot/do not want to use snap.
  • Include this information in the Linux installation instructions section as an alternative to snap.
  • Update the “Local builds” section accordingly.

Thanks for a ll your comments @achilleasa!

I think this is a good way to organise this right? Can you please indicate what exact commands I should be running?

Also, how do I call this? “manual download”?

Perhaps we can have an “Install via snap” header under “Linux” and then have an “Directly install juju binary”? I think it would be beneficial to align our instruction wording (for the binaries) with the tool installation instructions for k8s (e.g. https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/).

The only caveat here is that snap install juju gives you the latest stable out of the box whereas the binary installation instructions have to include the version (and be updated every time we change a minor version). However, the install from binary instructions are 2.9+. It would be great if launchpad could give us a magic link to grab the latest stable but unfortunately this functionality is not available to us.

@pedroleaoc I cleaned up this doc and added the manual binary installation steps for non-snap systems (the instruction format matches the one from the kubectl install guide).

I removed some bits (I don’t think that we should be mentioning juju 1.x at all). Please take a look and add any other bits you might feel that are relevant/missing.

I would be tempted to cut down all the stuff about curl from the section on installing from a binary.

There are a lot of valid ways to download and validate things from the downloads page. I think the only thing you really need are the instructions on unpacking the tarball and installing system wide.

(That said, if someone is installing from a binary, they might want to drop things into /opt instead, or just install in their $HOME dir. Anyone who wants to do something like that will probably know how to do so, however.)

Thanks, @achilleasa: that looks great.

I agree with @pengale, if someone understands how to install from a binary, they probably know the best practices or have a favourite way to do it.

I will leave this discussion open for a bit longer.

I disagree here.

In my view, if someone just hears about Juju and wants to try it out, they will first get to this page. If they can’t find the installation instructions for their particular distro they won’t even bother going to the download page to look for the binaries. They will just churm (I would when trying a new tool).

In addition, since we are especially targeting the cohort of k8s users, I thought it would be useful to follow the installation template used for kubectl. Unfortunately, we ship our binaries in .tar.xz which adds an extra step as opposed to kubectl where you just download the binary. Also, note that step 2 (validation) is optional so it’s pretty much a download/unpack/move binary to preferred location process (discourse messes up the indentation for the 1/2/3 bullets).

Finally, I believe that several users that would be interested in trying out Juju are running non-ubuntu distros and since we don’t provide debs anymore I think it makes sense to provide detailed instructions specifically for those users.