With the increase in application requirements, the need for continuous expansion, the number of servers will also increase, when the number of servers is increasing, we will find a puppetmaster pressure, analytical slow, and occasionally out of "Timeout" such as the error, then what is the optimization method? We find solutions on the puppet web site, discovering that puppetmaster can configure multiple ports, combined with web proxies (recommended lightweight load balancer Nginx), so that puppetmaster affordability can be increased by at least several times, is equivalent to a large extent to optimize the processing capacity of puppet.
1. Following the previous environment settings, our server environment and software versions are:
Server System: CentOS5.8 x86_64
Ruby version: ruby-1.8.5
Puppet version: puppet-2.7.9
Nginx Version: nginx-0.8.46
2.Mongrel Installation
To use the puppet multiport configuration, you need to specify the mongrel type, which is not installed by default, and requires installation:
Yum Install-yrubygem-mongrel
3. Configure puppetmaster
Add the following two lines at the end of the/etc/sysconfig/puppetmaster file, representing the multiport, mongrel type, as shown below:
puppetmaster_ports= (8141 8142 8143 81448145)
Puppetmaster_extra_opts= "--servertype=mongrel--ssl_client_header=http_x_ssl_subject"
4. Installation of Nginx Service
Before you install, make sure that the system has installed the Pcre-devel regular library, and then compile the installation nginx, you need to add SSL module parameter support, Nginx installation process is as follows:
Yum-y Install Pcre-devel
Cd/usr/local/src
Wgethttp://nginx.org/download/nginx-0.8.46.tar.gz
Tar zxvf nginx-0.8.46.tar.gz
CD nginx-0.8.46
./configure--prefix=/usr/local/nginx--with-http_ssl_module
Make && make install && CDs. /
More Wonderful content: http://www.bianceng.cn/Servers/web/
Add WWW user groups and users, as shown in the following command:
Groupadd www
Useradd-g www www