Trying out Chef (Opscode)

A friend of mine recently provided me with access to create some VPS machines, so I’ve set up:

  • A Master Chef server
  • A Database server
  • A Webhosting server

Now I’m trying to learn how to set up Chef on them. I tried doing it as described on the Chef website. It describes installing Chef Server on all machines. I was having problems with this and, through a quick search, found another site which details installing Chef Server on the main server and the Client software on the others. Not sure if this is correct.  However, I tried both ways.

I had a problem with one of the VPS machines and found this solution: Please add a server section for to /etc/opscode/private-chef.rb! It turns out the VPS did not have the hostname set up as a FQDN name. Fixing this resolved that problem.

I’ve set up the server and have tried creating users, however I get an error that Chef cannot connect to the Nginx server on port 443 on 127.0.0.1  I’m trying to figure out why. I’ve disabled SELinux as recommended and even added in specific firewall rules through iptables to try and allow connections. I can’t connect to port 443 on the Master server from my desktop either. Not sure what’s going on there.  I guess I can create users on the Master server, but not Client servers. It just worked now with the Master server. There must be some way to connect the clients to the server for user creation… or perhaps only the Master server has users..?

At the moment, the Master server seems to be up and working but cannot be contacted outside the VPS network. Not sure if I have to install some Chef WebUI application..?  One VPS has the client software installed but I haven’t found how to configure that to connect to the Master server yet. We’ll see how it goes.

  1. Something interesting just came to light.
    I was having a problem running a reconfigure. It kept asking to create another entry in chef-server.rb
    It turns out Chef requires your entries in /etc/hosts to be in the format:
    (ip address) (fqdn) (hostname)
    Whereas I had it set up as:
    (ip address) (hostname) (fqdn)

  2. Just discovered the reason I can’t access the WebUI is iptables. Allowed ports 80,443 & 9683 but I still can’t reach it externally.

Leave a Comment

%d bloggers like this: