Re: Get number of units

2016-03-02 Thread Charles Butler
Nice, I like this. +1 Marco If we have a "tips and tricks" page or charmer snippets, this should live there. Charles Butler - Juju Charmer Come see the future of modeling your datacenter: http://jujucharms.com On Wed, Mar 2, 2016 at 6:45 AM, Marco Ceppi

Re: Get number of units

2016-03-02 Thread Marco Ceppi
To answer your question anyways, you can do this with the peers relation: ``` metadata.yaml peers: cluster: interface: my-service-cluster ``` So, at anytime, in any hook you can do the following: ``` bash rid=$(relation-ids cluster) for unit in $(relation-list -r $rid); do echo

Re: Get number of units

2016-03-02 Thread Tom Barber
Scrap that, I have an alternative solution! -- Director Meteorite.bi - Saiku Analytics Founder Tel: +44(0)5603641316 (Thanks to the Saiku community we reached our Kickstart goal, but you can

Get number of units

2016-03-02 Thread Tom Barber
Morning I need to open an extra port for each unit in my charm, can I ask juju for a count of running units in a service? Thanks Tom -- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju