7

Is there a way with juju commands to clear the juju charm cache for a particular charm from a running bootstrap node?

I'm writing a charm and for during development when I've made changes to a charm but don't commit a revision update I want to be able to iterate quicker.

Jorge Castro
  • 71,754

2 Answers2

6

You can use the -u option to juju deploy to speed iteration during development of your charms:

  -u, --upgrade         Deploy the charm on disk, increments revision if
                        needed

e.g.,

juju deploy -u charm-name
sarnold
  • 1,841
  • 17
  • 20
  • Does this actually force juju's charm cache to clear itself? For example, I tried the -u switch after rewriting a charm and resetting its revision 0. Juju kept using its cached version and would not take my new version from disk. – mars Mar 29 '13 at 15:53
  • It doesn't clear the cache, but it should force the updated version to be deployed... – sarnold Apr 03 '13 at 04:41
1

I recently tried this and got:

$ juju deploy -u --repository=./charms local:trusty/node-app openmotion

Added charm "local:trusty/node-app-24" to the environment. --upgrade (or -u) is deprecated and ignored; charms are always deployed with a unique revision.`

So it seems -u is no longer necessary, at least as of juju 1.18.

achiang
  • 3,978