安装puppet dashboard进行Puppet展示

puppet dashboard是一个puppet的展示模块,自身就带有了一个web服务器。 ruby on rail 嘛!

但是我们还需要安装mysql数据库

安装具体步骤如下:

1. 安装mysql5.0或者mysql5.1

2. 安装ruby,一定要1.8.7版本

wget ftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7-p248.tar.bz2
tar jxvf ruby-1.8.7-p248.tar.bz2
cd ruby-1.8.7
./configure
make && make install

3. 安装gem

wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.5.tgz
tar zxvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb

4. 通过gem来安装rake和libmysql

gem install rake
gem install mysql

5. 安装puppet dashboard

wget http://puppetlabs.com/downloads/dashboard/puppet-dashboard-1.0.3.tgz
tar zxvf puppet-dashboard-1.0.3.tgz
cd puppet_dashboard-1.0.3/config
cp database.yml.example database.yml
vim database.yml

修改3个文件块中数据库连接配置文件。建议把dashboard develpment的数据库改为dashboard_dev,这样省的跟线上数据库发生冲突。

执行下列步骤给数据库建立表和数据

rake RAILS_ENV=production db:create
rake RAILS_ENV=production db:migrate
rake db:migrate db:test:prepare

6. 修改服务器端上的puttet.conf文件

reports = puppet_dashboard, log, store

7. 修改客户端的puttet.conf文件

report = true

重启客户端

8. 部署lib文件

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

重启服务器端

9. 启动dashboard服务器

./script/server -e production

###########################################

Best regards
Timo Seven
blog: http://www.timoseven.com
twitter: http://twitter.com/zauc
Linux System Admin & MySQL DBA

关于 Timo
XNIX SA & MYSQL DBA

One Response to 安装puppet dashboard进行Puppet展示

  1. hdl147@qq.com说道:

    rake RAILS_ENV=production db:migrate
    报错
    (in /data/www/wwwroot/puppet-dashboard)
    rake aborted!
    undefined method `requirement’ for #

    Tasks: TOP => db:migrate => environment
    (See full trace by running task with –trace)
    [root@AS-1 config]# rake db:migrate db:test:prepare
    (in /data/www/wwwroot/puppet-dashboard)
    rake aborted!
    undefined method `requirement’ for #

    Tasks: TOP => db:migrate => environment
    (See full trace by running task with –trace)

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: