I am using this github repo to understand the working of Berkshelf when used along with Amazon Opsworks. The basic idea behind what i am trying is if i mention apache2 as a dependency in berksfile for my phpapp recipe then it will automatically manage the dependencies for apache2 which itself is a dependency for phpapp. when i try this with AWS opsworks i get the following error.
================================================================================
Error executing action `run` on resource 'execute[enable mod_proxy for apache-tomcat binding]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/a2enmod proxy ----
STDOUT:
STDERR: ERROR: Module proxy does not exist!
---- End output of /usr/sbin/a2enmod proxy ----
Ran /usr/sbin/a2enmod proxy returned 1
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_java/recipes/apache_tomcat_bind.rb
1: execute 'enable mod_proxy for apache-tomcat binding' do
2: command '/usr/sbin/a2enmod proxy'
3: not_if do
4: ::File.symlink?(::File.join(node['apache']['dir'], 'mods-enabled', 'proxy.load')) || node['opsworks_java']['tomcat']['apache_tomcat_bind_mod'] !~ /\Aproxy/
5: end
6: end
7:
Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_java/recipes/apache_tomcat_bind.rb:1:in `from_file'
execute("enable mod_proxy for apache-tomcat binding") do
action "run"
retries 0
retry_delay 2
command "/usr/sbin/a2enmod proxy"
backup 5
returns 0
cookbook_name "opsworks_java"
recipe_name "apache_tomcat_bind"
not_if { #code block }
end
Add
metadata
insted ofcookbook "apache2"
to your Berksfile, with that in place Berkshelf will add your local cookbook to list of local cookbooks, and it's dependencies frommetadata.rb
From berkshelf.com:
Here is similar issue.