Re: local: nested lxc containers

2015-10-14 Thread Frederico Araujo
For now, I'm just editing the configuration of the lxc container from which
juju clone new lxc instances, so that all new machines allow nested
containers.
It would be nice if we could override container configurations during
deployment, though :)

On Wed, Oct 14, 2015 at 6:13 PM, Frederico Araujo  wrote:

> Hi,
>
> I wrote a charm for an application I developed which deploys some lxc
> containers. I wanted to test it in my local environment (bootstrapped
> with juju-quickstart), but I couldn't find a way to configure juju to
> automatically create containers with specific settings---in my case,
> allowing for nested lxc containers. I need to somehow change the
> configuration fo the parent lxc container created by juju during deployment
> of the charm to add these two lines:
>
> lxc.mount.auto = cgroup
> lxc.aa_profile = lxc-container-default-with-nesting
>
> After manually adding these lines to the parent container created by juju,
> the internal containers work. The problem of adding them manually is that
> juju won't be able to start the internal containers automatically during
> juju deploy.
>
> Any ideas?
>
> Thanks,
> Fred
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


local: nested lxc containers

2015-10-14 Thread Frederico Araujo
Hi,

I wrote a charm for an application I developed which deploys some lxc
containers. I wanted to test it in my local environment (bootstrapped with
juju-quickstart), but I couldn't find a way to configure juju to
automatically create containers with specific settings---in my case,
allowing for nested lxc containers. I need to somehow change the
configuration fo the parent lxc container created by juju during deployment
of the charm to add these two lines:

lxc.mount.auto = cgroup
lxc.aa_profile = lxc-container-default-with-nesting

After manually adding these lines to the parent container created by juju,
the internal containers work. The problem of adding them manually is that
juju won't be able to start the internal containers automatically during
juju deploy.

Any ideas?

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


Re: juju charm proof error

2015-10-05 Thread Frederico Araujo
Thank you guys, and thank you so much for all the awesome work on juju---it
rocks! :)


On Mon, Oct 5, 2015 at 3:24 PM, Marco Ceppi 
wrote:

> I agree completely and now understand the confusion in the output Fred.
> However the ERROR line is coming from Juju and not from charm-tools
> directly.
>
> marco@galago:/tmp/foo⟫ juju charm proof
> I: No icon.svg file.
> W: no copyright file
> W: no README file
> ERROR subprocess encountered error code 100
>
> marco@galago:/tmp/foo⟫ charm proof
> I: No icon.svg file.
> W: no copyright file
> W: no README file
>
> This is something juju is providing as part of the plugin infrastructure.
> I've filed this bug against core to have it resolved:
> https://bugs.launchpad.net/juju-core/+bug/1503029
>
> Thanks,
> Marco Ceppi
>
> On Mon, Oct 5, 2015 at 4:12 PM Mark Shuttleworth  wrote:
>
>> On 02/10/15 09:29, Marco Ceppi wrote:
>> > charm proof provides three levels of output:
>> >
>> > E: Error, this charm will not deploy in it's current state
>> > W: Warning, this charm violates the "recommended" charm store policy
>> > I: Information, things to consider, but no inherently wrong
>> >
>> > Based on the output, you seem to be missing a copyright file and
>> README.md
>> > file which are required for uploading to the charm store but not
>> > necessarily for deploying the charm.
>>
>> Marco, can we drop the ERROR if in fact it's non-fatal, and modify the
>> warnings to be something like this:
>>
>> W: no copyright file, needed for store publication
>> W: no README file, needed for store publication
>>
>>
>> Thanks!
>> Mark
>>
>> --
>> 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 configuration in bash

2015-10-03 Thread Frederico Araujo
Thank you guys!

Best,
Fred

On Fri, Oct 2, 2015 at 7:14 PM, Nick Veitch 
wrote:

> Hi,
>
> There is a config-get hook tool which does the same job (
> https://jujucharms.com/docs/stable/authors-hook-environment#config-get)
> Actually, that whole page is a good read because there is a lot of info
> about the hook environment and other hooks tools there.
>
> hth
>
> On 3 October 2015 at 00:32, Frederico Araujo  wrote:
>
>> Hi list,
>>
>> Is there a way to get the configuration options from config.yaml from a
>> hook written in Bash (e.g., environment variable)? I noticed that in Python
>> we can import from the charmshelper API like this:
>>
>>1. from charmhelpers.core.hookenv import (
>>2. config as config_get,
>>3. ...
>>
>>
>> And then use config_get['option'] to retrieve the option value.
>>
>> Thanks,
>>
>> Fred
>>
>>
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>
>
> --
> Nick Veitch
> nick.vei...@canonical.com
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Juju configuration in bash

2015-10-02 Thread Frederico Araujo
Hi list,

Is there a way to get the configuration options from config.yaml from a
hook written in Bash (e.g., environment variable)? I noticed that in Python
we can import from the charmshelper API like this:

   1. from charmhelpers.core.hookenv import (
   2. config as config_get,
   3. ...


And then use config_get['option'] to retrieve the option value.

Thanks,

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


Re: juju charm proof error

2015-10-02 Thread Frederico Araujo
Thank you, Marco!

I was more concerned about the subprocess error at the end; so I guess this
is fine too? I will try completing my first charm and deploy it locally to
see what happens :)

Best,
Fred

On Friday, October 2, 2015, Marco Ceppi  wrote:

> Hello Fred!
>
> charm proof provides three levels of output:
>
> E: Error, this charm will not deploy in it's current state
> W: Warning, this charm violates the "recommended" charm store policy
> I: Information, things to consider, but no inherently wrong
>
> Based on the output, you seem to be missing a copyright file and README.md
> file which are required for uploading to the charm store but not
> necessarily for deploying the charm. If you add these files the warnings
> should disappear but they're safe to ignore if you're just trying to get
> started in writing you charm. This will only be a problem when going
> through the charm review process to have it listed as a recommended charm
> in the charm store.
>
> Thanks,
> Marco Ceppi
>
> On Fri, Oct 2, 2015 at 12:22 PM Frederico Araujo  > wrote:
>
>> Hi,
>>
>> I'm trying to create my first charm without success. I used 'juju charm
>> create firstcharm', and then cd into firstcharm, edit the metadata and
>> hooks to have a minimal charm that doesn't do anything. The problem arises
>> when checking the charm with 'juju charm proof', which gives me the
>> following error:
>>
>> W: no copyright file
>> W: no README file
>> ERROR subprocess encountered error code 100
>>
>> Any ideas?
>>
>> Thanks a lot!
>> Fred
>> --
>> 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 charm proof error

2015-10-02 Thread Frederico Araujo
Hi,

I'm trying to create my first charm without success. I used 'juju charm
create firstcharm', and then cd into firstcharm, edit the metadata and
hooks to have a minimal charm that doesn't do anything. The problem arises
when checking the charm with 'juju charm proof', which gives me the
following error:

W: no copyright file
W: no README file
ERROR subprocess encountered error code 100

Any ideas?

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