preinstall packages for charms

Reported by Mark Mims on 2013-06-12
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
juju-core
Low
Unassigned
pyjuju
Wishlist
Unassigned

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 O. 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:

#!/bin/bash
apt-get install -y ruby
call-install-ruby-script.rb

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

    #!/bin/bash
    apt-get -y install -qq ruby
    exec hooks/install.rb

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

    lp:~mark-mims/charms/precise/ruby/trunk

which gives me a log like:

    http://paste.ubuntu.com/6094884/

could probably even do something like:

    #!/bin/bash
    apt-get -y install -qq ruby && ruby -x << EOF
    puts "ruby stuff here"
    EOF

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