Relation's need config too
Gustavo Niemeyer
gustavo.niemeyer at canonical.com
Thu Jul 19 13:04:33 UTC 2012
On Thu, Jul 19, 2012 at 9:43 AM, Sidnei da Silva
<sidnei.da.silva at canonical.com> wrote:
> True, but not intentionally. Also you already said that "The service
> *name* shouldn't be used in the charm implementation."
> (https://lists.ubuntu.com/archives/juju/2012-June/001708.html).
Yeah, I wasn't suggesting that. If you associate a shard id with the
database itself in its configuration, it can report to whoever
connects to it.
> In staging for example, we have the same postgresql instance handling
> all the shards, so there we'd have:
>
> juju deploy pgsql staging-db
> juju deploy service1
> juju deploy service2
> juju add-relation staging-db service1 shard_id=1
> juju add-relation staging-db service1 shard_id=2
> juju add-relation staging-db service2 shard_id=1
> juju add-relation staging-db service2 shard_id=2
This would be one way to do it, but the same idea might work here too:
juju set staging-db shard-id=1,2
gustavo @ http://niemeyer.net
More information about the Juju
mailing list