-
-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consul::install_binary should not install compilers on host #169
Comments
+1 |
Here's an example for include_recipe 'ark'
ark 'consul' do
url Chef::Consul.remote_url(node)
version node['consul']['version']
strip_components 0
prefix_root '/opt'
prefix_home '/opt'
has_binaries ['consul/consul']
end Simple extraction with current folder structure can be done like this: include_recipe 'ark'
ark 'consul' do
url Chef::Consul.remote_url(node)
path Chef::Consul.install_path(node)
creates 'consul'
action :cherry_pick
end |
👍 to using something other than libarchive. I just discovered this morning that chef runs on several of my nodes have been broken for a while, but they were failing via libarchive during the compile phase and were therefore not far enough to have installed the handlers that would have alerted me. |
ewr: I think that is worth opening a separate issue! (or possibly add to #170 ?) |
I'll revisit this in the 1.0 release that's on the develop branch. Right now it is using libarchive but maybe @reset and I can figure a way out to not yank in build-essentials. |
@johnbellone the ark cookbook is a mess in it's own way. The libarchive cookbook contains the only lwrp for managing archives that I know of which is actually idempotent, but seems to be having issues on some machines. We can triage those issues or come up with a pure ruby way to get the same behaviour that libarchive is giving us. |
It doesn't look like they've followed through on pushing it to Supermarket, but this Ooyala tarball cookbook is an attempt to handle unarchiving via just built-in Ruby bits: https://github.com/ooyala/tarball-chef-cookbook |
@ewr they're on the right track with the pure Ruby approach but unfortunately it's only for tarballs 😦. Libarchive (the c library) identifies what compression mechanism was used and then rolls with it. That, portability, and idempotency are the keys that we need. |
I was going to say "yeah, but the Consul binaries are just tarballs", but they aren't: they're zip files. So, carry on... |
@reset Yeah we spoke about ark cookbook last time. I am wondering if we can get by using ffi-libarchive - does that still need development headers? |
I have a test branch locally and I'll see if I can wire in ffi-libarchive. Any objects @reset? |
@johnbellone not at all - just need to make sure it's actually idempotent. I do that in the libarchive cookbook by reading the contents of the archive and comparing to what is on disk before performing any extractions. |
I am closing this since @reset merged the above commit. This no longer requires build-essentials and merely requires libarchive. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'd like to avoid installing compilers and other build tools on production servers. But the ::install_binary recipe causes compilers and other tools to get installed via apt (testing on ubuntu 12.04). It looks like this is caused by the libarchive cookbook dependency, which compiles the libarchive library as part of the ruby gem install. Due to the compiler install, I can't use the cookbook to install consul on production servers...
The text was updated successfully, but these errors were encountered: