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. python 学习jieba库遇到的问题及解决方法

    昨天在课堂上学习了jieba库,跟着老师写了同样的代码时却遇到了问题: jieba分词报错AttributeError: module 'jieba' has no attribute 'cut' 文 ...

  2. flink部署

    参考: https://ververica.cn/developers-resources/ #flink参数 https://blog.csdn.net/qq_35440040/article/de ...

  3. [c++] WINAPI

    int WINAPI WINMain 中,WINAPI含义 在windef.h头文件中有如下定义: #define WINAPI __stdcall #define APIENTRY WINAPI 函 ...

  4. Array of Doubled Pairs

    Given an array of integers A with even length, return true if and only if it is possible to reorder ...

  5. 算法 - k-means算法

    一.聚类思想 所谓聚类算法是指将一堆没有标签的数据自动划分成几类的方法,属于无监督学习方法,这个方法要保证同一类的数据有相似的特征,如下图所示:     根据样本之间的距离或者说是相似性(亲疏性),把 ...

  6. Java第七周课堂示例总结

    一.super();调用基类构造方法 代码: class Grandparent{ public Grandparent(){ System.out.println("GrandParent ...

  7. 2019.11.9 csp-s 考前模拟

    2019.11.9 csp-s 考前模拟 是自闭少女lz /lb(泪奔 T1 我可能(呸,一定是唯一一个把这个题写炸了的人 题外话: 我可能是一个面向数据编程选手 作为一个唯一一个写炸T1的人,成功通 ...

  8. JavaScript更改css样式

    来源:https://www.w3school.com.cn/js/js_htmldom_css.asp 1, document.getElementById(id).style.property = ...

  9. Mysql8 root密码忘记了

    需要确定自己的mysql版本是否是8 [root@smonitor ~]# mysql --version mysql Ver 8.0.13 for Linux on x86_64 (MySQL Co ...

  10. Cypher查询在Neo4j中加载具有点数据类型属性的CSV文件

    我有一个CSV文件,标有3列,ID,纬度,经度.我想将CSV文件加载到Neo4j中并创建具有上述属性的节点.Location:属性应该是具有纬度和经度子属性的点数据类型. CSV是: ID,latit ...