yevgenko / cookbook-php-fpm

Installs/Configures php-fpm
http://community.opscode.com/cookbooks/php-fpm
Apache License 2.0
68 stars 117 forks source link

Incompatible with yum cookbook >= 3 #34

Closed roylindauer closed 10 years ago

roylindauer commented 10 years ago

I was getting the following error when trying to run the default recipe on an ec2 instance:

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/mycookbook/recipes/site-mysite.com.rb
================================================================================

NameError
---------
Cannot find a resource for yum_key on amazon version 2013.09

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/php-fpm/recipes/default.rb:82:in `from_file'
  /var/chef/cache/cookbooks/mycookbook/recipes/site-mysite.com.rb:14:in `from_file'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/php-fpm/recipes/default.rb:

 75:        key "http://www.dotdeb.org/dotdeb.gpg"
 76:        action :add
 77:      end
 78:    end
 79:  
 80:  when 'amazon', 'fedora', 'centos', 'redhat'
 81:    unless platform?('centos', 'redhat') && node['platform_version'].to_f >= 6.4
 82>>     yum_key 'RPM-GPG-KEY-remi' do
 83:        url 'http://rpms.famillecollet.com/RPM-GPG-KEY-remi'
 84:      end
 85:  
 86:      yum_repository 'remi' do
 87:        description 'Remi'
 88:        url 'http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/'
 89:        mirrorlist 'http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror'
 90:        key 'RPM-GPG-KEY-remi'
 91:        action :add

The latest version of the yum cookbook has removed the yum_key resource, replaced with yum_globalconfig.

The php-fpm libraries are available in the amzn-main repository so it might not even be necessary to use Remi.

yevgenko commented 10 years ago

Hey @rlindauer, thanks for reporting. Could you pls also advice which exactly AMI ID you're using?

yevgenko commented 10 years ago

Hey @rlindauer, it should be resolved now(0.6.5 release), please see #35 for the reference. Feel free to open new tickets if it doesn't work for you or for any concerns.

Thank you!

dwradcliffe commented 10 years ago

This is still happening on 0.6.8. The problem is that yum_key doesn't exist at all anymore in the yum 3.0 cookbook.