Show Menu

Juju2 Cheat Sheet by

JuJu CLI Commands - based on https://pastebin.ubuntu.com/6849895/ - updated to version 2.x
juju

Setup

juju add-cloud
adds an cloud
juju add-cr­ede­ntials $cloud­name
adds login creden­tials to cloud
juju bootstrap $cloudname $contr­oll­ername
bootstrap an juju controller for juju cloud
juju debug-log
open this in another terminal or tab, so you can see what juju is doing while you type other commands)
juju debug-log --include unit-$­ser­vic­ena­me-­mac­hine#
just shows debug log for single unit

Using

juju add-model $model­name
adds an model
juju deploy $appli­cation $alias
deploy a service, alias is optional if you want to name it something. If you use aliases you need to refer to the service via the alias from then on: juju deploy mediawiki myawes­ome­wiki
juju add-ma­chine $machi­nename
add a machine
juju add-unit $servi­cename
add a unit
juju add-unit -n 10 $servi­cename
add 10 units.
juju status
shows what's going on
juju status $appli­cat­ion­name
shows you what's going for a particular server
juju ssh $appli­cat­ion­nam­e/m­ach­ine#
ssh to a unit, get the # from juju status
juju ssh machine#
ssh to a machine number or lxd container ( machin­e#/­lxd­/lxd#)

Bundle

juju quickstart bundle­:~a­ben­tle­y/w­iki­-bu­ndl­e/1­/wiki
Get the bundle address from jujuch­arm­s.com

Relations

juju add-re­lation $service1 $service2
relate two services
juju remove­-re­lation $service1 $service2
unrelate 2 services

Destroy / Remove Stuff

juju destro­y-c­ont­roller $contr­oll­er_­name
Destroy the Juju Controller
juju destro­y-model $model­_name
Destroy an juju model
juju remove­-ap­pli­cation $servi­cename
removes an applic­ation
juju remove­-unit $appli­cat­ion­nam­e/u­nit#
removes an unit
juju remove­-ma­chine machine#
removes an machine

Download the Juju2 Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/bl4ckb1rd1977_juju2.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.