Running puppetmaster with the built in webserver from Ruby is not exactly scalable and puppet will suffer from performance issues. After researching, I've come across the following solution,
- nginx, with ruby passenger.
More robust and can scale easily to a couple of hundred hosts. I have not personally run this on a environment of more that 40 servers. So lets start with the setup.
- Using latest Centos 6.4
- Puppet repo added to yum (# rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm)
- Remove any nginx installations (# yum remove nginx)
Once your server virtual machine is updated, lets get ready for the installation.
- # yum install -y ruby rubygems ruby-devel.x86_64 puppet puppet-server gcc make pcre-devel zlib-devel openssl-devel pam-devel curl-devel gcc-c++
- # gem install rack passenger
- # /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/bin/passenger-install-nginx-module
- Follow the onscreen instructions. This script will install the passenger module, as well as getting the latest nginx and compiling it under /opt/nginx.
- This will take a while :)
- # ln -s /opt/nginx/conf /etc/nginx
- # ln -s /opt/nginx/logs /var/log/nginx
- # curl -L https://raw.github.com/anythinglinux/misc_scripts/master/nginx/initd_nginx.sh -o /etc/init.d/nginx; chmod +x /etc/init.d/nginx
- # curl -L https://raw.github.com/anythinglinux/misc_scripts/master/nginx/sysconfig_nginx -o /etc/sysconfig/nginx
- # mkdir -p /etc/nginx/conf.d
- We will be placing the puppet master virtual host under the conf.d directory. This keeps things neat and tidy!
- # curl -L https://raw.github.com/anythinglinux/misc_scripts/master/nginx/nginx.conf -o /etc/nginx/nginx.conf
- # curl -L https://raw.github.com/anythinglinux/misc_scripts/master/nginx/puppet.conf-o /etc/nginx/conf.d/puppet.conf
- Edit the puppet.conf file and replace puppet01.test.net with your FQDN servername!
- # puppet master --no-daemonize --verbose
- Once all certs are created press CTRL+c to quit.
- View that the certs where created, # ls -l /var/lib/puppet/ssl/*/*
- MAKE SURE THE SERVER NAMES MATCH UP!
- # mkdir -p /etc/puppet/rack/public
- # curl -L https://raw.github.com/anythinglinux/misc_scripts/master/nginx/puppet_rack/config.ru -o /etc/puppet/rack/config.ru
- # chown -R puppet:puppet /etc/puppet/rack
- # chkconfig --add nginx; chkconfig nginx on; chkconfig puppetmaster off
If everything went to plan you should be running puppet master thru nginx and passenger on port 8140 (ssl).
Please ensure that all the setting are correct on the files.
Feel free to comment :)