Opinionated / sensible / recommended default tools for charms

Michael Nelson michael.nelson at canonical.com
Tue Nov 8 16:29:14 UTC 2011


On Tue, Nov 1, 2011 at 5:29 PM, Michael Nelson
<michael.nelson at canonical.com> wrote:
> Getting the instance in a certain state
> ===============================
> Currently my install hook does:
> {{{
> ensemble-log "Installing required packages via apt-get."
> apt-get -y install apache2 libapache2-mod-wsgi bzr fabric ....
> }}}
> ... (then later in my db-relation-changed hook)
> {{{
> ensemble-log "Setting up the wsgi alias."
> echo 'Alias /site_media/
> /opt/open-goal-tracker/current/media-root-dev/\nWSGIScriptAlias /
> /opt/open-goal-tracker/current/ogt_project/apache/django.wsgi' >>
> /etc/apache2/httpd.conf
> }}}
>
> It looks like the kind of stuff for which puppet is made. Has anybody
> written charms using serverless puppet for this (or even, in a way
> that it can work serverless, but will use a puppet master if one is
> defined/set [2]).

Just for anyone interested, here's part 1 of my juju+puppet experiment
(with a 2min demo):

http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/

It's mostly pretty obvious - I just use the install/config-changed
hooks to defer to puppet... but it helped me learn much more about
puppet itself and how I can use it together with juju, as well as
start thinking how I could provide an *optional* puppet-master (given
that this will be nearly always private).

-Michael



More information about the Juju mailing list