配置管理puppet

目录:

1、功能

2、服务器

3、管理对应配置文件

4、脚本相关

5、puppet配置相关

6、puppet客户端安装脚本

7、主机配置文件新增节点详细

8、新增文件项目

9puppet管理命令

 

一、配置管理puppet

1、功能:

管理rsync配置文件及scribe配置文件

 

2、服务器:

PUPPET MASTER

10.39.1.41

 

PUPPET CLIENT

RSYNC

10.39.0.95、10.39.0.96、10.39.0.97、10.39.0.98

 

SCRIBE中继池:

http://general.wiki.erp.sina.com.cn/ScribeRelay

      

SUDA中继池:

http://general.wiki.erp.sina.com.cn/ScribeRelay

       

SCRIBE接收集群:

http://general.wiki.erp.sina.com.cn/ScribeReceiveCluster_ScribeCompactNg

 

3管理对应配置文件

MASTER

/etc/puppet/manifests/scribe/scribe.server.conf_zhj

/etc/puppet/manifests/scribe/scribe_calligraphus.conf_java_scribe08

/etc/puppet/manifests/scribe/suda/beixian_scribe.conf

/etc/puppet/manifests/scribe/suda/qinzhou_scribe.conf

/etc/puppet/manifests/scribe/suda/saier_scribe.conf

/etc/puppet/manifests/scribe/suda/yongfeng_scribe.conf

/etc/puppet/manifests/scribe/suda/jingan_scribe.conf

/etc/puppet/manifests/scribe/suda/qixinggang_scribe.conf 

/etc/puppet/manifests/scribe/suda/shaxi_scribe.conf

/etc/puppet/manifests/scribe/suda/xidan_scribe.conf

/etc/puppet/manifests/rsync/rsyncd.conf_yz_94-98

 

客户端

scribe:/usr/local/calligraphus-release/conf/calligraphus.conf

rsync:/etc/init.d/rsyncd.conf

 

4、脚本相关

RSYNC主动下发更新脚本

/etc/puppet/manifests/rsync/run_rsync.sh

 

SCRIBE主动下发更新脚本

/etc/puppet/manifests/scribe/puppet_scribe.sh

 

5puppet配置相关

Puppet配置文件:

/etc/puppet/puppet.conf

 

Puppet主机配置文件:

/etc/puppet/manifests/site.pp

 

6puppet客户端安装脚本:

rsync 10.39.1.41::backupnew/puppet/

centos5.4-6.0  ==>  puppet_client_install_20140610.tar.gz

centos6.0-6.5  ==>  puppet_client_install_centos65_20150606.tar.gz

 

7、主机配置文件新增节点详细:

node '75-6-36-yf-core.jpool.sinaimg.cn' {              => 定义一个节点

file { "/data0/scribe/bin/scribe.server.conf":           => 客户端文件位置

                ensure  => present,              => 文件不存在会自动创建

                group   => "root",               => 文件属组

                owner   => "root",               => 文件属主

                mode    => "0644",              => 文件权限

                source  => "puppet:///scribe/scribe.server.conf_zhj"  =>文件源

     }

 

exec { "/data0/scribe/bin/scribe.server.conf":          => 定义名称

     path => ["/usr/sbin","/usr/bin","/bin","/sbin"],    => 命令环境变量

     command => "/usr/bin/scribe_ctrl reload",       => 执行的命令

     subscribe => file["/data0/scribe/bin/scribe.server.conf"],  => 监控的文件

     refreshonly => true                          => 更新是否执行命令

     }

 

8、新增文件项目

首先修改: /etc/puppet/fileserver.conf

增加示例:

[jobclient_v2]                         => 项目名称

path /etc/puppet/manifests/jobclient_v2  => 项目所在路径

allow *                               => 允许权限

 

其次按照配置的路径创建相关目录:

mkdir /etc/puppet/manifests/jobclient_v2

 

9puppet管理命令

Puppet客户端主动拉取更新:

puppetd --test --server masterhostname

 

puppet服务端授权:

puppetca -s hostname

 

查看申请资源的puppet客户端

puppetca -l

posted @ 2016-04-08 14:07  李永三  阅读(343)  评论(0编辑  收藏  举报