1

I am trying to bootstrap chef-server on Amazon Linux 64-bit instance, but for some reason chef-solo gives some errors. It seems that chef can't determine that Amazon Linux is actually a RedHat derivate and use redhat config. Is there any easy workaround for that?

Here is crash dump:

[Fri, 02 Mar 2012 07:52:44 +0000] INFO: Start handlers complete.
[Fri, 02 Mar 2012 07:52:44 +0000] ERROR: Running exception handlers
[Fri, 02 Mar 2012 07:52:44 +0000] ERROR: Exception handlers complete
[Fri, 02 Mar 2012 07:52:44 +0000] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[Fri, 02 Mar 2012 07:52:44 +0000] FATAL: Errno::ENOENT: No such file or directory 
- /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/distro//etc/init.d/chef-solr
freiksenet
  • 111
  • 2
  • How are you invoking chef-solo? – cjc Mar 02 '12 at 12:28
  • I am getting the same error and I invoke it as follows (just as detailed on the wiki): sudo chef-solo -c /etc/chef/solo.rb -j chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz –  Mar 03 '12 at 20:53

1 Answers1

2

Although, amazon is based of Fedora/EL, the problem is that the platform is known as "amazon". The cookbooks are hardcoded to run on "centos", "redhat", "fedora" or "ubuntu", etc.

The solution is to host a custom version of the bootstrap.tar.gz somewhere, which has 'amazon' as the list of the supported platforms inside the metadata.rb of all cookbooks.

Ref.: http://tickets.opscode.com/browse/COOK-801

Shyam Sundar C S
  • 1,063
  • 8
  • 12
  • 1
    This is the correct answer. Testing is done by Opscode on Ubuntu, Debian, CentOS, and RHEL. We do not test on Fedora, AmazonLinux or other "EL-alike" flavors because simply, they're not nearly as widely used, and testing takes time. – jtimberman Mar 13 '12 at 01:26