Does juju support 'named' interfaces?

Sidnei da Silva sidnei.da.silva at canonical.com
Tue Jun 26 03:24:49 UTC 2012


On Mon, Jun 25, 2012 at 10:33 PM, Robert Collins <robert at ubuntu.com> wrote:
> So there are two things here. Firstly, you don't need to fork a charm
> to name it differently, just supply a name. (The tutorial now shows
> this since I had the same confusion recently :P)).
>
> juju deploy charm nametocallitthistime.
>
> So you could do
> juju deploy charm pgsql shard0
> juju deploy charm pgsql shard1
> juju deploy charm pgsql shardN
>
> Then add-relation from those shards to whatever you have managing
> shards and let it decide where to map etc. Scaling up would be a
> matter of deploying another shard, adding a relation saying its a
> shard, and the rest should be automatic.

One thing that's not clear is if the service name is exposed in a way
that it can be used like that. From looking around seems like the
jenkins-slave charm exposes this name as 'slavehost' by doing
'slavehost=`echo ${JUJU_UNIT_NAME} | sed s,/,-,` then relation-set
slavehost=$slavehost.

> The other thing is units. Units represent horizontally scaling
> components that are homogeneous. So you could also model this as
> juju add-unit -n 3 pgsql
> to add three shards, and use the units as the thing you fan out
> amongst. I'd be inclined to try this way first, TBH.

Sure, for services that are already scalable like that or easily
turned into something scalable.

> That said,running persistent storage within juju is unclear to me
> today, given the lack of volume and snapshotting integration. I'd be
> strongly inclined to inject the data about your shards into juju using
> fake charms that just contain the metadata (through config.yaml files)
> about the real shards.

Exactly my plan. I think with that and something inspired by the
jenkins-slave charm (unless there's a more straightforward way to do
it) I can do what I want. Thanks!

-- 
Sidnei

Make the most of Ubuntu with Ubuntu One
http://one.ubuntu.com



More information about the Juju mailing list