Opscode
Chef 0.10.0 client/server packages are now available at
rbel.frameos.org
Installing a CentOS 5 based Chef Server
1. Install the RBEL repo
rpm -Uvh http://rbel.frameos.org/rbel5
2. Install Chef Server and dependencies
yum install rubygem-chef-server
3. To make things easier, disable the firewall (Don’t do it in a production or public facing server)
service iptables stop
4. Run the setup script
setup-chef-server.sh
Now login to http://your-chef-server:4040
user: admin
password: chef321go
Packages still need some polishing so any feedback is greatly appreciated.
Enjoy!
See also:
Bootstraping RHEL/CentOS 5 Chef 0.10 nodes using RBEL repo
UPDATE:
Chef packages updated to 0.10 RC2. Fixed setup issues. Updated post.
UPDATE:
Chef packages updated to 0.10 GA.
UPDATE:
Chef packages moved to rbel5 stable. rbel6 packages for RHEL6 coming soon.
I ran this on the scalr CentOS 5.6 AMI, and had to remove ruby/ruby-libs before installing.
sudo yum remove ruby
sudo yum remove ruby-libs
sudo yum install rubygem-chef-server
Seemed to work.
Thanks for the feedback Joel!
I wonder if they pre-install the ruby package from an unofficial repo. Official ruby packages from CentOS should be upgraded without problems.
The package I had to install was ruby-libs-1.8.6-111-1.i386. It was correctly updating x86_64, but conflicting with the i386 package.
file /usr/lib/ruby/1.8/abbrev.rb from install of ruby-libs-1.8.7.352-5.el5.x86_64 conflicts with file from package ruby-libs-1.8.6.111-1.i386
Why the .sh on setup-chef-server.sh?
Putting an extension on that executable means that if it’s ever rewritten in a different language all scripts that call it will need to be changed. Eww!
Good point Charles.
Not a big deal though, we can make it backwards compatible if required.
Thanks.
Hit a bit of a problem with the ruby lib packages when doing yum -y update http://pastie.org/2363945
Here’s how I fixed it: http://pastie.org/2364155
Yup, thanks for reporting, missing ruby-tk package.
Should be fixed now.
I used for Centos6.
It worked fine.
Extra Steps needed for chef to work
1. adduser -m chef
2. chmod 644 /etc/chef/webui.pem file
That is it !!! need to export and import chef from Centos 5.6 server to this Centos 6 server.
Cheers,
Thanks for the feedback @billybob.
There are specific instructions for CentOS 6 here: http://blog.frameos.org/2011/05/19/installing-chef-server-0-10-in-rhel-6-scientificlinux-6/
Did you use RBEL5 or RBEL6 packages?
However, the specific instructions do NOT mention the adduser that billybob pointed out. At least not as of March 2012.
What is the name of the chef-client package?
I only see chef-server packages.
thanks
Same here – I don’t see the chef-client package.
“No package chef-client available.”
@Igor, the name of the package for the Chef client is ‘rubygem-chef’:
yum install rubygem-chef
Yup, that worked – thanks! :)
rpm -ql rubygem-chef-0.10.6-1.el5.centos |grep init.d\/chef-client
/etc/rc.d/init.d/chef-client
After:
Starting chef-server: [ OK ]
Starting chef-server-webui: [ OK ]
Starting chef-solr: [ OK ]
Starting chef-expander: [ OK ]
I’m getting “Connection refused” -when trying to connect to the server. Any clues?
Not sure @Yehia, firewall? “service iptables off” will turn it off.
did service iptables stop but no joy.
# curl http://localhost:4040 -v
* About to connect() to localhost port 4040
* Trying 127.0.0.1… Connection refused
* couldn’t connect to host
* Closing connection #0
curl: (7) couldn’t connect to host
Have a look at the Chef logs in /var/log/chef and try to find if the service is running:
ps aux|egrep “chef-server.*worker” should list something like this:
https://gist.github.com/1476140
And “netstat -tlpn|grep chef” should list the processes listening in 4000 (api) and 4040 (server):
https://gist.github.com/1476149
Apparently, the server is running but not it’s WebUI (no logs in /var/log/chef/server-webui.log). I started it manually and it works now. Thanks.
# ll /var/log/chef/server-webui.log
-rw-r–r– 1 root root 0 Dec 13 16:58 /var/log/chef/server-webui.log
# service chef-server-webui start
Starting chef-server-webui: [ OK ]
# ps aux|egrep “chef-server.*worker”
chef 19234 0.0 1.7 47876 35760 ? S Dec13 0:05 merb : chef-server (api) : worker (port 4000)
chef 29868 29.1 1.6 39016 33828 ? S 14:52 0:02 merb : chef-server-webui : worker (port 4040)
# curl http://localhost:4040
You are being <a href="/users/login?…… [snip]
I followed the instructions. But when running the setup script i get this out
Checking RabbitMQ…
Starting CouchDB…
Starting couchdb: already running [WARNING]
Enabling Chef Services…
Starting Chef Services…
Starting chef-server: [FAILED]
Starting chef-server-webui: [FAILED]
Starting chef-solr: [FAILED]
Starting chef-expander: /usr/lib/ruby/1.8/openssl/cipher.rb:22: Cipher is not a module (TypeError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/1.8/openssl.rb:20
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/1.8/securerandom.rb:36
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/gems/1.8/gems/uuidtools-2.1.1/lib/uuidtools.rb:35
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/node.rb:21
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/vnode_supervisor.rb:27
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/cluster_supervisor.rb:25
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/chef-expander:27
from /usr/bin/chef-expander:19:in `load’
from /usr/bin/chef-expander:19
[FAILED]
Make sure you don’t have any Ruby or Rubygems installed before you run setup-chef-server.sh command.
I tried both RHEL install guides from the Chef website and couldn’t get either to work after 2 days. Came here and had it up and running in about 15 minutes.
any ideas about the following error?
Error in PREIN scriptlet in rpm package couchdb-1.0.1-2.el5.rf.x86_64
error: %pre(couchdb-1.0.1-2.el5.rf.x86_64) scriptlet failed, exit status 9
error: install: %pre scriptlet failed (2), skipping couchdb-1.0.1-2.el5.rf
on a Centos5 64bit
(Chef services are starting OK)
Hello.I installed, install the client, using the knife bootstrap 172.23.164.120 -r ‘ recipe [ chef-client ] ‘ -u root -p 108204 error as follows:Bootstrapping Chef on 172.23.164.120ERROR: TypeError: can’t convert false into StringDo not know why?
i followed this procedure but i got the error-
–> Missing Dependency: java-1.6.0-openjdk is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch
(rbel5)
rubygem-chef-server-0.10.6-1.el5.centos.noarch from rbel5 has depsolving problem
–> Missing Dependency: java-1.6.0-openjdk-devel is needed by package rubygem-chef-server-0.10.6.1.el5.centos.noarch (rbel5)
rubygem-chef-server-0.10.6-1.el5.centos.noarch from rbel5 has depsolving problems
–> Missing Dependency: libxml2-devel is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch (rbel5)
Error: Missing Dependency: java-1.6.0-openjdk is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch
(rbel5)
Error: Missing Dependency: java-1.6.0-openjdk-devel is needed by package rubygem -chef-server-0.10.6-1.el5.centos.noarch (rbel5)
Error: Missing Dependency: libxml2-devel is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch (rbel5)
You could try using –skip-broken to work around the problem
You could try running: package-cleanup –problems
package-cleanup –dupes
rpm -Va –nofiles –nodigest
The program package-cleanup is found in the yum-utils package.
— some dependencies are missing . please help to overcome this problem.
–> Missing Dependency: java-1.6.0-openjdk is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch
(rbel5)
rubygem-chef-server-0.10.6-1.el5.centos.noarch from rbel5 has depsolving problem
–> Missing Dependency: java-1.6.0-openjdk-devel is needed by package rubygem-chef-server-0.10.6.1.el5.centos.noarch (rbel5)
rubygem-chef-server-0.10.6-1.el5.centos.noarch from rbel5 has depsolving problems
–> Missing Dependency: libxml2-devel is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch (rbel5)
Error: Missing Dependency: java-1.6.0-openjdk is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch
(rbel5)
Error: Missing Dependency: java-1.6.0-openjdk-devel is needed by package rubygem -chef-server-0.10.6-1.el5.centos.noarch (rbel5)
Error: Missing Dependency: libxml2-devel is needed by package rubygem-chef-server-0.10.6-1.el5.centos.noarch (rbel5)
You could try using –skip-broken to work around the problem
You could try running: package-cleanup –problems
package-cleanup –dupes
rpm -Va –nofiles –nodigest
The program package-cleanup is found in the yum-utils package.
i am getting the following Error .plz help if you know.
Starting chef-server: [FAILED]
Starting chef-server-webui: [FAILED]
Starting chef-solr: /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs’: Could not find chef-solr (>= 0) amongst [bunny-0.7.9, chef-10.16.2, erubis-2.7.0, highline-1.6.15, ipaddress-0.8.0, json-1.6.1, mime-types-1.19, mixlib-authentication-1.3.0, mixlib-cli-1.2.2, mixlib-config-1.1.2, mixlib-log-1.4.1, mixlib-shellout-1.1.0, moneta-0.6.0, net-ssh-2.2.2, net-ssh-gateway-1.1.0, net-ssh-multi-1.1, ohai-6.14.0, polyglot-0.3.3, rest-client-1.6.7, systemu-2.5.2, treetop-1.4.12, uuidtools-2.1.3, yajl-ruby-1.1.0] (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec’
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1210:in `gem’
from /usr/bin/chef-solr:18
[FAILED]
Starting chef-expander: /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs’: Could not find chef-expander (>= 0) amongst [bunny-0.7.9, chef-10.16.2, erubis-2.7.0, highline-1.6.15, ipaddress-0.8.0, json-1.6.1, mime-types-1.19, mixlib-authentication-1.3.0, mixlib-cli-1.2.2, mixlib-config-1.1.2, mixlib-log-1.4.1, mixlib-shellout-1.1.0, moneta-0.6.0, net-ssh-2.2.2, net-ssh-gateway-1.1.0, net-ssh-multi-1.1, ohai-6.14.0, polyglot-0.3.3, rest-client-1.6.7, systemu-2.5.2, treetop-1.4.12, uuidtools-2.1.3, yajl-ruby-1.1.0] (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec’
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1210:in `gem’
from /usr/bin/chef-expander:18
[FAILED]