Defining service-unit level relationships in charms

Bruno Girin brunogirin at gmail.com
Mon Nov 5 09:00:30 UTC 2012


Denis,

You could do that by deploying individual services:

juju deploy ServiceA ServiceA-unit-1
juju deploy ServiceA ServiceA-unit-2
juju deploy ServiceA ServiceA-unit-3

juju deploy ServiceB ServiceB-unit-1
juju deploy ServiceB ServiceB-unit-2
juju deploy ServiceB ServiceB-unit-3

juju add-relation ServiceA-unit-1 ServiceB-unit1
juju add-relation ServiceA-unit-1 ServiceB-unit2
...

But of course that is very long-winded and not very scalable. Why do you
want to do this in the first place? There may be an easier way to
achieve the final goal than decomposing the unit relationship.

Cheers,

Bruno

On 05/11/12 02:03, Denis Weerasiri wrote:
> I suppose using hook commands (like relation-get ip), I can get some
> notion of the other side of the relation. 
> But still I think it's impossible to define a restricted relationship
> such as ServiceA-Unit-1 should only relate with ServiceB-Unit-1
> and ServiceB-Unit-2, but not with ServiceB-Unit-3.
>
> On Mon, Nov 5, 2012 at 12:10 PM, Denis Weerasiri
> <ddweerasiri at gmail.com <mailto:ddweerasiri at gmail.com>> wrote:
>
>     Hi,
>     I'm trying to analyse the charm specification. Suppose there are
>     two services (ServiceA and ServiceB) where ServiceA /require /2
>     service-units of ServiceB. In such a deployment  is it possible to
>     define ServiceA-Unit-1 should relate to ServiceB-Unit-1
>     and ServiceB-Unit-2 (as I have sketched below)?. 
>     Inline image 1
>
>     -- 
>     Thanks,
>     Denis
>     ----------------------------------------------------------
>     *Denis Weerasiri*
>     *
>     *
>     /site: //https://sites.google.com/site/ddweerasiri//
>     /blog: //http://ddweerasiri.blogspot.com/
>     <http://ddweerasiri.blogspot.com/>/
>     twitter: //http://twitter.com/ddweerasiri//
>     linked-in: //http://lk.linkedin.com/in/ddweerasiri/
>
>
>
>
> -- 
> Thanks,
> Denis
> ----------------------------------------------------------
> *Denis Weerasiri*
> *
> *
> /site: //https://sites.google.com/site/ddweerasiri//
> /blog: //http://ddweerasiri.blogspot.com/
> <http://ddweerasiri.blogspot.com/>/
> twitter: //http://twitter.com/ddweerasiri//
> linked-in: //http://lk.linkedin.com/in/ddweerasiri/
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20121105/b2a944fa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 15020 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/juju/attachments/20121105/b2a944fa/attachment-0001.png>


More information about the Juju mailing list