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. MATLAB灰色关联度分析

    目录 1.释名 2.举例 3.操作步骤与原理详解 4.总结 5.附录:MATLAB代码 @ 1.释名 灰色关联度分析(Grey Relation Analysis,GRA),是一种多因素统计分析的方法 ...

  2. win10切换网络位置,加入已经建好的工作网络或者家庭网络时输入密码仍然加不成功时

    为了连接办公室的共享打印机,WIN10网络需要加入已经建好的家庭组,本机WIN10已经是专用网络,但是加入家庭组输入家庭组密码后,加不进去: 经过windows错误检测,查出是网络IPV6配置关掉导致 ...

  3. 华为HCNA乱学Round 7:VLAN间路由

  4. DQN算法原理详解

    一. 概述 强化学习算法可以分为三大类:value based, policy based 和 actor critic. 常见的是以DQN为代表的value based算法,这种算法中只有一个值函数 ...

  5. python的变量 以及操作系统

    变量 : (变量真没有什么好说的) 变: 就是会变化的 量:衡量现实的事物标准 python 中引用 变量值的作用 操作系统:就计算机控制硬件的软件,定义各个硬件的接口给应用软件调用 应用软件:在操作 ...

  6. s7-200日常使用烂笔头

    这篇文章只是记录我的苦逼自控之路,有些是书上的,有些是自己发现的,不记载网上得出来的一些东西.只为强化记忆以及便于翻阅. 1.今天使用PC\PPI cable线缆连接成功了200,这个线是盗版线,之前 ...

  7. 关于Linux文本处理“三剑客”的一些小操作。

    Linux文本处理“三剑客”,即grep.sed.awk,这是Linux中最核心 的3个命令. 一.首先做个简单的介绍: 1.awk:linux三剑客老大,过滤,输出内容,一门语言.NR代表行号. 2 ...

  8. 什么是PWA

    什么是PWA:https://www.jianshu.com/p/299c9c720e56 2019前端必会黑科技之PWA:https://www.jianshu.com/p/098af61bbe04 ...

  9. Keras模型训练的断点续训、早停、效果可视化

    训练:model.fit()函数 fit(x=None, y=None, batch_size=None, epochs=, verbose=, callbacks=None, validation_ ...

  10. VS Code 配置碰到的问题

    VS Code 呈现缩进参考线以及语法高亮改变 找到 首选项——>设置→搜索renderIntentGuides→将此选项改为true(默认为false),就可以了.