After I dabbled with CentOS 7 a few weeks ago I decided to take the plunge and upgrade the few servers I run at DigitalOcean to CentOS 7. I run two machines, one is a Puppet and Salt Master, the second runs Docker.

Puppet Master Server

A while back I added a few bash scripts to deploy both a Puppet Master & Agent to GitHub, as Puppet provide a repo for CentOS 7 I decided to just update the installation script to use this repo and then give ago. I use stephenrjohnson/puppet to deploy the Puppet Master. the Puppet part worked, however it failed to install Passenger and its Apache module because there is no mod_passenger available for CentOS 7 yet. To get around this I grabbed the require packages from The Foremans nightly builds repo. This turned the initial yum install line into the following;

<br>yum install -y vim-enhanced git <a href="http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" data-href="http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" target="_blank">http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm</a> <a href="https://anorien.csc.warwick.ac.uk/mirrors/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm" data-href="https://anorien.csc.warwick.ac.uk/mirrors/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm" target="_blank">https://anorien.csc.warwick.ac.uk/mirrors/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/mod_passenger-4.0.18-9.5.el7.x86_64.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/mod_passenger-4.0.18-9.5.el7.x86_64.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/mod_passenger-4.0.18-9.5.el7.x86_64.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-4.0.18-9.5.el7.x86_64.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-4.0.18-9.5.el7.x86_64.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-4.0.18-9.5.el7.x86_64.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-libs-4.0.18-9.5.el7.x86_64.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-libs-4.0.18-9.5.el7.x86_64.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-native-libs-4.0.18-9.5.el7.x86_64.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-4.0.18-9.5.el7.x86_64.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-4.0.18-9.5.el7.x86_64.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/rubygem-passenger-4.0.18-9.5.el7.x86_64.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-1.4.5-3.el7.noarch.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-1.4.5-3.el7.noarch.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-1.4.5-3.el7.noarch.rpm</a> <a href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-doc-1.4.5-3.el7.noarch.rpm" data-href="http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-doc-1.4.5-3.el7.noarch.rpm" target="_blank">http://yum.theforeman.org/nightly/el7/x86_64/rubygem-rack-doc-1.4.5-3.el7.noarch.rpm</a> <br>

Apache Configuration

Now everything was being installed correctly, however Apache refused to start due to the following error;

<br>Invalid command ‘RackAutoDetect’, perhaps misspelled or defined by a module not included in the server configuration<br>

This was due to the presence of RackAutoDetect Off and RailsAutoDetect Off in the puppet_passenger.conf.erb file. Once these two lines were removed everything worked.

The final script can be found here

Puppet Configuration

I have had my base Puppet Configration on GitHub for a while. So my next move was to grab a copy of the configuration and try it. For the most part this worked, there were a few errors though.

  • man was not available so was removed
  • jwhois was replaced with whois
  • The firewall module was not able to use iptables-save even though iptables was installed and configured, installing iptables-services resolved this

The rest of the packages and configuration worked as expected.

Docker Server

This time I tried the Puppet Agent install script, it worked first time;

<br>curl -fsS <a href="https://raw2.github.com/russmckendrick/puppet-install/master/agent-el7" data-href="https://raw2.github.com/russmckendrick/puppet-install/master/agent-el7" target="_blank">https://raw2.github.com/russmckendrick/puppet-install/master/agent-el7</a> | bash -s puppet.master.com<br>

Once I had Puppet installed I ran puppet agent — test and was greeted with lots of NGINX errors, but thats all. Everything else worked as expected.


The only issue here was the Puppet module I am using to install and configure NGINX was using http://nginx.org/packages/rhel/6/ I updated it to use http://nginx.org/packages/centos/7/ and hey presto, server is back to working as before.


In all, other than having to tweak some packages to get services running it wasn’t as bad as I thought it would be. Considering the release is still less than a month old I expected to have to do a lot more work than I did to get everything up and running how I had it previously.

So would I run it production?

Yes & No. If I was running a service which didn’t anything other standard repository packages then I would have no problem running it in production, for some of the none standard stuff like the Puppet Master server, I would give it a few more weeks until the required packages start to filter down to more production ready repositories.

Written by Russ McKendrick

I am he as you are he as you are me and we are all together

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s