Defining service-unit level relationships in charms

Denis Weerasiri ddweerasiri at gmail.com
Fri Nov 9 01:03:01 UTC 2012


On Mon, Nov 5, 2012 at 8:00 PM, Bruno Girin <brunogirin at gmail.com> wrote:

>  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.
>
Hi folks,
Sorry for the delay.
I was thinking of this service topology with the consideration
of geographic location of each service unit.

   1. Suppose ServiceA is a application server and ServiceB is a data
   source.
   2. So each application server is suppose to write to two data source
   nodes (primary and backup) which are deployed in two geographic locations.

So in that case don't we need to declare service-unit level 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>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)?.
>>  [image: Inline image 1]
>>
>>  --
>> Thanks,
>> Denis
>> ----------------------------------------------------------
>> *Denis Weerasiri*
>> *
>> *
>> *site: **https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
>> *blog: **http://ddweerasiri.blogspot.com*<http://ddweerasiri.blogspot.com/>
>> *
>> twitter: **http://twitter.com/ddweerasiri*<http://twitter.com/ddweerasiri>
>> *
>> linked-in: **http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>
>>
>>
>
>
>  --
> Thanks,
> Denis
> ----------------------------------------------------------
> *Denis Weerasiri*
> *
> *
> *site: **https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
> *blog: **http://ddweerasiri.blogspot.com*<http://ddweerasiri.blogspot.com/>
> *
> twitter: **http://twitter.com/ddweerasiri*<http://twitter.com/ddweerasiri>
> *
> linked-in: **http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>
>
>
>
>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>


-- 
Thanks,
Denis
----------------------------------------------------------
*Denis Weerasiri*
*
*
 <http://wso2.com/>**** <http://wso2.com/>*site: **
https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
*blog: **http://ddweerasiri.blogspot.com* <http://ddweerasiri.blogspot.com/>
*
twitter: **http://twitter.com/ddweerasiri* <http://twitter.com/ddweerasiri>*
linked-in: **http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20121109/d9de8b3f/attachment.html>


More information about the Juju mailing list