puppet dashboard的安装

以下过程基于debian:

系统要求:
ruby >= 1.8.1
rake >= 0.8.3 (在lenny里版本不够,需要squeeze,不过我觉得使用gem应该也能装)
mysql
ruby mysql bindings(我个人觉得对应的包为libmysql-ruby,不过网上的另一个deb包依赖的是dbconfig-common libdbd-mysql-ruby)

安装过程:

1. 获得最新源码:

git clone git://github.com/reductivelabs/puppet-dashboard.git

2. 设置数据库:

cd puppet_dashboard/config
cp database.yml.example database.yml

编辑database.yml,在development域中加入数据库用户名、密码,然后进行数据库初始化(确保mysql服务已经启动):

rake install

(中间可能需要运行rake gem:install)

3.设置puppetmaster:

部署lib文件:(在puppet 2.6版本中不再需要)

cp  puppet_dashboard/lib/puppet/puppet_dashboard.rb  /usr/lib/ruby/1.8/puppet/reports/

这点和readme中描述不符,不过作者的方法怎么实验都不成功。:(

然后在/etc/puppet/puppet.conf的puppetmasterd域中加入:

reports = puppet_dashboard

Puppet 2.6版本是:

reports = http

可以写多种方法,用逗号分隔,比如:

reports = puppet_dashboard, log, store

最后重启服务端

4.运行dashboard server

script/server

5.设置puppet client:

在/etc/puppet/puppet.conf的puppetd域加入:

report = true

重启客户端

如果没有意外,dashboard将会接收到新的report,访问http://localhost:3000/进入web界面。

如果想将以前的report导入,在dashboard目录运行:

rake reports:import

如果reportdir不是/var/lib/puppet/reports则运行:

rake reports:import REPORT_DIR=/path/to/your/reports

如果时区显示有问题,在config/enviroment.rb文件中修改:

config.time_zone = 'Beijing'

参考:

1. http://docs.puppetlabs.com/guides/installing_dashboard.html

2.http://zcentric.com/2010/03/11/install-puppet-dashboard-on-redhatcentos-5/

This entry was posted in puppet, 运维 and tagged , . Bookmark the permalink.

3 thoughts on “puppet dashboard的安装

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

Note: If you are replying to another commenter, click the "Reply to {NAME} ↵" button under their comment!