Implementing Juju Actions

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Thu Mar 27 02:40:33 UTC 2014


Hey Bodie,

On Wed, Mar 26, 2014 at 9:22 PM, James Solomon <binary132 at gmail.com> wrote:
> Gustavo said we should start with charm/config.go, but as I'm looking
> through /cmd/juju/run.go, it looks almost like Actions should be implemented
> there.  I asked about this in freenode #juju-dev and dimitern confirmed what
> I was thinking (but again, I'm new to the project) -- this almost seems like
> it should be an API feature.
(...)
> Gustavo's indication was that we should be implementing this through hooks,
> so I'm at a loss here.  I agree with him that this is probably the best
> place to start.  Any input is welcome.  :)

>From a high-level perspective, the plan we discussed is:

1) Charm is designed with support for actions schema
2) Command is run: juju do <action> <parameters>
3) Client talks to the server, and enqueues actions
4) Unit agent take notice, pulls the first action from the queue
5) Unit agent runs hook, reports back
6) Client gets told outcome

I honestly don't even know what "using juju run" would mean in this
context, let alone why it would make more sense.

Can someone that understands the alternative please provide some
insight and reasoning comparing them?


gustavo @ http://niemeyer.net



More information about the Juju-dev mailing list