preinstall packages for charms

Bug #1190293 reported by Mark Mims
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Wishlist
Unassigned
pyjuju
Confirmed
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 Castro (jorge)
Changed in juju:
status: New → Confirmed
Changed in juju-core:
status: New → Confirmed
tags: added: production
Mark Ramm (mark-ramm)
Changed in juju:
importance: Undecided → Wishlist
Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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)
tags: added: improvement
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Wishlist → Low
Changed in juju-core:
importance: Low → Wishlist
affects: juju-core → juju
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.