puppet Dashboard安装指南for Ubuntu

puppet Dashboard安装指南
部分翻译自官方文档,详见
http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html

1.安装依赖

apt-get install -y build-essential irb libmysql-ruby libmysqlclient-dev libopenssl-ruby libreadline-ruby mysql-server rake rdoc ri ruby ruby-dev

2.安装rubygems

下载rubygems-1.3.7.tgz
http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
解压安装
ruby setup.rb

3.Create gem as an alternative name for the gem1.8 command:

update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1 

4.创建数据库 

CREATE DATABASE dashboard CHARACTER SET utf8;
CREATE USER 'dashboard'@'localhost' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';

5.配置

/etc/puppet-dashboard/database.yml
将下列字段修改为:
production:
  database: dashboard
  username: dashboard
  password: 123
  encoding: utf8
  adapter: mysql

6.Preparing Schema

cd /usr/share/puppet-dashboard
rake RAILS_ENV=production db:migrate

7.创建Dashboard用户

创建组
groupadd dashboard
创建用户
useradd dashboard --no-create-home -g dashboard

8.启动puppet dashboard(使用WEBrick,不推荐,速度巨慢)

/usr/share/puppet-dashboard/script/server -e production
修改puppet master机器的/etc/puppet/puppet.conf,加入
[master]
reports = store, http
reporturl = http://localhost:3000/reports/upload
node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://localhost:3000 /opt/puppet-dashboard/bin/external_node

9.启动puppet Dashboard(使用thin,反应极快)

http://rubygems.org/gems/thin/versions/1.6.2

下载那三个runtime dependencies gem包和thin的gem包,依次安装。

使用gem install -l *..gem安装

启动thin
sudo -u dashboard thin start -e production &
在/usr/share/puppet-dashboard目录中执行上述命令

10.启动和管理延时job workers

sudo -u dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start

界面如下:

puppet Dashboard安装指南for Ubuntu_第1张图片

你可能感兴趣的:(puppet Dashboard安装指南for Ubuntu)