preinstall packages for charms

Bug #1190293 reported by Mark Mims on 2013-06-12
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

hooks can't be written in any language not already installed in bare cloud images.

We can fix this a number of ways... I prefer adding an optional 'preinstall_packages' key or a 'package-dependencies' key into the metadata for a charm.

Jorge Castro (jorge) on 2013-06-12
Changed in juju:
status: New → Confirmed
Changed in juju-core:
status: New → Confirmed
tags: added: production
Mark Ramm (mark-ramm) on 2013-06-13
Changed in juju:
importance: Undecided → Wishlist
William Reade (fwereade) wrote :

Now that hooks are serialized per-unit, "apt-get install" in "install" hooks shouldn't be a problem.

Changed in juju-core:
status: Confirmed → Triaged
importance: Undecided → Wishlist
Tim Penhey (thumper) wrote :

So, if the install hook was written in bash, it may look something like:

apt-get install -y ruby

Can someone see if that works? Perhaps the script needs a path?

Mark Mims (mark-mims) wrote :

Yeah, seemed to work fine with an install hook of

    apt-get -y install -qq ruby
    exec hooks/install.rb

with the rest of the hooks written directly in ruby... tested with


which gives me a log like:

could probably even do something like:

    apt-get -y install -qq ruby && ruby -x << EOF
    puts "ruby stuff here"

but it'd be nice to have the ruby packages already installed before the install script is run.

Dave Cheney (dave-cheney) wrote :

I think wishlist is the appropriate status, there are a lot of workarounds available and most of them aren't so horrid.

Curtis Hovey (sinzui) on 2013-10-11
tags: added: improvement
Curtis Hovey (sinzui) on 2013-10-11
Changed in juju-core:
importance: Wishlist → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers