Re: Dependency engine in the machine agent

2016-03-02 Thread Menno Smits
On 3 March 2016 at 10:54, Tim Penhey  wrote:

> Thanks Menno. That was very helpful.
>
> Apart from state connections, or api connections, what sort of resources
> are shared between workers?
>

Right now we have:

   - the agent manifold which outputs an Agent interface. This is used by
   many manifolds to access the agent's configuration.
   - the leadership manifold which outputs a leadership tracker for workers
   which need participate in leader elections.
   - the statetracker manifold which emits a boolean indicating whether a
   machine agent should be a state server (this is consumed by the state
   manifold).
   - a few manifolds which are used for synchronisation across workers
   (e.g. signalling when upgrades are complete)

There will be more resources added, including those to affect worker
behaviour for model migrations.

- Menno
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


[Review Queue]

2016-03-02 Thread Adam Israel
Memcached

I reviewed two memcached-related proposals today, the former unblocking the
latter.

Allow memcached connections from non-related units:
https://code.launchpad.net/~freyes/charms/trusty/memcached/lp1525026/+merge/287213

Add support for local-monitor interface.

My only note here is that we'd really like to see tests added to cover new
functionality. It's not (currently) a blocker, but as a good practice we
should all take the time to write tests for our code (in a perfect world, I
know).

https://code.launchpad.net/~brad-marshall/charms/trusty/memcached/add-monitors-relation/+merge/276958

Both have my +1 and have been merged.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Dependency engine in the machine agent

2016-03-02 Thread Tim Penhey
Thanks Menno. That was very helpful.

Apart from state connections, or api connections, what sort of resources
are shared between workers?

Tim

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Dependency engine in the machine agent

2016-03-02 Thread Menno Smits
Hi everyone,

One of the pieces of the puzzle required for model migrations was to get
all the workers in the machine agent running under the new dependency
engine framework. It will allow us to cleanly shut down workers so that a
model to migrated can settle to a stable, "read-only" mode. This has been a
major focus for team Onyx and Will.

If you're not sure what the dependency engine is all about, a good place to
start is Will's excellent documentation in the source tree:

https://github.com/juju/juju/blob/master/worker/dependency/doc.go

The tl;dr is that the dependency engine provides a framework where workers
are wrapped in a "manifold" which describes the resources the worker
depends on, a function to start the worker and (optionally) a function
which makes resources available to other manifolds/workers. In the context
of the dependency engine framework, a "resource" is any value that is
exported by a manifold for use by other manifolds.

All the manifolds for an agent are registered with a dependency engine
which then starts, stops and restarts workers based on the availability of
their configured inputs (i.e. dependencies) and worker behaviour (i.e. when
they exit and the errors they exit with).

One nice property of the dependency engine framework is that it makes it
very clear what a worker depends on and how it starts. The machine agent
has become a complex hierarchy of runners and workers with sometimes
non-obvious interactions between them. When the machine agent was younger
and simpler the "nested runners" architecture was elegant and appropriate,
but as more demands have been put on the machine agent it's become almost
unmanageable. Fixing this wasn't the main driver for moving the machine
agent to the dependency engine framework but it's been a side benefit.

The machine agent dependency engine work has also meant that code to set up
and start specific workers has been moved out of the machine agent itself
to worker-specific packages, meaning everything to do with a worker is
located together, and the machine agent's implementation is becoming
clearer and more concise. Testing of workers and the agent has also become
more straightforward and more robust.

So where are things now? Before Onyx started doing this work on the machine
agent, the unit agent was already completely converted to use the
dependency engine for its workers - a unit agent runs far fewer workers so
it was a good place to start. Much of the conversion work for the machine
agent has already landed in master and there's several feature branches at
varying levels of completion that cover most of the remaining work.
Specifically the following areas have been converted:

   - a manifold which manages the API connection
   - most of the (many!) workers which depend on the API connection
   - the base workers which manage a State instance (state servers only)
   - some of the workers which depend on State

What does this mean for Juju developers? If you're adding a new worker to
the machine (or unit) agent you'll need to create a manifold for it and
integrate it with the agent's dependency engine. Similarly if you're making
changes to an existing worker, it's likely to have already been converted
so you'll need to understand how manifolds and the dependency engine work.

If you're not sure about something dependency engine related, please feel
free to ask Will, Jesse or me. There's an initial learning curve but it's
great once you get basic concepts straight. Aside from the docs (linked
above), there's also lots of examples to study. Any worker package you find
in the source with a manifold.go file has been converted.

- Menno
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


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 
wrote:

> 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 "It's a  peer and confidant $unit"
> done
> ```
>
> However, since Juju gives unique numbers for each unit, you could use a
> units number to enumerate a port. You wouldn't need the peer relationship
> for this directly. As an example
>
> ``` bash
> port_start=4000
> port=$(expr $port_start + ${JUJU_UNIT_NAME##*/})
> ```
>
> So if it's unit/0 you'll get 4000, if it's unit/10 you'll get 4010, etc.
> Since unit numbers are unique in Juju you'll never get a conflict.
>
> Marco Ceppi
>
> On Wed, Mar 2, 2016 at 6:29 AM Tom Barber  wrote:
>
>> 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 always help by sponsoring the project
>> )
>>
>> On 2 March 2016 at 11:22, Tom Barber  wrote:
>>
>>> 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
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju GUI 2.0

2016-03-02 Thread Uros Jovanovic
There are bugs, esp. with the environment switching, but that's why it's
still beta ;)

On Wed, Mar 2, 2016 at 1:17 PM, Marco Ceppi 
wrote:

> Thanks Uros,
>
> I just deployed and tested, seems to work now. Thanks for getting a beta
> out to try!
>
> Marco
>
> On Wed, Mar 2, 2016 at 7:12 AM Uros Jovanovic <
> uros.jovano...@canonical.com> wrote:
>
>> The message should switch to "juju show-controller --include-passwords"
>> when in juju 2.0.
>>
>> On Wed, Mar 2, 2016 at 1:10 PM, Marco Ceppi 
>> wrote:
>>
>>> Hi Uros,
>>>
>>> I've deployed this, but `api-info` isn't a command anymore in 2.0 How do
>>> we get the admin-secret/password for the admin (or any) user?
>>>
>>> Marco
>>>
>>>
>>> On Wed, Mar 2, 2016 at 7:03 AM Uros Jovanovic <
>>> uros.jovano...@canonical.com> wrote:
>>>
 Hey Tom.

 You can try the latest in cs:~yellow/trusty/juju-gui (
 https://jujucharms.com/u/yellow/juju-gui).

 All feedback welcome at https://github.com/juju/juju-gui/issues .

 Cheers.

 On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber 
 wrote:

> Hey Uros,
>
> Did that beta get cut? I forgot to check
>
> Thanks
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 1 March 2016 at 09:39, Tom Barber  wrote:
>
>> Hey Uros,
>>
>> No worries, let me know when there's something I can take for a spin!
>>
>> Cheers
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 1 March 2016 at 08:39, Uros Jovanovic <
>> uros.jovano...@canonical.com> wrote:
>>
>>> Hey, sorry we didn't come to cut the release, found out some late
>>> time branches that needed to land first. We'll do a beta release today, 
>>> if
>>> that's still ok with you.
>>>
>>>
>>>
>>> On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber <
>>> t...@analytical-labs.com> wrote:
>>>
 Cool that's fine.  Just after the gui to give people a graphical
 representation of what's deployed.

 Cheers

 Tom
 On 28 Feb 2016 10:03, "Uros Jovanovic" <
 uros.jovano...@canonical.com> wrote:

> There's no option from the GUI to create LXDs (just LXC), but all
> the other visual aspects should work just fine.
>
> On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber <
> t...@analytical-labs.com> wrote:
>
>> Thanks! Doesn't work on LXD at all? Or works enough to
>> graphically show the charm list and relations?
>> On 28 Feb 2016 09:50, "Uros Jovanovic" <
>> uros.jovano...@canonical.com> wrote:
>>
>>> Hi Tom,
>>>
>>> We'll be cutting 2.1 release in the following days. Version 2.1
>>> of GUI supports juju 2.0. I'll try to cut beta today and will let 
>>> you know.
>>> One thing of note, currently GUI does not support LXDs, those will 
>>> have to
>>> be deployed over CLI.
>>>
>>> Cheers.
>>>
>>>
>>> On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
>>> t...@analytical-labs.com> wrote:
>>>
 Hello folks

 Is there a gui build that allows logins on 2.0 latest trunk
 build?

 I dont' need anything really functional if it doesn't work, but
 I was going to do a few videos of Juju 2, LXD containers and BI 
 stuff
 tomorrow and the GUI is obviously a nicer way to show state to 
 people. If
 it doesn't exist, no worries, I'll just use the shell instead!

 Cheers

 Tom

 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju


>>>
>
 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju

Re: Juju GUI 2.0

2016-03-02 Thread Marco Ceppi
Thanks Uros,

I just deployed and tested, seems to work now. Thanks for getting a beta
out to try!

Marco

On Wed, Mar 2, 2016 at 7:12 AM Uros Jovanovic 
wrote:

> The message should switch to "juju show-controller --include-passwords"
> when in juju 2.0.
>
> On Wed, Mar 2, 2016 at 1:10 PM, Marco Ceppi 
> wrote:
>
>> Hi Uros,
>>
>> I've deployed this, but `api-info` isn't a command anymore in 2.0 How do
>> we get the admin-secret/password for the admin (or any) user?
>>
>> Marco
>>
>>
>> On Wed, Mar 2, 2016 at 7:03 AM Uros Jovanovic <
>> uros.jovano...@canonical.com> wrote:
>>
>>> Hey Tom.
>>>
>>> You can try the latest in cs:~yellow/trusty/juju-gui (
>>> https://jujucharms.com/u/yellow/juju-gui).
>>>
>>> All feedback welcome at https://github.com/juju/juju-gui/issues .
>>>
>>> Cheers.
>>>
>>> On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber 
>>> wrote:
>>>
 Hey Uros,

 Did that beta get cut? I forgot to check

 Thanks

 Tom

 --

 Director Meteorite.bi - Saiku Analytics Founder
 Tel: +44(0)5603641316

 (Thanks to the Saiku community we reached our Kickstart
 
 goal, but you can always help by sponsoring the project
 )

 On 1 March 2016 at 09:39, Tom Barber  wrote:

> Hey Uros,
>
> No worries, let me know when there's something I can take for a spin!
>
> Cheers
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 1 March 2016 at 08:39, Uros Jovanovic  > wrote:
>
>> Hey, sorry we didn't come to cut the release, found out some late
>> time branches that needed to land first. We'll do a beta release today, 
>> if
>> that's still ok with you.
>>
>>
>>
>> On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber > > wrote:
>>
>>> Cool that's fine.  Just after the gui to give people a graphical
>>> representation of what's deployed.
>>>
>>> Cheers
>>>
>>> Tom
>>> On 28 Feb 2016 10:03, "Uros Jovanovic" 
>>> wrote:
>>>
 There's no option from the GUI to create LXDs (just LXC), but all
 the other visual aspects should work just fine.

 On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber <
 t...@analytical-labs.com> wrote:

> Thanks! Doesn't work on LXD at all? Or works enough to graphically
> show the charm list and relations?
> On 28 Feb 2016 09:50, "Uros Jovanovic" <
> uros.jovano...@canonical.com> wrote:
>
>> Hi Tom,
>>
>> We'll be cutting 2.1 release in the following days. Version 2.1
>> of GUI supports juju 2.0. I'll try to cut beta today and will let 
>> you know.
>> One thing of note, currently GUI does not support LXDs, those will 
>> have to
>> be deployed over CLI.
>>
>> Cheers.
>>
>>
>> On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
>> t...@analytical-labs.com> wrote:
>>
>>> Hello folks
>>>
>>> Is there a gui build that allows logins on 2.0 latest trunk
>>> build?
>>>
>>> I dont' need anything really functional if it doesn't work, but
>>> I was going to do a few videos of Juju 2, LXD containers and BI 
>>> stuff
>>> tomorrow and the GUI is obviously a nicer way to show state to 
>>> people. If
>>> it doesn't exist, no worries, I'll just use the shell instead!
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>

>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>
>

>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju GUI 2.0

2016-03-02 Thread Uros Jovanovic
The message should switch to "juju show-controller --include-passwords"
when in juju 2.0.

On Wed, Mar 2, 2016 at 1:10 PM, Marco Ceppi 
wrote:

> Hi Uros,
>
> I've deployed this, but `api-info` isn't a command anymore in 2.0 How do
> we get the admin-secret/password for the admin (or any) user?
>
> Marco
>
>
> On Wed, Mar 2, 2016 at 7:03 AM Uros Jovanovic <
> uros.jovano...@canonical.com> wrote:
>
>> Hey Tom.
>>
>> You can try the latest in cs:~yellow/trusty/juju-gui (
>> https://jujucharms.com/u/yellow/juju-gui).
>>
>> All feedback welcome at https://github.com/juju/juju-gui/issues .
>>
>> Cheers.
>>
>> On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber 
>> wrote:
>>
>>> Hey Uros,
>>>
>>> Did that beta get cut? I forgot to check
>>>
>>> Thanks
>>>
>>> Tom
>>>
>>> --
>>>
>>> Director Meteorite.bi - Saiku Analytics Founder
>>> Tel: +44(0)5603641316
>>>
>>> (Thanks to the Saiku community we reached our Kickstart
>>> 
>>> goal, but you can always help by sponsoring the project
>>> )
>>>
>>> On 1 March 2016 at 09:39, Tom Barber  wrote:
>>>
 Hey Uros,

 No worries, let me know when there's something I can take for a spin!

 Cheers

 Tom

 --

 Director Meteorite.bi - Saiku Analytics Founder
 Tel: +44(0)5603641316

 (Thanks to the Saiku community we reached our Kickstart
 
 goal, but you can always help by sponsoring the project
 )

 On 1 March 2016 at 08:39, Uros Jovanovic 
 wrote:

> Hey, sorry we didn't come to cut the release, found out some late time
> branches that needed to land first. We'll do a beta release today, if
> that's still ok with you.
>
>
>
> On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber 
> wrote:
>
>> Cool that's fine.  Just after the gui to give people a graphical
>> representation of what's deployed.
>>
>> Cheers
>>
>> Tom
>> On 28 Feb 2016 10:03, "Uros Jovanovic" 
>> wrote:
>>
>>> There's no option from the GUI to create LXDs (just LXC), but all
>>> the other visual aspects should work just fine.
>>>
>>> On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber <
>>> t...@analytical-labs.com> wrote:
>>>
 Thanks! Doesn't work on LXD at all? Or works enough to graphically
 show the charm list and relations?
 On 28 Feb 2016 09:50, "Uros Jovanovic" <
 uros.jovano...@canonical.com> wrote:

> Hi Tom,
>
> We'll be cutting 2.1 release in the following days. Version 2.1 of
> GUI supports juju 2.0. I'll try to cut beta today and will let you 
> know.
> One thing of note, currently GUI does not support LXDs, those will 
> have to
> be deployed over CLI.
>
> Cheers.
>
>
> On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
> t...@analytical-labs.com> wrote:
>
>> Hello folks
>>
>> Is there a gui build that allows logins on 2.0 latest trunk build?
>>
>> I dont' need anything really functional if it doesn't work, but I
>> was going to do a few videos of Juju 2, LXD containers and BI stuff
>> tomorrow and the GUI is obviously a nicer way to show state to 
>> people. If
>> it doesn't exist, no worries, I'll just use the shell instead!
>>
>> Cheers
>>
>> Tom
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>
>>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>

>>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju GUI 2.0

2016-03-02 Thread Marco Ceppi
Hi Uros,

I've deployed this, but `api-info` isn't a command anymore in 2.0 How do we
get the admin-secret/password for the admin (or any) user?

Marco

On Wed, Mar 2, 2016 at 7:03 AM Uros Jovanovic 
wrote:

> Hey Tom.
>
> You can try the latest in cs:~yellow/trusty/juju-gui (
> https://jujucharms.com/u/yellow/juju-gui).
>
> All feedback welcome at https://github.com/juju/juju-gui/issues .
>
> Cheers.
>
> On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber 
> wrote:
>
>> Hey Uros,
>>
>> Did that beta get cut? I forgot to check
>>
>> Thanks
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 1 March 2016 at 09:39, Tom Barber  wrote:
>>
>>> Hey Uros,
>>>
>>> No worries, let me know when there's something I can take for a spin!
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> --
>>>
>>> Director Meteorite.bi - Saiku Analytics Founder
>>> Tel: +44(0)5603641316
>>>
>>> (Thanks to the Saiku community we reached our Kickstart
>>> 
>>> goal, but you can always help by sponsoring the project
>>> )
>>>
>>> On 1 March 2016 at 08:39, Uros Jovanovic 
>>> wrote:
>>>
 Hey, sorry we didn't come to cut the release, found out some late time
 branches that needed to land first. We'll do a beta release today, if
 that's still ok with you.



 On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber 
 wrote:

> Cool that's fine.  Just after the gui to give people a graphical
> representation of what's deployed.
>
> Cheers
>
> Tom
> On 28 Feb 2016 10:03, "Uros Jovanovic" 
> wrote:
>
>> There's no option from the GUI to create LXDs (just LXC), but all the
>> other visual aspects should work just fine.
>>
>> On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber > > wrote:
>>
>>> Thanks! Doesn't work on LXD at all? Or works enough to graphically
>>> show the charm list and relations?
>>> On 28 Feb 2016 09:50, "Uros Jovanovic" 
>>> wrote:
>>>
 Hi Tom,

 We'll be cutting 2.1 release in the following days. Version 2.1 of
 GUI supports juju 2.0. I'll try to cut beta today and will let you 
 know.
 One thing of note, currently GUI does not support LXDs, those will 
 have to
 be deployed over CLI.

 Cheers.


 On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
 t...@analytical-labs.com> wrote:

> Hello folks
>
> Is there a gui build that allows logins on 2.0 latest trunk build?
>
> I dont' need anything really functional if it doesn't work, but I
> was going to do a few videos of Juju 2, LXD containers and BI stuff
> tomorrow and the GUI is obviously a nicer way to show state to 
> people. If
> it doesn't exist, no worries, I'll just use the shell instead!
>
> Cheers
>
> Tom
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>

>>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>

>>>
>>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju GUI 2.0

2016-03-02 Thread Tom Barber
Thanks I'll give it a spin!
On 2 Mar 2016 12:03, "Uros Jovanovic"  wrote:

> Hey Tom.
>
> You can try the latest in cs:~yellow/trusty/juju-gui (
> https://jujucharms.com/u/yellow/juju-gui).
>
> All feedback welcome at https://github.com/juju/juju-gui/issues .
>
> Cheers.
>
> On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber 
> wrote:
>
>> Hey Uros,
>>
>> Did that beta get cut? I forgot to check
>>
>> Thanks
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 1 March 2016 at 09:39, Tom Barber  wrote:
>>
>>> Hey Uros,
>>>
>>> No worries, let me know when there's something I can take for a spin!
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> --
>>>
>>> Director Meteorite.bi - Saiku Analytics Founder
>>> Tel: +44(0)5603641316
>>>
>>> (Thanks to the Saiku community we reached our Kickstart
>>> 
>>> goal, but you can always help by sponsoring the project
>>> )
>>>
>>> On 1 March 2016 at 08:39, Uros Jovanovic 
>>> wrote:
>>>
 Hey, sorry we didn't come to cut the release, found out some late time
 branches that needed to land first. We'll do a beta release today, if
 that's still ok with you.



 On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber 
 wrote:

> Cool that's fine.  Just after the gui to give people a graphical
> representation of what's deployed.
>
> Cheers
>
> Tom
> On 28 Feb 2016 10:03, "Uros Jovanovic" 
> wrote:
>
>> There's no option from the GUI to create LXDs (just LXC), but all the
>> other visual aspects should work just fine.
>>
>> On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber > > wrote:
>>
>>> Thanks! Doesn't work on LXD at all? Or works enough to graphically
>>> show the charm list and relations?
>>> On 28 Feb 2016 09:50, "Uros Jovanovic" 
>>> wrote:
>>>
 Hi Tom,

 We'll be cutting 2.1 release in the following days. Version 2.1 of
 GUI supports juju 2.0. I'll try to cut beta today and will let you 
 know.
 One thing of note, currently GUI does not support LXDs, those will 
 have to
 be deployed over CLI.

 Cheers.


 On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
 t...@analytical-labs.com> wrote:

> Hello folks
>
> Is there a gui build that allows logins on 2.0 latest trunk build?
>
> I dont' need anything really functional if it doesn't work, but I
> was going to do a few videos of Juju 2, LXD containers and BI stuff
> tomorrow and the GUI is obviously a nicer way to show state to 
> people. If
> it doesn't exist, no worries, I'll just use the shell instead!
>
> Cheers
>
> Tom
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>

>>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>

>>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju GUI 2.0

2016-03-02 Thread Uros Jovanovic
Hey Tom.

You can try the latest in cs:~yellow/trusty/juju-gui (
https://jujucharms.com/u/yellow/juju-gui).

All feedback welcome at https://github.com/juju/juju-gui/issues .

Cheers.

On Wed, Mar 2, 2016 at 12:17 PM, Tom Barber  wrote:

> Hey Uros,
>
> Did that beta get cut? I forgot to check
>
> Thanks
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 1 March 2016 at 09:39, Tom Barber  wrote:
>
>> Hey Uros,
>>
>> No worries, let me know when there's something I can take for a spin!
>>
>> Cheers
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 1 March 2016 at 08:39, Uros Jovanovic 
>> wrote:
>>
>>> Hey, sorry we didn't come to cut the release, found out some late time
>>> branches that needed to land first. We'll do a beta release today, if
>>> that's still ok with you.
>>>
>>>
>>>
>>> On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber 
>>> wrote:
>>>
 Cool that's fine.  Just after the gui to give people a graphical
 representation of what's deployed.

 Cheers

 Tom
 On 28 Feb 2016 10:03, "Uros Jovanovic" 
 wrote:

> There's no option from the GUI to create LXDs (just LXC), but all the
> other visual aspects should work just fine.
>
> On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber 
> wrote:
>
>> Thanks! Doesn't work on LXD at all? Or works enough to graphically
>> show the charm list and relations?
>> On 28 Feb 2016 09:50, "Uros Jovanovic" 
>> wrote:
>>
>>> Hi Tom,
>>>
>>> We'll be cutting 2.1 release in the following days. Version 2.1 of
>>> GUI supports juju 2.0. I'll try to cut beta today and will let you know.
>>> One thing of note, currently GUI does not support LXDs, those will have 
>>> to
>>> be deployed over CLI.
>>>
>>> Cheers.
>>>
>>>
>>> On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber <
>>> t...@analytical-labs.com> wrote:
>>>
 Hello folks

 Is there a gui build that allows logins on 2.0 latest trunk build?

 I dont' need anything really functional if it doesn't work, but I
 was going to do a few videos of Juju 2, LXD containers and BI stuff
 tomorrow and the GUI is obviously a nicer way to show state to people. 
 If
 it doesn't exist, no worries, I'll just use the shell instead!

 Cheers

 Tom

 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju


>>>
>
 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju


>>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Migration of OpenStack Charm development to OpenStack git/gerrit

2016-03-02 Thread James Page
Hi All

The majority of existing commiters for the openstack charms now have the
required privileges
on OpenStack's Gerrit review system to +2 review and approve changes for
final gating and landing.

Charm CI is now executing against proposed changes; please ensure that
these have completed successfully prior to approving changes for landing
(they won't block gating just yet).  This includes an amulet smoke test
right now - Ryan is working on integrating a full amulet test set into the
pipeline based on a core-reviewer +2, prior to final approval for landing.

A reverse mirror of git repositories and branches has been setup from
github -> launchpad so the existing branches under ~openstack-charmers will
be relatively current with the new git repositories.  One niggle is that
swift-proxy has a commit that bzr fast-import does not like, so the branch
has to be created in a different way to the others which means its no
longer a valid parent for any existing swift-proxy bzr branches on
launchpad.  These branches are mainly to support ingestion into the
charm-store (which will be superseded at some point in time with charm
publish) and to help smooth migration of existing bundles and tools to git
use.

All of the original charm branches can be found under the
~openstack-charmers-archive team on Launchpad if you need them for
reference:

  https://code.launchpad.net/~openstack-charmers-archive

Please don't raise merge-proposals against the bzr branches; we'll have
something in place soon-ish to auto-comment on proposed merges redirecting
people to use the new development workflow.

Regards

James

On Tue, 1 Mar 2016 at 07:59 James Page  wrote:

> After some poking of the infratructure team this morning, migration is
> currently underway; please don't land any new changes into the bzr branches
> on LP; in-flight work will need to be re-targetted to git/gerrit once the
> migration is complete, we've re-targetted UOSCI at gerrit for amulet
> testing and I've got all of the group configuration finished in gerrit for
> existing committers.
>
> On Mon, 29 Feb 2016 at 11:50 James Page  wrote:
>
>> Just as a reminder that we're still aiming to undertake this migration
>> today.
>>
>> On Fri, 19 Feb 2016 at 13:50 James Page  wrote:
>>>
 Hi All

 As you may or may not be aware, the OpenStack team have been working
 towards migration of the development process around the OpenStack charms to
 the OpenStack project.

 This means we will be moving away from current the bzr/launchpad
 workflow to a git/gerrit workflow inline with most other OpenStack 
 projects.


 Bugs will still be managed on launchpad - this just relates to VCS and
 associated review process.

 Please take time to read the upstream development documentation prior
 to the switch over; there are some steps you will need to take to be able
 to work with the new tools and workflow including signing up for membership
 of the OpenStack Foundation and getting things set-up in gerrit:

  http://docs.openstack.org/infra/manual/developers.html
 

 The scope of the migration can been seen on the github mirror of the
 current bzr branches:

  https://github.com/openstack-charmers

 In order to de-risk the migration and allow time to migrate all
 associated tooling and configurations (such as mojo specs, bundles, amulet
 tests etc…) to use git, we’ll be putting in place a mirror process which
 will sync the charms once in their new home on git back to the current set
 of branches in launchpad; This means that everything that works today
 should continue to work!

 Once we’ve completed the switch over, lint and unit tests will be
 executed on OpenStack infrastructure and amulet tests will continue to be
 executed within the OSCI lab at Canonical.

 We will be altering the gating process slightly - initially we’ll run a
 subset of amulet tests to provide immediate feedback to the
 contributor/reviewers; the full set of amulet tests will be executed once a
 reviewer has +2’ed the review prior to final landing.

 Code will be automatically landed by the OpenStack development process
 - no need to complete manual merges any longer!


 We’ll still be maintaining separate development and stable charms -
 you’ll find the development charm in the master branch in the git
 repositories, and the stable charm in the stable branch.

 All of this will be documented here:


 https://github.com/openstack-charmers/openstack-community/blob/master/README.dev-charms.md

 The current target for switch over is Monday the 29th February.

 Regards

 James

 pp OpenStack Engineering team



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 "It's a  peer and confidant $unit"
done
```

However, since Juju gives unique numbers for each unit, you could use a
units number to enumerate a port. You wouldn't need the peer relationship
for this directly. As an example

``` bash
port_start=4000
port=$(expr $port_start + ${JUJU_UNIT_NAME##*/})
```

So if it's unit/0 you'll get 4000, if it's unit/10 you'll get 4010, etc.
Since unit numbers are unique in Juju you'll never get a conflict.

Marco Ceppi

On Wed, Mar 2, 2016 at 6:29 AM Tom Barber  wrote:

> 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 always help by sponsoring the project
> )
>
> On 2 March 2016 at 11:22, Tom Barber  wrote:
>
>> 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
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


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 always help by sponsoring the project
)

On 2 March 2016 at 11:22, Tom Barber  wrote:

> 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


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


Re: Juju GUI 2.0

2016-03-02 Thread Tom Barber
Hey Uros,

Did that beta get cut? I forgot to check

Thanks

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart

goal, but you can always help by sponsoring the project
)

On 1 March 2016 at 09:39, Tom Barber  wrote:

> Hey Uros,
>
> No worries, let me know when there's something I can take for a spin!
>
> Cheers
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 1 March 2016 at 08:39, Uros Jovanovic 
> wrote:
>
>> Hey, sorry we didn't come to cut the release, found out some late time
>> branches that needed to land first. We'll do a beta release today, if
>> that's still ok with you.
>>
>>
>>
>> On Sun, Feb 28, 2016 at 11:05 AM, Tom Barber 
>> wrote:
>>
>>> Cool that's fine.  Just after the gui to give people a graphical
>>> representation of what's deployed.
>>>
>>> Cheers
>>>
>>> Tom
>>> On 28 Feb 2016 10:03, "Uros Jovanovic" 
>>> wrote:
>>>
 There's no option from the GUI to create LXDs (just LXC), but all the
 other visual aspects should work just fine.

 On Sun, Feb 28, 2016 at 11:00 AM, Tom Barber 
 wrote:

> Thanks! Doesn't work on LXD at all? Or works enough to graphically
> show the charm list and relations?
> On 28 Feb 2016 09:50, "Uros Jovanovic" 
> wrote:
>
>> Hi Tom,
>>
>> We'll be cutting 2.1 release in the following days. Version 2.1 of
>> GUI supports juju 2.0. I'll try to cut beta today and will let you know.
>> One thing of note, currently GUI does not support LXDs, those will have 
>> to
>> be deployed over CLI.
>>
>> Cheers.
>>
>>
>> On Sun, Feb 28, 2016 at 10:40 AM, Tom Barber > > wrote:
>>
>>> Hello folks
>>>
>>> Is there a gui build that allows logins on 2.0 latest trunk build?
>>>
>>> I dont' need anything really functional if it doesn't work, but I
>>> was going to do a few videos of Juju 2, LXD containers and BI stuff
>>> tomorrow and the GUI is obviously a nicer way to show state to people. 
>>> If
>>> it doesn't exist, no worries, I'll just use the shell instead!
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>

>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Bitnami wordpress charm development

2016-03-02 Thread Samuel Cozannet
I think what you'd actually want to do is a layer for that. If you create
configuration in the charm, then you'd have a generic charm, and not expose
what is actually into it.
As Juju wants to model, what actually runs must be explicitly described.

With a layer, you could enable people to use a remote script at install,
while creating one charm per app essentially.

That would then give you the ability to extend the bitnami behavior, which
focuses on deploying 1 unit of everything. For example, in your wordpress
deployment, you could essentially add a mysql relationship that would
transfer the local DB to a remote SQL DB, which would then enable scaling
out the front end.

Interested in following up on this as well, please keep me in the loop.
++
Samuel


--
Samuel Cozannet
Cloud, Big Data and IoT Strategy Team
Business Development - Cloud and ISV Ecosystem
Changing the Future of Cloud
Ubuntu   / Canonical UK LTD  / Juju

samuel.cozan...@canonical.com
mob: +33 616 702 389
skype: samnco
Twitter: @SaMnCo_23
[image: View Samuel Cozannet's profile on LinkedIn]


On Tue, Mar 1, 2016 at 6:23 PM, Ney Moura  wrote:

> Hi Samuel!
>
> Well! It's a good idea! But since I'm to new in shell scripting I don't
> think I could handle such thing. On the other hand I think I could create a
> template charm that, with minimal effort, the community would be able to
> use it on another bitnami stacks. Since stack commands should be the same,
> I think I'ts possible =)
>
> The only thing the developer has to do is to change the url witch the run
> script is downloaded and specify installation parameters, both in
> installation hook.
>
>
> 2016-03-01 4:47 GMT-03:00 Samuel Cozannet :
>
>> Hi Ney,
>>
>> I've got myself in the same issue in the past, and found this pretty
>> useful: dos2unix. You can apt-get install it, then you get a dos2unix and a
>> unix2dos commands.
>>
>> If you succeed with the bitnami -> charm, do you think you could create a
>> generic bitnami converter? That would be interesting.
>>
>> Good charming!
>> Best,
>> Sam
>>
>>
>> --
>> Samuel Cozannet
>> Cloud, Big Data and IoT Strategy Team
>> Business Development - Cloud and ISV Ecosystem
>> Changing the Future of Cloud
>> Ubuntu   / Canonical UK LTD  /
>> Juju 
>> samuel.cozan...@canonical.com
>> mob: +33 616 702 389
>> skype: samnco
>> Twitter: @SaMnCo_23
>> [image: View Samuel Cozannet's profile on LinkedIn]
>> 
>>
>> On Tue, Mar 1, 2016 at 1:46 AM, Ney Moura  wrote:
>>
>>> I was thinking that i missed some configurations to ran those commands
>>> properly only.
>>>
>>> Since I use nano, I wasn't able to see those.
>>>
>>> Thanks for the tip about hook environment and the command!
>>>
>>> Mainly for the quick response =D
>>>
>>> 2016-02-29 21:31 GMT-03:00 José Antonio Rey :
>>>
 Glad that was it! When I opened it on vim, it said [dos] at the bottom,
 and after googling the error I saw what it was.

 About the command, what happens is right. You should not be able to
 execute any of those commands. The commands are only executable in a 'hook
 environment', meaning only hooks will be able to run them. If you really
 want to execute one of them, you can use 'juju run --service
 wordpress-single "command goes here"'.

 Why do you want to run that manually? Anything missing?

 --
 José Antonio Rey

 On Mon, Feb 29, 2016, 19:22 Ney Moura  wrote:

> Thanks everyone!
>
> José Antonio, you were right!
>
> How did you discover that?
>
>
> But let me challenge you guys even more!
>
> I need to install something in the VM before using the juju commands,
> like status-set? I'm asking this because I wasn't able to run these
> commands in there.
>
>
> Thanks again!
>
> 2016-02-29 19:15 GMT-03:00 José Antonio Rey :
>
>> This is because you are using Windows line breaks instead of
>> Linux/Unix line breaks. Try saving your file with Linux/Unix line breaks
>> and give it a go.
>>
>>
>> On 02/29/2016 05:12 PM, David Britton wrote:
>>
>>> On Mon, Feb 29, 2016 at 07:02:08PM -0300, Ney Moura wrote:
>>>

 But I keep having erros with the install hook. It says file not
 found.


>>> Maybe I missed it in the tarball -- could you attach a juju debug-log
>>> capture while you deploy it?
>>>
>>> Or, /var/log/all-machines.log from the bootstrap node is the same
>>> thing.
>>>
>>> Thanks!
>>>
>>>
>> --
>> José Antonio Rey
>>
>
>
>
> --
> *Ney Moura Conceição*
>

>>>
>>>
>>>