Does juju support 'named' interfaces?

James Westby james.westby at
Tue Jun 26 03:40:38 UTC 2012

On Mon, 25 Jun 2012 22:05:30 -0300, Sidnei da Silva <sidnei.da.silva at> wrote:
> So to be more specific, when I do:
>   juju add-relation my-app my-deployed-shard0
> ...where 'my-app' requires multiple pgsql backends (shard[0-N]) and
> 'my-deployed-shard0' would *have* to be used as 'shard0' by 'my-app',
> how does one structure this?

I haven't tried this, so it may be all lies, but:

your app could declare

       interface: postgres
       interface: postgres

and then it would have multiple named interfaces, which would be
handled by shardN-relation-* hooks (which could be symlinks to run the
same code and examine the interface to do the right thing in each case.)

When there are multiple interfaces on which two join two services can be
joined you can disambiguate, so it would be something like

  juju deploy myservice
  juju deploy postgresql shard0
  juju add-relation myservice:shard0 shard0

As I said, this is all speculation and it may be that disambiguation
doesn't work on differently named interfaces of the same type, but
different interface types.



More information about the Juju mailing list