[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
server = master.canghai.com
mysql -uroot -p123456 <<EOF
CREATE DATABASE dashboard CHARACTER SET utf8;
CREATE USER 'dashboard'@'localhost' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';
FLUSH PRIVILEGES;
EOF
PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17
PassengerRuby /usr/bin/ruby
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerStatThrottleRate 120
RailsAutoDetect On
ServerName master.canghai.com
DocumentRoot "/usr/share/puppet-dashboard/public/"
<Directory "/usr/share/puppet-dashboard/public/">
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
ErrorLog /var/log/httpd/master.canghai.com_error.log
LogLevel warn
CustomLog /var/log/httpd/master.canghai.com_access.log combined
ServerSignature On
vi /etc/puppet/puppet.conf
[master]
reports = store, http
reporturl = http://master.canghai.com:80/reports/upload
重启puppetmaster 服务
?
1
/etc/init.d/puppetmaster restart
这时候就可以直接用 http://ip 访问puppet Dashboard
导入报告
?
1
2
cd /usr/share/puppet-dashboard
rake RAILS_ENV=production reports:import
这时候你访问Dashboard,可以看到导入的任务.
4. 执行导入的reports
?
1
2
cd /usr/share/puppet-dashboard
rake jobs:work RAILS_ENV="production"
Download as PDF Posted by sole at 下午 9:37Tagged with: centos, linux, puppet 16 Responses to “在CentOS 6.4上安装Puppet配置管理工具”
adong says:
2013 年 6 月 11 日 at 下午 12:35 初始化数据库的时候:rake RAILS_ENV=production db:migrate
出现以下错误:
(in /usr/share/puppet-dashboard)
config.gem: Unpacked gem sass-3.1.2 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem rspec-rails-1.3.4 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem rack-1.1.6 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem will_paginate-2.3.15 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem thoughtbot-shoulda-2.10.2 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem json_pure-1.7.7 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem mocha-0.9.7 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem rdoc-3.6.1 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem factory_girl-1.3.3 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem daemons-1.0.10 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem haml-3.1.2 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
config.gem: Unpacked gem rspec-1.3.2 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
rake aborted!
syntax error on line 49, col 2: ` encoding: utf8′
(See full trace by running task with –trace)
是什么问题?
回复
sole says:
2013 年 6 月 26 日 at 上午 8:52 修改redmine目录下config中的database.yml 配置mysql连接密码时应在密码前加一个空格.
回复
MingmingS says:
2014 年 1 月 6 日 at 上午 8:35 Importing: 100% |###############################################################################################################| Time: 00:00:00
7 of 7 reports queued
这里测试用,我的report已经导出了,7条记录,但是在web页面中却没一直是— No reports found —,中间也没异常error
Adams Dun says:
2014 年 2 月 17 日 at 上午 11:31 大神,完全按照你的步骤,两台CentOS 6.4部署Puppet
到设置Passenger和apache整合的时候出现问题,提示/etc/httpd/conf.d/passenger.conf文件错误
httpd启动失败,我把那提示错误的四行注释掉以后可以启动了,可是页面显示不了。
麻烦解惑啊,不甚感激!(刚刚接触这个不是太懂,能不能方便留个邮件什么的)
LoadModule passenger_module modules/mod_passenger.so
PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17
PassengerRuby /usr/bin/ruby
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerStatThrottleRate 120
RailsAutoDetect On
ServerName puppet.jundeng.com
DocumentRoot “/usr/share/puppet-dashboard/public/”
#<Directory “/usr/share/puppet-dashboard/public/”>
Options None
#AllowOverride AuthConfig
#Order allow,deny
#allow from all
ErrorLog /var/log/httpd/puppet.jundeng.com__error.log
LogLevel warn
CustomLog /var/log/httpd/puppet.jundeng.com_access.log combined
ServerSignature On
回复
sole says:
2014 年 2 月 17 日 at 下午 1:26 注视掉干嘛?不能注视,什么报错你贴报错出来。
回复
李洁 says:
2014 年 4 月 9 日 at 上午 11:12 passenger.conf具体内容如下:
LoadModule passenger_module modules/mod_passenger.so
PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17
PassengerRuby /usr/bin/ruby
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerStatThrottleRate 120
RailsAutoDetect On
ServerName tool.temp
DocumentRoot “/usr/share/puppet-dashboard/public/”
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
ErrorLog /var/log/httpd/tool.temp__error.log
LogLevel warna
CustomLog /var/log/httpd/tool.temp_access.log combined
ServerSignature On
报错信息:Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 13 of /etc/httpd/conf.d/passenger.conf: /etc/httpd/conf.d/passenger.conf:13: was not closed.
回复
sole says:
2014 年 4 月 10 日 at 下午 9:02 不好意思,这里的< 和>被转意了,应该是这个样子
<directory "="" usr="" share="" puppet-dashboard="" public="">
回复
Adams Dun says:
2014 年 2 月 17 日 at 下午 1:42 感谢楼主耐心解答,博文中配置Apache部分有一段代码被转意了,
如果是直接粘贴,/etc/httpd/conf.d/passenger.conf文件会报错。
在这里帮忙更正一下!
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
回复
Daniel says:
2014 年 2 月 19 日 at 上午 9:12 应该是下面这样的:
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
回复
Daniel says:
2014 年 2 月 19 日 at 上午 9:13 应该是下面这样的:
#
# Options None
# AllowOverride AuthConfig
# Order allow,deny
# allow from all
#
回复
Daniel says:
2014 年 2 月 19 日 at 上午 9:14 还是被转义了,应该和Apache里面是差不多Directory是一对标签
回复
李洁 says:
2014 年 4 月 8 日 at 下午 5:05 我的web页面打开时Apache 2 Test Page 页面,我无法进入puppet管理页面
sole says:
2014 年 5 月 7 日 at 下午 2:47 不改貌似也可以访问的,我试过。
回复
Leave a Reply
Name (required)
E-mail (required)
URI
Your Comment
发表评论前,请滑动滚动条解锁
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>