WEBrick/Rack Puppet Master
Puppet's Services: The WEBrick Puppet Master
Puppet master is the application that compiles configurations for any number of puppet agent nodes, using Puppet code and various other data sources.
Puppet has the built-in capability to run a complete puppet master server using Ruby’s WEBrick library.
The WEBrick puppet master server is not capable of handling production-level numbers of agent nodes. Since it can’t handle concurrent connections, it will be quickly overwhelmed by as few as 10 agents. You should never run a WEBrick puppet master in production, and should always configure a Rack puppet master server instead.
Controlling the Service
The WEBrick puppet master runs as a single Ruby process. You can manage it in one of two ways.
1.Use the puppetmaster Init Script
2.Run puppet master on the Command Line
The WEBrick Puppet Master’s Run Environment
The WEBrick puppet master runs as a single Ruby process. This single process does everything related to handling puppet agent requests: It terminates SSL, routes HTTP requests, and executes the Ruby methods that recognize agent requests and build responses to them.
Configuring a WEBrick Puppet Master
As described elsewhere, the puppet master application reads most of its settings from puppet.conf and can accept additional settings on the command line.
When running from the command line, puppet master can directly accept command line options. When running via an init script, it sometimes gets command line options from an init script config file. The location and format of this file will vary depending on your platform.
To change the puppet master’s settings, you should generally use puppet.conf. The only two options you may want to set on the command line or in the init script config file are --verbose or --debug, to change the amount of detail in the logs.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Puppet's Services: The Rack Puppet Master
Puppet includes a basic puppet master web server based on Ruby’s WEBrick library. (This is what Puppet uses if you run puppet master on the command line or use most puppetmaster init scripts.)
You cannot use this default server for real-life loads, as it can’t handle concurrent connections; it is only suitable for small tests with ten nodes or fewer. You must configure a production quality web server before you start managing your nodes with Puppet.
Any Rack-based application server stack will work with a puppet master, but if you don’t have any particular preference, you should use Passenger combined with Apache. This guide shows how to configure Puppet with this software.
Controlling the Service
Under Rack, the puppet master processes are started and managed by your Rack web server. The way to start and stop the puppet master will depend on your specific web server stack.
If your Rack stack isn’t running any other applications or sites, you can simply start and stop the whole server process; if it also provides other services, as a Passenger/Apache stack sometimes does, you may need to disable the puppet master’s virtual host and do a graceful restart.
The Rack Puppet Master’s Run Environment
Rack and the puppet master application each have various expectations about their environment. To make them work together, you’ll need to make sure these expectations are met.
Configuring a Rack Puppet Master
As described elsewhere, the puppet master application reads most of its settings from puppet.conf and can accept additional settings on the command line. When running under Rack, puppet master gets its command line options from the config.ru file. By default, it only sets the confdir and vardir settings and the special --rack option.
To change the puppet master’s settings, you should use puppet.conf. The only two options you may want to set in config.ru are --verbose or --debug, to change the amount of detail in the logs.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Aside: How a Rack Puppet Master Works
A Rack web server loads and executes a special part of Puppet’s Ruby code, which creates a puppet master application object that can respond to specially formatted requests. To handle parallel requests, it can do this any number of times. (The number of workers depends on how the Rack server is configured.)
When an HTTPS request comes in, the web server passes it to Rack. Rack reformats the request, turning it into a Ruby object that contains all of the relevant information (URL, method, POST data, headers, SSL info). It then passes the formatted request to the application object.
The puppet master application reads information from the request, then builds a response, doing whatever is necessary to construct it. This may involve returning file contents, returning certificates or other credentials, or the full process of catalog compilation (request a node object from an ENC, evaluate the main manifest, load and evaluate classes from modules, evaluate templates, collect exported resources, etc.). The puppet master object then formats its response and passes it to Rack, which passes it on to the web server and the agent node that made the request.
WEBrick/Rack Puppet Master的更多相关文章
- Advacned Puppet: Puppet Master性能调优
		
本文是Advanced Puppet系列的第一篇:Puppet master性能调优,谈一谈如何优化和提高C/S架构下master端的性能. 故事情节往往惊人地类似:你是一名使用Puppet管理线上业 ...
 - Configure Puppet Master with Passenger and Apache on Centos
		
What is Passenger? Passenger (AKA mod_rails or mod_rack) is an Apache 2.x module which lets you run ...
 - Puppet master/agent installation on RHEL7
		
==================================================================================================== ...
 - 部署puppet master/agent模型
		
自己画的一个简单的架构图 agent端每隔30分钟到master端请求与自己相关的catalog. 各节点时间要同步. 依赖DNS,各节点能通过主机名能解析. 1.同步时间 # yum install ...
 - puppet master/agent
		
puppet master/agent 配置 安装 master: yum install puppet-server agent: yum install puppet 自动签名 puppet的ma ...
 - 自动化运维工具之Puppet master/agent模型、站点清单和puppet多环境设定
		
前文我们了解了puppe中模块的使用,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/14086315.html:今天我来了解下puppet的master/age ...
 - Puppet master nginx 扩展提升性能(puppet自动化系列4)
		
puppet使用SSL(https)协议来进行通讯,默认情况下,puppet server端使用基于Ruby的WEBRick HTTP服务器.由于WEBRick HTTP服务器在处理agent端的性能 ...
 - puppet master 用 nginx + unicorn 作为前端
		
目录 1. 概要 2. nginx + unicorn 配置 2.1. package 安装 2.2. 配置文件设置 2.2.1. 配置 unicorn 2.2.2. 配置nginx 2.3. 测试配 ...
 - 使用 Passenger +Apache扩展 Puppet,代替其Webrick的web框架
		
使用 Passenger +Apache扩展 Puppet,代替其Webrick的web框架 1安装 yum install ruby-devel ruby-libs rubygems libcurl ...
 
随机推荐
- NAT(未验证,后续见Linux服务器架构篇)
			
通常小型企业或是学校单位大多数仅有一条对外的联机,然后全公司内的计算机全部通过这条联机连到因特网上,此时我们更需使用IP分享器来让这一条对外联机分享给所有公司内部员工使用,那么Linux能不能达到此一 ...
 - canvas-绘制时钟
			
把最近学到的一些canvas技能全部发上来,刚开始写博客,感觉还不太习惯,不过我相信慢慢就会习惯了.不啰嗦了,把代码送上,看不懂的话可以先去学习下基础教程,把基础学好了也就能看懂了. <!DOC ...
 - C语言学习笔记 -冒泡排序
			
//冒泡排序 void main(){ , , , , }; ]); ; i<max - ; i++) { for (int j = i; j<max; j++) { if (a[i]&g ...
 - CSS Flex弹性布局
			
关于css3的flex布局,阮一峰老师的文章写的清晰易懂又全面,这里附上链接http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_s ...
 - 3-5 RPM包校验
			
1.RPM包校验 <1>rpm -V 已安装的包名 <2>选项: -V 校验制定RPM包中的文件(verify) <3>说明: <1>若没有显示任何内容 ...
 - 新浪代码部署手册   git管理工具
			
目前新浪云上的应用支持通过Git和SVN来部署代码. Git仓库地址 https://git.sinacloud.com/YOUR_APP_NAME SVN仓库地址 https://svn.sinac ...
 - poj3553 拓扑序+排序贪心
			
题意:有多个任务,每个任务有需要花费的时间和最后期限,任务之间也有一些先后关系,必须先完成某个才能开始某个,对于每个任务,如果没有越期,则超时为0,否则超时为结束时间-最后期限,求总超时时间最小的任务 ...
 - 详解LUA开发工具及其环境配置
			
LUA开发工具及其环境配置是本文要介绍的内容,主要是来了解并学习lua开发工具的使用和环境的配置,第一次接触LUA的话,就跟本人一起学习吧.看我能不能忽悠到你. LUA是语言,那么一定有编写的工具.第 ...
 - SQL Debugging
			
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn>“C:\Program Files\Debugging ...
 - lua操作常用函数学习一
			
(1)lua 和 C++之间的交互的基本知识: lua 和 C++ 之间的数据交互通过堆栈进行,栈中的数据通过索引值进行定位,(栈就像是一个容器一样,放进去的东西都要有标号)其中栈顶是-1,栈底是1, ...