Show Menu
Cheatography

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

Setup

juju add-cloud
adds an cloud
juju add-cr­ede­ntials $cloudname
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 $modelname
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­omewiki
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­ionname
shows you what's going for a particular server
juju ssh $appli­cat­ion­nam­e/m­achine#
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/unit#
removes an unit
juju remove­-ma­chine machine#
removes an machine
 

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.