sit / chef-packer Goto Github PK
View Code? Open in Web Editor NEWA simple Chef cookbook to install Packer
License: Other
A simple Chef cookbook to install Packer
License: Other
Packer has changed its binary URL since version 0.7.0. The filename pattern specified in this cookbook doesn't support the latest Packer versions.
It would be great to have this fixed and made flexible to support versions below and above 0.7.0.
Packer packages have been moved from bintray.com to hashicorp.com and this attribute has obsolete value now:
node.default['packer']['url_base'] = 'https://dl.bintray.com/mitchellh/packer'
Correct is:
node.default['packer']['url_base'] = 'https://releases.hashicorp.com/packer'
Hey there,
Awesome, you saved me writing a cookbook! Were you planning to put this on the community site because you should ๐
Cheers and thanks for this cookbook!
It's been a long time since this cookbook was updated and it's confusing as it's the first result listed in the Chef Supermarket. Please consider marking this as abandoned and directing people to use https://github.com/schubergphilis/sbp_packer
Tried to install cookbook using Berkshelf and got strange conflict error. After some investigation I have found that cookbook conflicts with itself.
The issue is that dependencies specified in metadata.rb and supermarket.chef.io are different and makes conflict.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Unable to satisfy constraints on package ark due to solution constraint (packer = 0.3.0). Solution constraints that may result in a constraint on ark: [(packer = 0.3.0) -> (ark ~> 0.9.0)], [(packer = 0.3.0) -> (ark ~> 0.4.0)]
Demand that cannot be met: (packer = 0.3.0)
Artifacts for which there are conflicting dependencies: ark = 0.4.2 -> []Unable to find a solution for demands: packer (0.3.0)]
>>>>>> ----------------------
metadata.rb: depends 'ark', '~> 0.9.0'
supermarket.chef.io: ark ~> 0.4.0 [https://supermarket.chef.io/cookbooks/packer#dependencies]
Trying to install Packer in Vagrant box using Chef-solo. Fails with inability to rsync from /tmp dir. Appears to be permission problem. Same failure whether guest OS is centos or ubuntu. Failure output:
==> default: [2015-05-19T19:31:56+00:00] INFO: Forking chef instance to converge...
==> default: [2015-05-19T19:31:56+00:00] INFO: *** Chef 12.3.0 ***
==> default: [2015-05-19T19:31:56+00:00] INFO: Chef-client pid: 2665
==> default: [2015-05-19T19:32:02+00:00] INFO: Setting the run_list to ["recipe[ark]", "recipe[packer]"] from CLI options
==> default: [2015-05-19T19:32:02+00:00] INFO: Run List is [recipe[ark], recipe[packer]]
==> default: [2015-05-19T19:32:02+00:00] INFO: Run List expands to [ark, packer]
==> default: [2015-05-19T19:32:02+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-64
==> default: [2015-05-19T19:32:02+00:00] INFO: Running start handlers
==> default: [2015-05-19T19:32:02+00:00] INFO: Start handlers complete.
==> default: [2015-05-19T19:32:10+00:00] INFO: apt_package[libtool] installed libtool at 2.4.2-1.7ubuntu1
==> default: [2015-05-19T19:32:19+00:00] INFO: apt_package[autoconf] installed autoconf at 2.69-6
==> default: [2015-05-19T19:32:25+00:00] INFO: apt_package[unzip] installed unzip at 6.0-9ubuntu1.3
==> default: [2015-05-19T19:32:39+00:00] INFO: apt_package[autogen] installed autogen at 1:5.18-2ubuntu2
==> default: [2015-05-19T19:32:39+00:00] WARN: DEPRECATED: strip_leading_dir attribute was deprecated. Use strip_components instead.
==> default: [2015-05-19T19:32:39+00:00] INFO: directory[/usr/local/packer-0.7.5] created directory /usr/local/packer-0.7.5
==> default: [2015-05-19T19:33:19+00:00] INFO: remote_file[/var/chef/cache/packer-0.7.5.zip] created file /var/chef/cache/packer-0.7.5.zip
==> default: [2015-05-19T19:33:19+00:00] INFO: remote_file[/var/chef/cache/packer-0.7.5.zip] updated file contents /var/chef/cache/packer-0.7.5.zip
==> default: [2015-05-19T19:33:20+00:00] INFO: remote_file[/var/chef/cache/packer-0.7.5.zip] not queuing delayed action run on executeunpack /var/chef/cache/packer-0.7.5.zip, as it's already been queued
==> default: [2015-05-19T19:33:20+00:00] INFO: link[/usr/local/bin/packer] created
==> default: [2015-05-19T19:33:20+00:00] INFO: link[/usr/local/packer] created
==> default: [2015-05-19T19:33:20+00:00] INFO: directory[/usr/local/packer-0.7.5] sending run action to executeunpack /var/chef/cache/packer-0.7.5.zip
==> default:
==> default: ================================================================================
==> default: Error executing action run
on resource 'execute[unpack /var/chef/cache/packer-0.7.5.zip]'
==> default: ================================================================================
==> default:
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '23'
==> default:
==> default: ---- Begin output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ----
==> default:
==> default: STDOUT:
==> default:
==> default: STDERR: rsync: change_dir "/tmp/d20150519-2665-1jd9ang/" failed: No such file or directory (2)
==> default:
==> default: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
==> default:
==> default: ---- End output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ----
==> default:
==> default: Ran unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang returned 23
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/ark/providers/default.rb
==> default:
==> default: 50: execute "unpack #{new_resource.release_file}" do
==> default: 51: command unpack_command
==> default: 52: cwd new_resource.path
==> default: 53: environment new_resource.environment
==> default: 54: notifies :run, "execute[set owner on #{new_resource.path}]"
==> default: 55: action :nothing
==> default: 56: end
==> default: 57:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/ark/providers/default.rb:50:in block in class_from_file' ==> default: ==> default: execute("unpack /var/chef/cache/packer-0.7.5.zip") do ==> default: action [:nothing] ==> default: retries 0 ==> default: retry_delay 2 ==> default: default_guard_interpreter :execute ==> default: command "unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang/*/ /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang" ==> default: backup 5 ==> default: cwd "/usr/local/packer-0.7.5" ==> default: returns 0 ==> default: declared_type :execute ==> default: cookbook_name :packer ==> default: end ==> default: ==> default: ==> default: ==> default: ================================================================================ ==> default: Error executing action
installon resource 'ark[packer]' ==> default: ================================================================================ ==> default: ==> default: ==> default: Mixlib::ShellOut::ShellCommandFailed ==> default: ------------------------------------ ==> default: execute[unpack /var/chef/cache/packer-0.7.5.zip] (/tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/ark/providers/default.rb line 50) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '23' ==> default: ==> default: ---- Begin output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang/*/ /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ---- ==> default: ==> default: STDOUT: ==> default: ==> default: STDERR: rsync: change_dir "/tmp/d20150519-2665-1jd9ang/*" failed: No such file or directory (2) ==> default: ==> default: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0] ==> default: ---- End output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang/*/ /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ---- ==> default: Ran unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang/*/ /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang returned 23 ==> default: ==> default: Resource Declaration: ==> default: --------------------- ==> default: # In /tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/chef-packer/recipes/default.rb ==> default: ==> default: 11: ark 'packer' do ==> default: 12: url "#{node[:packer][:url_base]}/packer_#{node[:packer][:version]}_#{node[:os]}_#{node[:packer][:arch]}.zip" ==> default: 13: version node[:packer][:version] ==> default: 14: checksum node[:packer][:checksum] ==> default: 15: has_binaries ["packer"] ==> default: 16: append_env_path false ==> default: 17: strip_leading_dir false ==> default: 18: owner 'vagrant' ==> default: 19: action :install ==> default: 20: end ==> default: ==> default: Compiled Resource: ==> default: ------------------ ==> default: # Declared in /tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/chef-packer/recipes/default.rb:11:in
from_file'
==> default:
==> default: ark("packer") do
==> default: action [:install]
==> default: updated true
==> default: updated_by_last_action true
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :ark
==> default: cookbook_name :packer
==> default: recipe_name "default"
==> default: url "https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip"
==> default: version "0.7.5"
==> default: has_binaries ["packer"]
==> default: owner "vagrant"
==> default: extension "zip"
==> default: prefix_bin "/usr/local/bin"
==> default: prefix_root "/usr/local"
==> default: home_dir "/usr/local/packer"
==> default: path "/usr/local/packer-0.7.5"
==> default: release_file "/var/chef/cache/packer-0.7.5.zip"
==> default: strip_components 1
==> default: group 0
==> default: end
==> default:
==> default:
==> default: [2015-05-19T19:33:23+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2015-05-19T19:33:23+00:00] ERROR: Running exception handlers
==> default: [2015-05-19T19:33:23+00:00] ERROR: Exception handlers complete
==> default: [2015-05-19T19:33:23+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-05-19T19:33:23+00:00] ERROR: ark[packer](packer::default line 11) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[unpack /var/chef/cache/packer-0.7.5.zip](/tmp/vagrant-chef/030e6716db7af6f543c04ad6ca22ba81/cookbooks/ark/providers/default.rb line 50) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '23'
==> default: ---- Begin output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ----
==> default: STDOUT:
==> default: STDERR: rsync: change_dir "/tmp/d20150519-2665-1jd9ang/" failed: No such file or directory (2)
==> default: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
==> default: ---- End output of unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang ----
==> default: Ran unzip -q -o /var/chef/cache/packer-0.7.5.zip -d /tmp/d20150519-2665-1jd9ang && rsync -a /tmp/d20150519-2665-1jd9ang// /usr/local/packer-0.7.5 && rm -rf /tmp/d20150519-2665-1jd9ang returned 23
==> default: [2015-05-19T19:33:23+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
When I am trying to berks vendor the dependencies for this cookbook, I get the following error:
ark (~> 1.1)
required by packer-0.6.0
ark (~> 2.0)
required by terraform-1.0.2
Is it possible to update the dependency in the metadata.rb without breaking the core functionality of this cookbook?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.