Juju feedback from the Launchpad Yellow Squad

Gary Poster gary.poster at canonical.com
Thu Feb 16 02:34:42 UTC 2012

Hey Gustavo.  Just replying to one part of your mail, in regards to the metadata-for-packages vs. the install-hook-for-packages...

On Feb 15, 2012, at 9:09 PM, Gustavo Niemeyer wrote:


>> We have thought about adding this into charm-tools as a charm-helper
>> that would inspect a declarative section in metadata.yaml.
> Please don't do that. We may even start blocking charms with random
> content in metadata.yaml at some point to prevent breaking things
> arbitrarily and unintendedly. metadata.yaml is for content that is
> part of the specification only.
>> So it would look something like
>> apt-packaging:
>>  add-repos: [ 'ppa:charmers/charm-helpers', 'ppa:ubuntu-server-edgers/php' ]
>>  install-packages: ['php5-fpm','nginx','wordpress']
> I don't understand. How's that any better than adding this to the install hook:
>    add-apt-repository ppa:charmers/charm-helpers
>    add-apt-repository ppa:ubuntu-server-edgers/php
>    apt-get install php5-fpm nginx wordpress
> This seems clear, cleaner, and expected.

That is nice if your hook is written in shell.  If you hook is written in another language, such as Python, you may want helpers to do this beyond, for instance, subprocess.call.  We did, in order to make error handling behavior that we thought was better in a juju context--and even to keep us from needing to remember to use "-y --force-yes" in our apt-get install.

If you want helpers to do bootstrapping, they themselves need to be bootstrapped.  The metadata approach to getting initial packages installed gives you that.


More information about the Juju mailing list