Puppetnginx

架构图

优点

*性能:nginx因为精简,运行起来非常快速,许多人声称它的比pound更高效。
*日志,调试:在这两个方面,nginx比pound更简洁。
*灵活性:nginx的处理SSL客户端验证是在应用层上实现的,而不会终止SSL连接。
*nginx可以拿来即用, 不需要像pound打补丁,同时配置的语法也很直观。

缺点

一但在服务端使用puppetca进行sgin以后,无法主动在服务端撤销授权,
不过你可以在客户端删除ssl目录来取消授权,一般情况下没什么影响。


配置步骤

配置yum

用光盘iso在本地建个yum软件仓库,并配置好epel源

mount rhel54.iso /mnt -o loop,ro

vim /etc/yum.repos.d/local.repo 写入以下配置

[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[epel]
name=Red Hat Enterprise Linux $releasever - $basearch - epel
baseurl=http://mirrors.sohu.com/fedora-epel/5Server/$basearch
enabled=1
gpgcheck=0

配置Mongrel

安装puppet软件包

yum install puppetmaster puppet rubygem-mongrel

编辑 /etc/sysconfig/puppetmaster添加以下两行

PUPPETMASTER_PORTS=( 18140 18141 18142 18143 )
PUPPETMASTER_EXTRA_OPTS="—servertype=mongrel —ssl_client_header=HTTP_X_SSL_SUBJECT"

启动服务

service puppetmaster start

配置nginx

下面我们来配置nginx代替默认的webserver,我们可以用nginx来实现动静分离,
把静态的文件直接交给nginx来处理,比如files和modules模块中的files,
动态的再交给puppet,各扬所长,使其支持更多的节点

下载nginx-0.8.7或以上的源码包

wget http://nginx.org/download/nginx-0.8.47.tar.gz

tar zxf nginx-0.8.47.tar.gz

./configure —with-http_stub_status_module —with-http_ssl_module

make && make install

vim /usr/local/nginx/conf/nginx.conf 写入以下配置

user  daemon daemon;
worker_processes 4;
worker_rlimit_nofile 65535; error_log /var/log/nginx-puppet.log notice;
pid /var/run/nginx-puppet.pid; events {
use epoll;
worker_connections 32768;
} http {
sendfile on;
tcp_nopush on; keepalive_timeout 300;
tcp_nodelay on; upstream puppetmaster {
server 127.0.0.1:18140;
server 127.0.0.1:18141;
server 127.0.0.1:18142;
server 127.0.0.1:18143;
} server {
listen 8140;
root /etc/puppet; ssl on;
ssl_session_timeout 5m;
ssl_certificate /opt/puppet/ssl/certs/puppet.example.com.cn.pem;
ssl_certificate_key /opt/puppet/ssl/private_keys/puppet.example.com.cn.pem;
ssl_client_certificate /opt/puppet/ssl/ca/ca_crt.pem;
ssl_crl /opt/puppet/ssl/ca/ca_crl.pem;
ssl_verify_client optional; # File sections
location /production/file_content/files/ {
types { }
default_type application/x-raw;
alias /etc/puppet/manifests/files/;
} # Modules files sections
location ~ /production/file_content/modules/.+/ {
root /etc/puppet/modules;
types { }
default_type application/x-raw;
rewrite ^/production/file_content/modules/(.+)/(.+)$ /$1/files/$2 break;
} # Ask the puppetmaster for everything else
location / {
proxy_pass http://puppetmaster;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify $ssl_client_verify;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_buffer_size 16k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_read_timeout 65;
}
}#server end
}#http end

启动nginx

/usr/local/nginx/sbin/nginx


原文地址:http://projects.reductivelabs.com/projects/puppet/wiki/Using_Mongrel_Nginx
参考文档:http://www.masterzen.fr/2009/07/21/new-ssl-features-for-nginx/
翻译整理:智弘

Puppetnginx 架构图的更多相关文章

  1. Atitit jOrgChart的使用  组织架构图css html

    Atitit jOrgChart的使用  组织架构图css html 1. 项目要做组织架构图,要把它做成自上而下的树形结构,于是决定1 2. Html导入 以来的css js1 2.1. 数据来源 ...

  2. 飞达资讯App总体介绍及关系架构图

    飞达资讯App总体介绍: 下图为飞达资讯App的关系架构图: 该App关系架构图所需的图片云盘链接地址:http://pan.baidu.com/s/1gfHIe4b 提取密码:x1nr 该App的云 ...

  3. 关于SAP4.7的几个架构图

    http://blog.itpub.net/92530/viewspace-154881/ 1.SAP基本架构图 2.SAP的应用层的工作进程架构图 3.SAP的内存类型图 4.SAP数据访问架构图 ...

  4. android系统架构图

    android的系统架构和其操作系统一样,采用了分层的架构.从架构图看,android分为四个层,从高层到低层分别是应用程序层.应用程序框架层.系统运行库层和Linux核心层. 1.应用程序 Andr ...

  5. MyBatis架构图

    MyBatis架构 MyBatis依赖的jar不多,而且代码行数也没多少,其中使用了大量的设计模式,值得好好学习.下图是MyBatis的一张架构图,来自Java框架篇—Mybatis 入门. Myba ...

  6. struts2原理架构图

    struts2 原理架构图

  7. iphone开发 IOS 组织架构图

    转载自 :http://blog.csdn.net/mashi321323/article/details/18267719   登录|注册     mashi321323的专栏       目录视图 ...

  8. LoadRunner相关架构图

    LoadRunner概览图: Lr架构图:

  9. live555源码学习1---Socket流程架构图

    怎么说呢,换了工作环境,好多软件公司禁止使用了,有道笔记也无法使用了.发现博客园还可以上传图片,以后只能在这里记录了. 越发的感觉需要尽快把live555的代码拿下.因为工作环境问题,webrtc的源 ...

随机推荐

  1. 安卓新发布机制----app bundle

    Android App Bundle是一种改进的应用程序打包方式,能大幅度减少应用体积 unity可以直接导出appbundle,只需要在导出的时候勾选 但是通常项目有sdk离不开java端,我这里是 ...

  2. socket之UDP协议,并发编程介绍,操作系统发展史

    socket之UDP协议 1.UDP协议 UDP 是User Datagram Protocol的简称, 中文名是用户数据报协议,是OSI(Open System Interconnection 参考 ...

  3. Star all over again.

    0x00前言 经过了一上午的折腾之后,博客的界面勉强可观,今天下午将之前的所有博客全部删除,重新开始写属于自己的博客,而不是只把它当作一个收藏夹,转载其他人的文章. 0x01近来感想 有感而发,随便写 ...

  4. group_by和having的用法

    #encoding: utf-8 from sqlalchemy import create_engine,Column,Integer,String,Float,func,and_,or_,Enum ...

  5. 复杂json格式转化为javabean

    工具阿里巴巴的fastjson包 <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson --><dependenc ...

  6. kettle An error occurred, processing will be stopped: 错误 解决方法

    上午在使用KETTLE时,报了一个 An error occurred, processing will be stopped: 错误,手动跑没有问题,用jekens调用就报错. 具体原因不清楚,后面 ...

  7. 使用正则实现php的trim函数,支持全角空格

    之前使用trim来移除一段文字开头的空格,移除不掉,发现是全角空格的锅. 便专门添加对全角空格的移除: trim($str," "); 但是效果并不好,因为trim函数对多字节字符 ...

  8. 前端html+css标签简介(可能就我自己看的懂-。-)

    标签集合 # html 文字标签:修改样式 -<font></font> -属性:size:大小,范围1-7,大于7时默认7 color:颜色,英文单词或者十六进制(editp ...

  9. 1,全局变量;2,图形验证码;3,解决bug的毅力

    通过这一整天的学习,主要解决了这三个: 1,全局变量 在函数外部定义: var gloabl: function test(){ global = " ":    //不能写成va ...

  10. python基础之内置函数和匿名函数

      内置函数 学习函数以后多了很多概念,例如函数的命名空间,函数的作用域,函数的调用等等,函数的作用就是为了实现某些功能而方便以后可以调用,内置函数就是这样的一些公共的函数,被称为内置函数. 我们就一 ...