Re: Issue with (some) layered charms in network-restricted envs

2016-03-01 Thread Adam Stokes
Not sure if this would help, but, I recently came across this
https://github.com/pantsbuild/pex. Would something like this help for
keeping charms self contained?

On Tue, Mar 1, 2016, 4:45 PM Cory Johns  wrote:

> I'd like to raise awareness of the following issue open against
> charm-tools: https://github.com/juju/charm-tools/issues/117
>
> It affects deploying charms in network-restricted environments, depending
> on whether any of the Python libraries they depend on in their wheelhouse
> use a feature called "setup_requires."  Most don't, but some, like path.py,
> do.
>
> The issue has links with more information and a potential partial
> work-around, but it would still require some manual work by the charm
> author, so I also wanted to start a discussion about other possible
> solutions.
> --
> 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


Issue with (some) layered charms in network-restricted envs

2016-03-01 Thread Cory Johns
I'd like to raise awareness of the following issue open against
charm-tools: https://github.com/juju/charm-tools/issues/117

It affects deploying charms in network-restricted environments, depending
on whether any of the Python libraries they depend on in their wheelhouse
use a feature called "setup_requires."  Most don't, but some, like path.py,
do.

The issue has links with more information and a potential partial
work-around, but it would still require some manual work by the charm
author, so I also wanted to start a discussion about other possible
solutions.
-- 
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-01 Thread José Antonio Rey

Ney,

If you want, I am available on IRC to discuss the idea. It's definitely 
doable, specially with config-get parameters, and it would be great to 
have it! You can find us on #juju on irc.freenode.net. My nick is `jose` 
in there.


On 03/01/2016 12: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
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*




--
*Ney Moura Conceição*

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





--
*Ney Moura Conceição*


--
José Antonio Rey

--
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-01 Thread Ney Moura
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*

>>>
>>
>>
>> --
>> *Ney Moura Conceição*
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>


-- 
*Ney Moura Conceição*
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: LXD Bootstrap

2016-03-01 Thread Casey Marshall
On Mon, Feb 29, 2016 at 5:35 PM, Serge E. Hallyn  wrote:

> Hi Casey,
>
> I haven't reproduced that here in VMs.  If you can reproduce this at will
> (by
> rebooting the host) could you file a bug against the kernel (
> pad.lv/u/linux) ?
>

Saw it again after booting up my laptop this morning, opened a bug:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1551854


>
> thanks,
> -serge
>
> Quoting Casey Marshall (casey.marsh...@canonical.com):
> > On Mon, Feb 29, 2016 at 4:57 PM, Tom Barber 
> wrote:
> >
> > > Seemingly the image name and key are the same, LXD and Juju are the
> same,
> > > so you've either done something magic or I'm confused with its now
> seeming
> > > happiness of the kernel debug mountpoint! :)
> > >
> >
> > I ran into a similar issue today. xenial host, running latest juju out of
> > master for LXD API compatibility. I was unable to bootstrap and sshd was
> > not starting in the controller instance.
> >
> > Remounted kernel debug on the host, and bootstrap started working, sshd
> > starting up now in my trusty instances.
> >
> > Did not refresh my images. If it happens after rebooting the host, I'll
> try
> > to collect more info.
> >
> > -Casey
> >
> >
> > > --
> > >
> > > Director Meteorite.bi - Saiku Analytics Founder
> > > Tel: +44(0)5603641316
> > >
> > > (Thanks to the Saiku community we reached our Kickstart
> > > <
> http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/
> >
> > > goal, but you can always help by sponsoring the project
> > > )
> > >
> > > On 29 February 2016 at 22:43, Tom Barber 
> wrote:
> > >
> > >> Hi Serge
> > >>
> > >> Fresh reboot and updated image, image boots with SSHD working fine, so
> > >> whatever you did, i assume worked or is a freak occurrence. I don't
> have
> > >> any old images kicking around and the import I copied from your email
> > >> appears to have stomped on the old image.
> > >>
> > >> FYI
> > >>
> > >> bugg@tomsdevbox:~$ lxc config show t1
> > >> name: t1
> > >> profiles:
> > >> - default
> > >> config:
> > >>   volatile.base_image:
> > >> 510c27eb5e30ac53c6cf8b423d4e145bd2e40b8845e89bd66a5d78e2a087727a
> > >>   volatile.eth0.hwaddr: 00:16:3e:94:d5:66
> > >>   volatile.last_state.idmap:
> > >>
> '[{"Isuid":true,"Isgid":false,"Hostid":165536,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":165536,"Nsid":0,"Maprange":65536}]'
> > >>   volatile.lo.hwaddr: 00:16:3e:d2:98:62
> > >> devices:
> > >>   root:
> > >> path: /
> > >> type: disk
> > >> ephemeral: false
> > >>
> > >>
> > >> juju bootstrap now seems to run fine without remounting the kernel
> debug.
> > >>
> > >> Thanks for your help!
> > >>
> > >> Tom
> > >>
> > >>
> > >> --
> > >>
> > >> Director Meteorite.bi - Saiku Analytics Founder
> > >> Tel: +44(0)5603641316
> > >>
> > >> (Thanks to the Saiku community we reached our Kickstart
> > >> <
> http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/
> >
> > >> goal, but you can always help by sponsoring the project
> > >> )
> > >>
> > >> On 29 February 2016 at 21:45, Serge E. Hallyn 
> wrote:
> > >>
> > >>> On Mon, Feb 29, 2016 at 09:45:14AM +, Tom Barber wrote:
> > >>> > Hi Serge
> > >>> >
> > >>> > I rebooted the host to see what happened and the lxc images that
> were
> > >>> > running fine all now have broken SSHD. This, to make absolutely
> clear
> > >>> > doesn't affect the Xenial image, just the trusty one I test with.
> > >>> >
> > >>> > bugg@tomsdevbox:~$ lxc launch ubuntu-trusty fix-server2
> > >>> > Creating fix-server2
> > >>> > Starting fix-server2
> > >>> >
> > >>> > bugg@tomsdevbox:~$ lxc exec fix-server2 /bin/bash
> > >>> > root@fix-server2:~# ps aux |grep ssh
> > >>> > root  1597  0.0  0.0   8868   660 ?S+   09:41   0:00
> grep
> > >>> > --color=auto ssh
> > >>> >
> > >>> > exit
> > >>> >
> > >>> > umount and remount kernel debug
> > >>> >
> > >>> > bugg@tomsdevbox:~$ lxc launch ubuntu-trusty fix-server3
> > >>> > Creating fix-server3
> > >>> > Starting fix-server3
> > >>> > bugg@tomsdevbox:~$ lxc exec fix-server3 /bin/bash
> > >>> > root@fix-server3:~# ps aux |grep ssh
> > >>> > root  1759  0.0  0.0  61380  3816 ?Ss   09:42   0:00
> > >>> > /usr/sbin/sshd -D
> > >>> > root  1944  0.0  0.0   8868   604 ?S+   09:43   0:00
> grep
> > >>> > --color=auto ssh
> > >>>
> > >>> If you pull a fresh image using
> > >>>
> > >>> lxd-images import ubuntu --alias newtrusty trusty amd64
> > >>>
> > >>> and launch that
> > >>>
> > >>> lxc launch newtrusty t1
> > >>>
> > >>> does it have the same failure?
> > >>>
> > >>> What does
> > >>>
> > >>> lxc config show fix-server2 show?
> > >>>
> > >>
> > >>
> > >
> > > --
> > > Juju mailing list
> > > Juju@lists.ubuntu.com
> > > Modify 

Re: LXD Bootstrap

2016-03-01 Thread Tom Barber
Okay we're back.

Here is the /proc/mount stuff:

http://paste.ubuntu.com/15260347/
http://paste.ubuntu.com/15260350/

You can see a bit of a diff after the remount, hope it helps!

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 29 February 2016 at 23:38, Tom Barber  wrote:

> Its pretty weird, because a few reboots and it failed, now its magically
> working post reboot. Worst comes to the worst I can flatten the machine
> again and I'm sure it will reappear as it did the previous 2 occasions.
>
> --
>
> 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 29 February 2016 at 23:35, Serge E. Hallyn  wrote:
>
>> Hi Casey,
>>
>> I haven't reproduced that here in VMs.  If you can reproduce this at will
>> (by
>> rebooting the host) could you file a bug against the kernel (
>> pad.lv/u/linux) ?
>>
>> thanks,
>> -serge
>>
>> Quoting Casey Marshall (casey.marsh...@canonical.com):
>> > On Mon, Feb 29, 2016 at 4:57 PM, Tom Barber 
>> wrote:
>> >
>> > > Seemingly the image name and key are the same, LXD and Juju are the
>> same,
>> > > so you've either done something magic or I'm confused with its now
>> seeming
>> > > happiness of the kernel debug mountpoint! :)
>> > >
>> >
>> > I ran into a similar issue today. xenial host, running latest juju out
>> of
>> > master for LXD API compatibility. I was unable to bootstrap and sshd was
>> > not starting in the controller instance.
>> >
>> > Remounted kernel debug on the host, and bootstrap started working, sshd
>> > starting up now in my trusty instances.
>> >
>> > Did not refresh my images. If it happens after rebooting the host, I'll
>> try
>> > to collect more info.
>> >
>> > -Casey
>> >
>> >
>> > > --
>> > >
>> > > Director Meteorite.bi - Saiku Analytics Founder
>> > > Tel: +44(0)5603641316
>> > >
>> > > (Thanks to the Saiku community we reached our Kickstart
>> > > <
>> http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/
>> >
>> > > goal, but you can always help by sponsoring the project
>> > > )
>> > >
>> > > On 29 February 2016 at 22:43, Tom Barber 
>> wrote:
>> > >
>> > >> Hi Serge
>> > >>
>> > >> Fresh reboot and updated image, image boots with SSHD working fine,
>> so
>> > >> whatever you did, i assume worked or is a freak occurrence. I don't
>> have
>> > >> any old images kicking around and the import I copied from your email
>> > >> appears to have stomped on the old image.
>> > >>
>> > >> FYI
>> > >>
>> > >> bugg@tomsdevbox:~$ lxc config show t1
>> > >> name: t1
>> > >> profiles:
>> > >> - default
>> > >> config:
>> > >>   volatile.base_image:
>> > >> 510c27eb5e30ac53c6cf8b423d4e145bd2e40b8845e89bd66a5d78e2a087727a
>> > >>   volatile.eth0.hwaddr: 00:16:3e:94:d5:66
>> > >>   volatile.last_state.idmap:
>> > >>
>> '[{"Isuid":true,"Isgid":false,"Hostid":165536,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":165536,"Nsid":0,"Maprange":65536}]'
>> > >>   volatile.lo.hwaddr: 00:16:3e:d2:98:62
>> > >> devices:
>> > >>   root:
>> > >> path: /
>> > >> type: disk
>> > >> ephemeral: false
>> > >>
>> > >>
>> > >> juju bootstrap now seems to run fine without remounting the kernel
>> debug.
>> > >>
>> > >> Thanks for your help!
>> > >>
>> > >> Tom
>> > >>
>> > >>
>> > >> --
>> > >>
>> > >> Director Meteorite.bi - Saiku Analytics Founder
>> > >> Tel: +44(0)5603641316
>> > >>
>> > >> (Thanks to the Saiku community we reached our Kickstart
>> > >> <
>> http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/
>> >
>> > >> goal, but you can always help by sponsoring the project
>> > >> )
>> > >>
>> > >> On 29 February 2016 at 21:45, Serge E. Hallyn 
>> wrote:
>> > >>
>> > >>> On Mon, Feb 29, 2016 at 09:45:14AM +, Tom Barber wrote:
>> > >>> > Hi Serge
>> > >>> >
>> > >>> > I rebooted the host to see what happened and the lxc images that
>> were
>> > >>> > running fine all now have broken SSHD. This, to make absolutely
>> clear
>> > >>> > doesn't affect the Xenial image, just the trusty one I test with.
>> > >>> >
>> > >>> > bugg@tomsdevbox:~$ lxc launch ubuntu-trusty fix-server2
>> > >>> > Creating fix-server2
>> > >>> > Starting fix-server2
>> 

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Rick Harding
Awesome, appreciate it.

On Tue, Mar 1, 2016, 8:48 AM Adam Stokes  wrote:

> Went ahead and filed a bug here:
> https://bugs.launchpad.net/juju-core/+bug/1551743
>
> On Tue, Mar 1, 2016 at 8:40 AM, Rick Harding 
> wrote:
>
>> Thank Adam. That's good feedback. With tabular output the default now we
>> should be more verbose on the yaml output and display the uuids and other
>> data.
>>
>> On Tue, Mar 1, 2016, 8:37 AM Adam Stokes 
>> wrote:
>>
>>> One of the problems using `juju list-controllers --format yaml` versus
>>> reading the controllers.yaml file directly is the information is
>>> different.  Specifically I need the UUID in order to build the URL used
>>> when accessing Juju's API.
>>>
>>>   adam@deadpool:conjure   juju list-controllers --format yaml
>>> controllers:
>>>   local.conjure:
>>> model: conjure
>>> user: admin@local
>>> server: 10.0.3.130:17070
>>>   local.conjure-maas:
>>> model: conjure-maas
>>> user: admin@local
>>> server: 172.16.0.152:17070
>>> current-controller: local.conjure-maas
>>>
>>>
>>>   adam@deadpool:conjure   cat ~/.local/share/juju/controllers.yaml
>>> controllers:
>>>   local.conjure:
>>> servers: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
>>> '[fe80::216:3eff:fe22:c849]:17070']
>>> uuid: 0551fce8-0e0d-4fbc-8d53-b67f7a7657c4
>>> api-endpoints: ['10.0.3.130:17070', '127.0.0.1:17070',
>>> '[::1]:17070', '[fe80::216:3eff:fe22:c849]:17070']
>>> ca-cert: |
>>>   -BEGIN CERTIFICATE-
>>> -END CERTIFICATE-
>>>   local.conjure-maas:
>>> servers: ['172.16.0.152:17070']
>>> uuid: ad6f65af-6b45-4293-8891-482635653807
>>> api-endpoints: ['172.16.0.152:17070']
>>> ca-cert: |
>>>   -BEGIN CERTIFICATE-
>>>
>>>
>>> On Mon, Feb 29, 2016 at 11:56 PM, Ian Booth 
>>> wrote:
>>>
 No, you are right.

 $ juju list-controllers --format yaml

 is better.

 On 01/03/16 14:49, John Meinel wrote:
 > Is there a reason to tell people to look at "controllers.yaml" rather
 than
 > having the official mechanism be something like "juju list-controllers
 > --format=yaml" ? I'd really like to avoid tying 3rd party scripts to
 our
 > on-disk configuration. We can keep CLI compatibility, but on-disk
 > structures aren't something we really want to commit to forever.
 >
 > John
 > =:->
 >
 > On Tue, Mar 1, 2016 at 8:22 AM, Ian Booth 
 wrote:
 >
 >> Just to be clear, the remote APi for listing models for a given
 controller
 >> exists. But you do need to look at controllers.yaml to see what
 >> controllers you
 >> have bootstrapped or have access to in order to make the remote list
 >> models api
 >> call.
 >>
 >> On 01/03/16 13:14, Adam Stokes wrote:
 >>> Got it squared away, being able to replicate `juju list-controllers`
 >> didn't
 >>> have a remote api. So I will continue to read from
 >>> ~/.local/share/juju/controllers.yaml. My intention was to basically
 see
 >>> what controllers were already bootstrapped and gather the models for
 >> those
 >>> controllers using the remote juju api. But that doesn't exist so I
 will
 >>> mimic what `juju list-controllers` does and read from the yaml file
 for
 >>> controllers that are local to my admin and users.
 >>>
 >>> On Mon, Feb 29, 2016 at 9:40 PM, Tim Penhey <
 tim.pen...@canonical.com>
 >>> wrote:
 >>>
  It is the controller that you have logged into for the API.
 
  What are you wanting?
 
  You need a different API connection for each controller.
 
  Tim
 
  On 01/03/16 15:05, Adam Stokes wrote:
 > Right, but how do you specify which controller you want to list
 the
 > models for? The only way I can see is to manually `juju switch
 > ` then re-login to the API and run the AllModels
 method. Is
 > there a way (as an administrator) to specify which controller you
 want
 > to list the models for?
 >
 > On Mon, Feb 29, 2016 at 8:46 PM, Ian Booth <
 ian.bo...@canonical.com
 > > wrote:
 >
 >
 >
 > On 01/03/16 11:25, Adam Stokes wrote:
 > > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey
 > >
 > > wrote:
 > >
 > >> On 01/03/16 03:48, Adam Stokes wrote:
 > >>> Is there a way to list all models for a specific
 controller?
 > >>
 > >> Yes.
 > >
 > >
 > > Mind pointing me to the api docs that has that capability?
 > >
 >

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Adam Stokes
Went ahead and filed a bug here:
https://bugs.launchpad.net/juju-core/+bug/1551743

On Tue, Mar 1, 2016 at 8:40 AM, Rick Harding 
wrote:

> Thank Adam. That's good feedback. With tabular output the default now we
> should be more verbose on the yaml output and display the uuids and other
> data.
>
> On Tue, Mar 1, 2016, 8:37 AM Adam Stokes 
> wrote:
>
>> One of the problems using `juju list-controllers --format yaml` versus
>> reading the controllers.yaml file directly is the information is
>> different.  Specifically I need the UUID in order to build the URL used
>> when accessing Juju's API.
>>
>>   adam@deadpool:conjure   juju list-controllers --format yaml
>> controllers:
>>   local.conjure:
>> model: conjure
>> user: admin@local
>> server: 10.0.3.130:17070
>>   local.conjure-maas:
>> model: conjure-maas
>> user: admin@local
>> server: 172.16.0.152:17070
>> current-controller: local.conjure-maas
>>
>>
>>   adam@deadpool:conjure   cat ~/.local/share/juju/controllers.yaml
>> controllers:
>>   local.conjure:
>> servers: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
>> '[fe80::216:3eff:fe22:c849]:17070']
>> uuid: 0551fce8-0e0d-4fbc-8d53-b67f7a7657c4
>> api-endpoints: ['10.0.3.130:17070', '127.0.0.1:17070',
>> '[::1]:17070', '[fe80::216:3eff:fe22:c849]:17070']
>> ca-cert: |
>>   -BEGIN CERTIFICATE-
>> -END CERTIFICATE-
>>   local.conjure-maas:
>> servers: ['172.16.0.152:17070']
>> uuid: ad6f65af-6b45-4293-8891-482635653807
>> api-endpoints: ['172.16.0.152:17070']
>> ca-cert: |
>>   -BEGIN CERTIFICATE-
>>
>>
>> On Mon, Feb 29, 2016 at 11:56 PM, Ian Booth 
>> wrote:
>>
>>> No, you are right.
>>>
>>> $ juju list-controllers --format yaml
>>>
>>> is better.
>>>
>>> On 01/03/16 14:49, John Meinel wrote:
>>> > Is there a reason to tell people to look at "controllers.yaml" rather
>>> than
>>> > having the official mechanism be something like "juju list-controllers
>>> > --format=yaml" ? I'd really like to avoid tying 3rd party scripts to
>>> our
>>> > on-disk configuration. We can keep CLI compatibility, but on-disk
>>> > structures aren't something we really want to commit to forever.
>>> >
>>> > John
>>> > =:->
>>> >
>>> > On Tue, Mar 1, 2016 at 8:22 AM, Ian Booth 
>>> wrote:
>>> >
>>> >> Just to be clear, the remote APi for listing models for a given
>>> controller
>>> >> exists. But you do need to look at controllers.yaml to see what
>>> >> controllers you
>>> >> have bootstrapped or have access to in order to make the remote list
>>> >> models api
>>> >> call.
>>> >>
>>> >> On 01/03/16 13:14, Adam Stokes wrote:
>>> >>> Got it squared away, being able to replicate `juju list-controllers`
>>> >> didn't
>>> >>> have a remote api. So I will continue to read from
>>> >>> ~/.local/share/juju/controllers.yaml. My intention was to basically
>>> see
>>> >>> what controllers were already bootstrapped and gather the models for
>>> >> those
>>> >>> controllers using the remote juju api. But that doesn't exist so I
>>> will
>>> >>> mimic what `juju list-controllers` does and read from the yaml file
>>> for
>>> >>> controllers that are local to my admin and users.
>>> >>>
>>> >>> On Mon, Feb 29, 2016 at 9:40 PM, Tim Penhey <
>>> tim.pen...@canonical.com>
>>> >>> wrote:
>>> >>>
>>>  It is the controller that you have logged into for the API.
>>> 
>>>  What are you wanting?
>>> 
>>>  You need a different API connection for each controller.
>>> 
>>>  Tim
>>> 
>>>  On 01/03/16 15:05, Adam Stokes wrote:
>>> > Right, but how do you specify which controller you want to list the
>>> > models for? The only way I can see is to manually `juju switch
>>> > ` then re-login to the API and run the AllModels
>>> method. Is
>>> > there a way (as an administrator) to specify which controller you
>>> want
>>> > to list the models for?
>>> >
>>> > On Mon, Feb 29, 2016 at 8:46 PM, Ian Booth <
>>> ian.bo...@canonical.com
>>> > > wrote:
>>> >
>>> >
>>> >
>>> > On 01/03/16 11:25, Adam Stokes wrote:
>>> > > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey
>>> > >
>>> > > wrote:
>>> > >
>>> > >> On 01/03/16 03:48, Adam Stokes wrote:
>>> > >>> Is there a way to list all models for a specific
>>> controller?
>>> > >>
>>> > >> Yes.
>>> > >
>>> > >
>>> > > Mind pointing me to the api docs that has that capability?
>>> > >
>>> >
>>> >
>>> 
>>> https://godoc.org/github.com/juju/juju/api/controller#Client.AllModels
>>> >
>>> >
>>> 
>>> 
>>> >>>
>>> >>
>>> >> --
>>> >> Juju mailing list
>>> >> Juju@lists.ubuntu.com
>>> >> Modify settings or unsubscribe 

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Rick Harding
Thank Adam. That's good feedback. With tabular output the default now we
should be more verbose on the yaml output and display the uuids and other
data.

On Tue, Mar 1, 2016, 8:37 AM Adam Stokes  wrote:

> One of the problems using `juju list-controllers --format yaml` versus
> reading the controllers.yaml file directly is the information is
> different.  Specifically I need the UUID in order to build the URL used
> when accessing Juju's API.
>
>   adam@deadpool:conjure   juju list-controllers --format yaml
> controllers:
>   local.conjure:
> model: conjure
> user: admin@local
> server: 10.0.3.130:17070
>   local.conjure-maas:
> model: conjure-maas
> user: admin@local
> server: 172.16.0.152:17070
> current-controller: local.conjure-maas
>
>
>   adam@deadpool:conjure   cat ~/.local/share/juju/controllers.yaml
> controllers:
>   local.conjure:
> servers: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
> '[fe80::216:3eff:fe22:c849]:17070']
> uuid: 0551fce8-0e0d-4fbc-8d53-b67f7a7657c4
> api-endpoints: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
> '[fe80::216:3eff:fe22:c849]:17070']
> ca-cert: |
>   -BEGIN CERTIFICATE-
> -END CERTIFICATE-
>   local.conjure-maas:
> servers: ['172.16.0.152:17070']
> uuid: ad6f65af-6b45-4293-8891-482635653807
> api-endpoints: ['172.16.0.152:17070']
> ca-cert: |
>   -BEGIN CERTIFICATE-
>
>
> On Mon, Feb 29, 2016 at 11:56 PM, Ian Booth 
> wrote:
>
>> No, you are right.
>>
>> $ juju list-controllers --format yaml
>>
>> is better.
>>
>> On 01/03/16 14:49, John Meinel wrote:
>> > Is there a reason to tell people to look at "controllers.yaml" rather
>> than
>> > having the official mechanism be something like "juju list-controllers
>> > --format=yaml" ? I'd really like to avoid tying 3rd party scripts to our
>> > on-disk configuration. We can keep CLI compatibility, but on-disk
>> > structures aren't something we really want to commit to forever.
>> >
>> > John
>> > =:->
>> >
>> > On Tue, Mar 1, 2016 at 8:22 AM, Ian Booth 
>> wrote:
>> >
>> >> Just to be clear, the remote APi for listing models for a given
>> controller
>> >> exists. But you do need to look at controllers.yaml to see what
>> >> controllers you
>> >> have bootstrapped or have access to in order to make the remote list
>> >> models api
>> >> call.
>> >>
>> >> On 01/03/16 13:14, Adam Stokes wrote:
>> >>> Got it squared away, being able to replicate `juju list-controllers`
>> >> didn't
>> >>> have a remote api. So I will continue to read from
>> >>> ~/.local/share/juju/controllers.yaml. My intention was to basically
>> see
>> >>> what controllers were already bootstrapped and gather the models for
>> >> those
>> >>> controllers using the remote juju api. But that doesn't exist so I
>> will
>> >>> mimic what `juju list-controllers` does and read from the yaml file
>> for
>> >>> controllers that are local to my admin and users.
>> >>>
>> >>> On Mon, Feb 29, 2016 at 9:40 PM, Tim Penhey > >
>> >>> wrote:
>> >>>
>>  It is the controller that you have logged into for the API.
>> 
>>  What are you wanting?
>> 
>>  You need a different API connection for each controller.
>> 
>>  Tim
>> 
>>  On 01/03/16 15:05, Adam Stokes wrote:
>> > Right, but how do you specify which controller you want to list the
>> > models for? The only way I can see is to manually `juju switch
>> > ` then re-login to the API and run the AllModels
>> method. Is
>> > there a way (as an administrator) to specify which controller you
>> want
>> > to list the models for?
>> >
>> > On Mon, Feb 29, 2016 at 8:46 PM, Ian Booth > > > wrote:
>> >
>> >
>> >
>> > On 01/03/16 11:25, Adam Stokes wrote:
>> > > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey
>> > >
>> > > wrote:
>> > >
>> > >> On 01/03/16 03:48, Adam Stokes wrote:
>> > >>> Is there a way to list all models for a specific controller?
>> > >>
>> > >> Yes.
>> > >
>> > >
>> > > Mind pointing me to the api docs that has that capability?
>> > >
>> >
>> >
>> 
>> https://godoc.org/github.com/juju/juju/api/controller#Client.AllModels
>> >
>> >
>> 
>> 
>> >>>
>> >>
>> >> --
>> >> 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: 

Re: Logging into the API on Juju 2.0

2016-03-01 Thread Adam Stokes
One of the problems using `juju list-controllers --format yaml` versus
reading the controllers.yaml file directly is the information is
different.  Specifically I need the UUID in order to build the URL used
when accessing Juju's API.

  adam@deadpool:conjure   juju list-controllers --format yaml
controllers:
  local.conjure:
model: conjure
user: admin@local
server: 10.0.3.130:17070
  local.conjure-maas:
model: conjure-maas
user: admin@local
server: 172.16.0.152:17070
current-controller: local.conjure-maas


  adam@deadpool:conjure   cat ~/.local/share/juju/controllers.yaml
controllers:
  local.conjure:
servers: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
'[fe80::216:3eff:fe22:c849]:17070']
uuid: 0551fce8-0e0d-4fbc-8d53-b67f7a7657c4
api-endpoints: ['10.0.3.130:17070', '127.0.0.1:17070', '[::1]:17070',
'[fe80::216:3eff:fe22:c849]:17070']
ca-cert: |
  -BEGIN CERTIFICATE-
-END CERTIFICATE-
  local.conjure-maas:
servers: ['172.16.0.152:17070']
uuid: ad6f65af-6b45-4293-8891-482635653807
api-endpoints: ['172.16.0.152:17070']
ca-cert: |
  -BEGIN CERTIFICATE-


On Mon, Feb 29, 2016 at 11:56 PM, Ian Booth  wrote:

> No, you are right.
>
> $ juju list-controllers --format yaml
>
> is better.
>
> On 01/03/16 14:49, John Meinel wrote:
> > Is there a reason to tell people to look at "controllers.yaml" rather
> than
> > having the official mechanism be something like "juju list-controllers
> > --format=yaml" ? I'd really like to avoid tying 3rd party scripts to our
> > on-disk configuration. We can keep CLI compatibility, but on-disk
> > structures aren't something we really want to commit to forever.
> >
> > John
> > =:->
> >
> > On Tue, Mar 1, 2016 at 8:22 AM, Ian Booth 
> wrote:
> >
> >> Just to be clear, the remote APi for listing models for a given
> controller
> >> exists. But you do need to look at controllers.yaml to see what
> >> controllers you
> >> have bootstrapped or have access to in order to make the remote list
> >> models api
> >> call.
> >>
> >> On 01/03/16 13:14, Adam Stokes wrote:
> >>> Got it squared away, being able to replicate `juju list-controllers`
> >> didn't
> >>> have a remote api. So I will continue to read from
> >>> ~/.local/share/juju/controllers.yaml. My intention was to basically see
> >>> what controllers were already bootstrapped and gather the models for
> >> those
> >>> controllers using the remote juju api. But that doesn't exist so I will
> >>> mimic what `juju list-controllers` does and read from the yaml file for
> >>> controllers that are local to my admin and users.
> >>>
> >>> On Mon, Feb 29, 2016 at 9:40 PM, Tim Penhey 
> >>> wrote:
> >>>
>  It is the controller that you have logged into for the API.
> 
>  What are you wanting?
> 
>  You need a different API connection for each controller.
> 
>  Tim
> 
>  On 01/03/16 15:05, Adam Stokes wrote:
> > Right, but how do you specify which controller you want to list the
> > models for? The only way I can see is to manually `juju switch
> > ` then re-login to the API and run the AllModels method.
> Is
> > there a way (as an administrator) to specify which controller you
> want
> > to list the models for?
> >
> > On Mon, Feb 29, 2016 at 8:46 PM, Ian Booth  > > wrote:
> >
> >
> >
> > On 01/03/16 11:25, Adam Stokes wrote:
> > > On Mon, Feb 29, 2016 at 7:24 PM, Tim Penhey
> > >
> > > wrote:
> > >
> > >> On 01/03/16 03:48, Adam Stokes wrote:
> > >>> Is there a way to list all models for a specific controller?
> > >>
> > >> Yes.
> > >
> > >
> > > Mind pointing me to the api docs that has that capability?
> > >
> >
> >
> 
> https://godoc.org/github.com/juju/juju/api/controller#Client.AllModels
> >
> >
> 
> 
> >>>
> >>
> >> --
> >> 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: Resyndicating your post

2016-03-01 Thread Tom Barber
More than happy to Samuel. There's a bigger thank you to the guys who
helped me over the weekend figure out how to get Juju Trunk running with
LXD instead of telling me to shut up and wait for the next beta/stable
release! ;)

So thanks to John, Serge, Rick H for the help, and to Jorge for writing the
blog post I blatantly ripped off and turned into a rambling video ;)

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 10:29, Samuel Cozannet 
wrote:

> Hi Tom,
>
> We republished your post:
> https://insights.ubuntu.com/2016/03/01/juju-2-0-and-lxd-opens-a-whole-new-dimension-to-developing-bi-apps/
>
> :)
> Thanks for sharing the goodness!
>
> --
> 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]
> 
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Extra Network Bindings for Charms

2016-03-01 Thread Dimiter Naydenov
Just to confirm the implementation to support the extra bindings has
started and should be available for early testing tomorrow, in the
maas-spaces2 feature branch.

Cheers,
Dimiter

On  1.03.2016 11:24, John Meinel wrote:
> As we discussed how the Juju network model was going to map network
> spaces into IP addresses for charms, the Openstack charmers noted that
> it wasn't sufficient to just provide networking configuration for
> existing relations. There were several places where the Openstack charms
> needed a way to expose a workload onto the network, but whose
> configuration information was already well handled by the existing
> relations. They liked being able to move the mapping of subnets,etc from
> being just config in a charm into being pieces that system operators
> could map at deploy time.
> 
> The best solution that we've come up with is to add a new section to
> charm metadata.yaml. At a similar level to provides/requires/tags we'd
> add a field for "extra-bindings". Entries in this list end up being
> available for "juju deploy charm --bind =", but
> don't have the same set of charm hooks that will be fired for their
> lifecycle.
> 
> We're pretty happy with what we've come up with after a fair amount of
> trying out different possibilities. We'd like to open it up to a bit
> wider discussion in case there are use cases that we didn't realize we
> missed. (We certainly know about a few cases that we are intentionally
> not supporting with this, in an effort to preserve compatibility and
> simplicity.)
> 
> If you're interested in this space, let us know what you think,
> Juju Extra Network Bindings <
> https://docs.google.com/document/d/1pKORpWSitOk7C_HMNBaO36-Ht1b3lT86bOWTy9jPMDQ/edit?usp=sharing>
> 
> Thanks,
> John
> =:->
> 
> PS> For James Page and other's that have already looked at this
> document, can you give it a once over. I pulled out some of the
> alternatives to make it more focused, and want to make sure that I
> haven't lost cohesion in the final draft.
> 
> 


-- 
Dimiter Naydenov 
Juju Core Sapphire team 



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


Extra Network Bindings for Charms

2016-03-01 Thread John Meinel
As we discussed how the Juju network model was going to map network spaces
into IP addresses for charms, the Openstack charmers noted that it wasn't
sufficient to just provide networking configuration for existing relations.
There were several places where the Openstack charms needed a way to expose
a workload onto the network, but whose configuration information was
already well handled by the existing relations. They liked being able to
move the mapping of subnets,etc from being just config in a charm into
being pieces that system operators could map at deploy time.

The best solution that we've come up with is to add a new section to charm
metadata.yaml. At a similar level to provides/requires/tags we'd add a
field for "extra-bindings". Entries in this list end up being available for
"juju deploy charm --bind =", but don't have the same
set of charm hooks that will be fired for their lifecycle.

We're pretty happy with what we've come up with after a fair amount of
trying out different possibilities. We'd like to open it up to a bit wider
discussion in case there are use cases that we didn't realize we missed.
(We certainly know about a few cases that we are intentionally not
supporting with this, in an effort to preserve compatibility and
simplicity.)

If you're interested in this space, let us know what you think,
Juju Extra Network Bindings


Thanks,
John
=:->

PS> For James Page and other's that have already looked at this document,
can you give it a once over. I pulled out some of the alternatives to make
it more focused, and want to make sure that I haven't lost cohesion in the
final draft.
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev