Installing Chef 12 on CentOS 6.5
-
Start with an installation of CentOS 6.5 or RHEL 6.5.
yum -y update
You will need to go to the Chef 12 download page and download manually and then upload to your server as Opscode foolishly blocks direct links to the RPM so it just errors out if you do not have a visual browser.
Choose "Red Hat Enterprise Linux" and then choose "Red Hat Enterprise Linux 6."
Download to your computer and upload to your server, just put the RPM file into /tmp.
-
Opscode officially supports Ubuntu and RHEL. It would be nice if they added Suse. Sadly, RHEL is only supported to one version back. RHEL 7 is pretty new, but not new enough to excuse not supporting it. RHEL 6 is fine though.
In the Ubuntu family, though, Opscode only supports the rather old 10.04, 11.04 and 12.04 releases. They haven't supported a current Ubuntu in nearly two and a half years. 12.10, 13.04, 13.10 and 14.04 have all been missed and 14.10 is only one month away now! So it looks like Ubuntu support is, at best, an afterthought. 12.04 is not just long in the tooth but has some stability issues that were addressed in later releases. So I would avoid Chef on Ubuntu.
-
Before installing, we need to disable SELinux as it does not play nice with Chef.
setenforce permissive
-
Now you are install the Chef Server...
rpm -ivh chef-server-*.rpm
Once that has completed...
chef-server-ctl reconfigure chef-server-ctl test
-
Add these two lines to /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
They fit nicely under the matching line for --dport 22.
Once you have edited that file, reload the firewall rules using this command:
service iptables reload
-
@scottalanmiller said:
Before installing, we need to disable SELinux as it does not play nice with Chef.
setenforce permissive
This did not survive a reboot on my CentOS 7 box. Is that supposed to be a permanent change? Or should the config file be edited also?
-
@JaredBusch said:
@scottalanmiller said:
Before installing, we need to disable SELinux as it does not play nice with Chef.
setenforce permissive
This did not survive a reboot on my CentOS 7 box. Is that supposed to be a permanent change? Or should the config file be edited also?
That's a "live" change. It does not change the permanent configuration. To change the permanent setup edit...
cat /etc/sysconfig/selinux
And modify the SELINUX= line to...
SELINUX=permissive
-
@scottalanmiller I was just wonder if it needed to be permanent or not.
-
@JaredBusch said:
@scottalanmiller I was just wonder if it needed to be permanent or not.
Most things only need it during install time and it can be re-enabled once the installation is done. Not always true, but typically. MySQL and MariaDB databases being common cases where you turn it off during setup and turn it back on afterwards.
-
Now we need to install the management console (you want one of those, right?) With Chef 12 there is a new process for this and it is not documented from Opscode which is very frustrating.
First we have to do the physical install:
chef-server-ctl install opscode-manage
Then we have to know that it needs to be configured post install, nothing will tell you to do this:
opscode-manage-ctl reconfigure
That's it, now you can navigate to your server.
-
The first time that you log in you will be required to create a new account. Simply follow the on-screen prompts to do so. This is quick and easy.
Once you have done this you will be prompted to "Create New Organization" as, obviously, none currently exists. Click the button to do so...
-
You will need both a full name and a short name for the organization. The full name should be the actual company name. The short name should be short, easy and all lower case. It's just for internal Chef reference.
That's it, you are up and running with Chef!
-
There we go, all set. Hopefully that will help some people get started with Chef since it is basically really simple but lacking a few specific things that you "just have to know" because Opscode does not document them (a gap in the Chef 12 documents) it is very hard for no reason.