What is the path to retrieve all of the current official juju charms?

Kapil Thangavelu kapil.thangavelu at canonical.com
Fri May 25 13:31:03 UTC 2012


On Fri, May 25, 2012 at 9:12 AM, Robert Steckroth <robertsteckroth at gmail.com
> wrote:

> Ya, that proved to be a simple learning experince, thank you. I have so
> many questions and it takes time to progress
> without timely answers. How about this one -->
>
> Which hooks run first or how do I specify an presidence. E.g. If I have
> a relation_changed hook which uses settings from a seperate charm, how do
> I ensure the remote units hook is run first so the primary has it's
> settings?
> In other words, how to I control the triggering mechanism?
>
>

you don't set or assume ordering in relation-hooks. its a distributed
system, and things can come up in different orders. instead you check for
state.

Running through an example, so say i've got a service A (db) with 1 unit
and a service B (app) with 1 unit and create a relation between them.

 service A's unit will execute the following when it 'sees' service B's
unit (or said another way service's B unit becomes available).

   <name>-relation-joined
   <name>-relation-changed

 service B's unit will execute the same hooks when it sees service A's unit.

The communication that takes places on a relation is typed/defined by it's
named interface. Taking a common example for a db and app relation, service
A (db) will create a database, user, password for service B (app) when it
sees the first unit of service B, and service B will read that data and
configure itself to use the db.

But say service B executes its relation-changed hook before service A has a
chance to set the username password. Service's B changed hook should check
for the existence of database, user, password in the relation state of
service A's unit.. ie. relation-get database.. If it doesn't exist, it
should just exit/short-circuit. When service A's unit sets these values,
then service B's unit changed hook will be invoked again.

an example in practice (see line 20)
http://jujucharms.com/charms/precise/wordpress/hooks/db-relation-changed

cheers,

Kapil












> On Fri, May 25, 2012 at 12:31 AM, Kapil Thangavelu
> <kapil.thangavelu at canonical.com> wrote:
> > afaicr, its path_to_directory_to_store_charms
> >
> > if your trying out juju you can just deploy a charm without fetching all
> of
> > them
> >
> >   $ juju deploy name_of_charm
> >
> > catalog of charms
> > http://jujucharms.com/charms/precise
> >
> > hth,
> >
> > kapil
> >
> > On Thu, May 24, 2012 at 11:38 AM, Robert Steckroth
> > <robertsteckroth at gmail.com> wrote:
> >>
> >> Hello, learning all about puppet and juju, (and ec2, jeesh),
> >> and can't seem to find the path/url for the --> charm getall [all
> charms]
> >> command. Can someone fill in this blank to retrieve all of the current
> >> official charms-->
> >>
> >> charm getall _____
> >>
> >> Note: I have the ppa for juju and tools already.
> >>
> >> --
> >> Bust0ut, Surgemcgee: Systems Engineer ---
> >> PBDefence.com
> >> BudTVNetwork.com
> >> RadioWeedShow.com
> >> "Bringing entertainment to Unix"
> >> "Finding the exit without looking"
> >>
> >> --
> >> Juju mailing list
> >> Juju at lists.ubuntu.com
> >> Modify settings or unsubscribe at:
> >> https://lists.ubuntu.com/mailman/listinfo/juju
> >
> >
>
>
>
> --
> Bust0ut, Surgemcgee: Systems Engineer ---
> PBDefence.com
> BudTVNetwork.com
> RadioWeedShow.com
> "Bringing entertainment to Unix"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20120525/11abf5fa/attachment.html>


More information about the Juju mailing list