This module is no longer supported
Remove all content and update the README to suggest alternatives. Change-Id: I530a738519621566a92937459fd44e845c6bfb11
This commit is contained in:
parent
d2beda204a
commit
9aa3039f9e
@ -1,2 +0,0 @@
|
||||
2012-05-12 - Gary Larizza <gary@puppetlabs.com> - 0.0.1
|
||||
* Initial Forge release
|
13
Modulefile
13
Modulefile
@ -1,13 +0,0 @@
|
||||
name 'openstackinfra-dashboard'
|
||||
version '0.0.8'
|
||||
source 'git://git.openstack.org/openstack-infra/puppet-dashboard.git'
|
||||
author 'openstackci'
|
||||
license 'Apache 2.0'
|
||||
summary 'Puppet module for the Puppet Dashboard'
|
||||
description 'Module to configure the Puppet Dashboard that also includes a Puppet Face that can be use to interact with the Dashboard from the CLI'
|
||||
project_page 'https://git.openstack.org/cgit/openstack-infra/puppet-dashboard'
|
||||
|
||||
## Add dependencies, if any:
|
||||
dependency 'puppetlabs/mysql', '>= 0.3.0'
|
||||
dependency 'puppetlabs/apache', '>= 0.0.4'
|
||||
dependency 'puppetlabs/passenger', '>= 0.0.2'
|
@ -1,55 +1,11 @@
|
||||
|
||||
|
||||
THIS MODULE IS NO LONGER MAINTAINED
|
||||
===================================
|
||||
|
||||
Consider Puppetboard as an alternative.
|
||||
See: https://github.com/puppet-community/puppet-module-puppetboard
|
||||
|
||||
See #openstack-infra on freenode for details.
|
||||
If you would like to take over maintenance of this module, please let
|
||||
us know and we will be happy to update this repository with a
|
||||
forwarding address.
|
||||
|
||||
|
||||
# Puppet Dashboard Module
|
||||
|
||||
This module manages and installs the Puppet Dashboard. It also includes a Puppet Face to manage the Dashboard/Console programmatically or from the CLI
|
||||
|
||||
# Quick Start
|
||||
|
||||
To install the Puppet Dashboard and configure it with sane defaults, include the following in your site.pp file:
|
||||
|
||||
node default {
|
||||
class {'dashboard':
|
||||
dashboard_ensure => 'present',
|
||||
dashboard_user => 'puppet-dbuser',
|
||||
dashboard_group => 'puppet-dbgroup',
|
||||
dashboard_password => 'changeme',
|
||||
dashboard_db => 'dashboard_prod',
|
||||
dashboard_charset => 'utf8',
|
||||
dashboard_site => $fqdn,
|
||||
dashboard_port => '8080',
|
||||
mysql_root_pw => 'changemetoo',
|
||||
passenger => true,
|
||||
}
|
||||
}
|
||||
|
||||
None of these parameters are required - if you neglect any of them their values will default back to those set in the dashboard::params subclass.
|
||||
|
||||
# Puppet Dashboard Face
|
||||
|
||||
The Puppet Dashboard Face requires that the cloud provisioner version 1.0.0 is installed
|
||||
and in Ruby's loadpath (which can be set with the RUBYLIB environment variable)
|
||||
|
||||
To use the Puppet Dashboard Face:
|
||||
|
||||
|
||||
* Ensure that you have Puppet 2.7.6 or greater installed. This face MAY work on version 2.7.2 or later, but it's not been tested.
|
||||
* Download or clone puppetlabs-dashboard to your Puppet modulepath (i.e. ~/.puppet/modules or /etc/puppet/modules)
|
||||
export RUBYLIB=/etc/puppet/modules/dashboard/lib:$RUBYLIB
|
||||
|
||||
* Test the face and learn more about its usage
|
||||
|
||||
puppet help dashboard
|
||||
|
||||
# Feature Requests
|
||||
|
||||
* Sqlite support.
|
||||
* Integration with Puppet module to set puppet.conf settings.
|
||||
* Remove the need to set the MySQL root password (needs fixed in the mysql module)
|
||||
Join #openstack-infra on Freenode if you have any questions.
|
||||
|
3
TODO
3
TODO
@ -1,3 +0,0 @@
|
||||
Need to set a variable for /var/lib/mysql in the mysql module
|
||||
Do we need to set the hostname or data in Apache?
|
||||
Update puppet.conf if master == true? Something to get the report URL set.
|
@ -1,237 +0,0 @@
|
||||
# Class: puppet::dashboard
|
||||
#
|
||||
# This class installs and configures parameters for Puppet Dashboard
|
||||
#
|
||||
# Parameters:
|
||||
# [*dashboard_ensure*]
|
||||
# - The value of the ensure parameter for the
|
||||
# puppet-dashboard package
|
||||
#
|
||||
# [*dashboard_user*]
|
||||
# - Name of the puppet-dashboard database and
|
||||
# system user
|
||||
#
|
||||
# [*dashboard_group*]
|
||||
# - Name of the puppet-dashboard group
|
||||
#
|
||||
# [*dashbaord_password*]
|
||||
# - Password for the puppet-dashboard database use
|
||||
#
|
||||
# [*dashboard_db*]
|
||||
# - The puppet-dashboard database name
|
||||
#
|
||||
# [*dashboard_charset*]
|
||||
# - Character set for the puppet-dashboard database
|
||||
#
|
||||
# [*dashboard_site*]
|
||||
# - The ServerName setting for Apache
|
||||
#
|
||||
# [*dashboard_port*]
|
||||
# - The port on which puppet-dashboard should run
|
||||
#
|
||||
# [*mysql_root_pw*]
|
||||
# - Password for root on MySQL
|
||||
#
|
||||
# [*passenger*]
|
||||
# - Boolean to determine whether Dashboard is to be
|
||||
# used with Passenger
|
||||
#
|
||||
# [*mysql_package_provider*]
|
||||
# - The package provider to use when installing
|
||||
# the ruby-mysql package
|
||||
#
|
||||
# [*ruby_mysql_package*]
|
||||
# - The package name for the ruby-mysql package
|
||||
#
|
||||
# [*dashboard_config*]
|
||||
# - The Dashboard configuration file
|
||||
#
|
||||
# [*dashboard_root*]
|
||||
# - The path to the Puppet Dashboard library
|
||||
#
|
||||
# [*rack_version*]
|
||||
# - The version of the rack gem to install
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
# Class['mysql']
|
||||
# Class['mysql::ruby']
|
||||
# Class['mysql::server']
|
||||
# Apache::Vhost[$dashboard_site]
|
||||
#
|
||||
# Sample Usage:
|
||||
# class {'dashboard':
|
||||
# dashboard_ensure => 'present',
|
||||
# dashboard_user => 'puppet-dbuser',
|
||||
# dashboard_group => 'puppet-dbgroup',
|
||||
# dashboard_password => 'changemme',
|
||||
# dashboard_db => 'dashboard_prod',
|
||||
# dashboard_charset => 'utf8',
|
||||
# dashboard_site => $fqdn,
|
||||
# dashboard_port => '8080',
|
||||
# mysql_root_pw => 'REALLY_change_me',
|
||||
# passenger => true,
|
||||
# }
|
||||
#
|
||||
# Note: SELinux on Redhat needs to be set separately to allow access to the
|
||||
# puppet-dashboard.
|
||||
#
|
||||
class dashboard (
|
||||
$dashboard_ensure = $dashboard::params::dashboard_ensure,
|
||||
$dashboard_user = $dashboard::params::dashboard_user,
|
||||
$dashboard_group = $dashboard::params::dashboard_group,
|
||||
$dashboard_password = $dashboard::params::dashboard_password,
|
||||
$dashboard_db = $dashboard::params::dashboard_db,
|
||||
$dashboard_charset = $dashboard::params::dashboard_charset,
|
||||
$dashboard_site = $dashboard::params::dashboard_site,
|
||||
$dashboard_port = $dashboard::params::dashboard_port,
|
||||
$dashboard_config = $dashboard::params::dashboard_config,
|
||||
$mysql_root_pw = $dashboard::params::mysql_root_pw,
|
||||
$passenger = $dashboard::params::passenger,
|
||||
$mysql_package_provider = $dashboard::params::mysql_package_provider,
|
||||
$ruby_mysql_package = $dashboard::params::ruby_mysql_package,
|
||||
$dashboard_config = $dashboard::params::dashboard_config,
|
||||
$dashboard_root = $dashboard::params::dashboard_root,
|
||||
$rack_version = $dashboard::params::rack_version
|
||||
) inherits dashboard::params {
|
||||
|
||||
include mysql
|
||||
class { 'mysql::server':
|
||||
config_hash => { 'root_password' => $mysql_root_pw }
|
||||
}
|
||||
class { 'mysql::ruby':
|
||||
package_provider => $mysql_package_provider,
|
||||
package_name => $ruby_mysql_package,
|
||||
}
|
||||
|
||||
if $passenger {
|
||||
Class['mysql']
|
||||
-> Class['mysql::ruby']
|
||||
-> Class['mysql::server']
|
||||
-> Package[$dashboard_package]
|
||||
-> Mysql::DB[$dashboard_db]
|
||||
-> File["${dashboard::params::dashboard_root}/config/database.yml"]
|
||||
-> Exec['db-migrate']
|
||||
-> Class['dashboard::passenger']
|
||||
|
||||
class { 'dashboard::passenger':
|
||||
dashboard_site => $dashboard_site,
|
||||
dashboard_port => $dashboard_port,
|
||||
dashboard_config => $dashboard_config,
|
||||
dashboard_root => $dashboard_root,
|
||||
}
|
||||
} else {
|
||||
Class['mysql']
|
||||
-> Class['mysql::ruby']
|
||||
-> Class['mysql::server']
|
||||
-> Package[$dashboard_package]
|
||||
-> Mysql::DB[$dashboard_db]
|
||||
-> File["${dashboard::params::dashboard_root}/config/database.yml"]
|
||||
-> Exec['db-migrate']
|
||||
-> Service[$dashboard_service]
|
||||
|
||||
file { 'dashboard_config':
|
||||
ensure => present,
|
||||
path => $dashboard_config,
|
||||
content => template("dashboard/config.${::osfamily}.erb"),
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
require => [ Package[$dashboard_package], User[$dashboard_user] ],
|
||||
before => Service[$dashboard_service],
|
||||
}
|
||||
|
||||
service { $dashboard_service:
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
subscribe => File['/etc/puppet-dashboard/database.yml'],
|
||||
require => Exec['db-migrate']
|
||||
}
|
||||
}
|
||||
|
||||
package { $dashboard_package:
|
||||
ensure => $dashboard_version,
|
||||
require => [ Package['rdoc'], Package['rack'] ],
|
||||
}
|
||||
|
||||
package { 'rubygems':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
# Currently, the dashboard requires this specific version
|
||||
# of the rack gem. Using the gem provider by default.
|
||||
package { 'rack':
|
||||
ensure => $rack_version,
|
||||
provider => 'gem',
|
||||
}
|
||||
|
||||
package { ['rake', 'rdoc']:
|
||||
ensure => present,
|
||||
provider => 'gem',
|
||||
}
|
||||
|
||||
File {
|
||||
require => Package[$dashboard_package],
|
||||
mode => '0755',
|
||||
owner => $dashboard_user,
|
||||
group => $dashboard_group,
|
||||
}
|
||||
|
||||
file { [ "${dashboard::params::dashboard_root}/public", "${dashboard::params::dashboard_root}/tmp", "${dashboard::params::dashboard_root}/log", '/etc/puppet-dashboard' ]:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
recurselimit => '1',
|
||||
}
|
||||
|
||||
file {'/etc/puppet-dashboard/database.yml':
|
||||
ensure => present,
|
||||
content => template('dashboard/database.yml.erb'),
|
||||
}
|
||||
|
||||
file { "${dashboard::params::dashboard_root}/config/database.yml":
|
||||
ensure => 'symlink',
|
||||
target => '/etc/puppet-dashboard/database.yml',
|
||||
}
|
||||
|
||||
file { [ "${dashboard::params::dashboard_root}/log/production.log", "${dashboard::params::dashboard_root}/config/environment.rb" ]:
|
||||
ensure => file,
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
file { '/etc/logrotate.d/puppet-dashboard':
|
||||
ensure => present,
|
||||
content => template('dashboard/logrotate.erb'),
|
||||
owner => '0',
|
||||
group => '0',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
exec { 'db-migrate':
|
||||
command => 'rake RAILS_ENV=production db:migrate',
|
||||
cwd => $dashboard::params::dashboard_root,
|
||||
path => '/usr/bin/:/usr/local/bin/',
|
||||
creates => "/var/lib/mysql/${dashboard_db}/nodes.frm",
|
||||
}
|
||||
|
||||
mysql::db { $dashboard_db:
|
||||
user => $dashboard_user,
|
||||
password => $dashboard_password,
|
||||
charset => $dashboard_charset,
|
||||
}
|
||||
|
||||
user { $dashboard_user:
|
||||
ensure => 'present',
|
||||
comment => 'Puppet Dashboard',
|
||||
gid => $dashboard_group,
|
||||
shell => '/sbin/nologin',
|
||||
managehome => true,
|
||||
home => "/home/${dashboard_user}",
|
||||
}
|
||||
|
||||
group { $dashboard_group:
|
||||
ensure => 'present',
|
||||
}
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Class: dashboard::params
|
||||
#
|
||||
# This class configures parameters for the puppet-dashboard module.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class dashboard::params {
|
||||
|
||||
$dashboard_ensure = 'present'
|
||||
$dashboard_user = 'puppet-dashboard'
|
||||
$dashboard_group = 'puppet-dashboard'
|
||||
$dashboard_password = 'changeme'
|
||||
$dashboard_db = 'dashboard_production'
|
||||
$dashboard_charset = 'utf8'
|
||||
$dashboard_environment = 'production'
|
||||
$dashboard_site = $::fqdn
|
||||
$dashboard_port = '8080'
|
||||
$passenger = false
|
||||
$mysql_root_pw = 'changemetoo'
|
||||
$rails_base_uri = '/'
|
||||
$rack_version = '1.1.6'
|
||||
|
||||
case $::osfamily {
|
||||
|
||||
'RedHat': {
|
||||
$dashboard_config = '/etc/sysconfig/puppet-dashboard'
|
||||
$dashboard_service = 'puppet-dashboard'
|
||||
$dashboard_package = 'puppet-dashboard'
|
||||
$dashboard_root = '/usr/share/puppet-dashboard'
|
||||
$mysql_package_provider = 'yum'
|
||||
$ruby_mysql_package = 'ruby-mysql'
|
||||
}
|
||||
|
||||
'Debian': {
|
||||
$dashboard_config = '/etc/default/puppet-dashboard'
|
||||
$dashboard_service = 'puppet-dashboard'
|
||||
$dashboard_package = 'puppet-dashboard'
|
||||
$dashboard_root = '/usr/share/puppet-dashboard'
|
||||
$mysql_package_provider = 'aptitude'
|
||||
$ruby_mysql_package = 'libmysql-ruby1.8'
|
||||
}
|
||||
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
# Class: dashboard::passenger
|
||||
#
|
||||
# This class configures parameters for the puppet-dashboard module.
|
||||
#
|
||||
# Parameters:
|
||||
# [*dashboard_site*]
|
||||
# - The ServerName setting for Apache
|
||||
#
|
||||
# [*dashboard_port*]
|
||||
# - The port on which puppet-dashboard should run
|
||||
#
|
||||
# [*dashboard_config*]
|
||||
# - The Dashboard configuration file
|
||||
#
|
||||
# [*dashboard_root*]
|
||||
# - The path to the Puppet Dashboard library
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class dashboard::passenger (
|
||||
$dashboard_site,
|
||||
$dashboard_port,
|
||||
$dashboard_config,
|
||||
$dashboard_root
|
||||
) inherits dashboard {
|
||||
|
||||
include apache
|
||||
include passenger
|
||||
|
||||
file { '/etc/init.d/puppet-dashboard':
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
file { 'dashboard_config':
|
||||
ensure => absent,
|
||||
path => $dashboard_config,
|
||||
}
|
||||
|
||||
apache::vhost { $dashboard_site:
|
||||
port => $dashboard_port,
|
||||
priority => '50',
|
||||
docroot => "${dashboard_root}/public",
|
||||
template => 'dashboard/passenger-vhost.erb',
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
--format
|
||||
s
|
||||
--colour
|
||||
--backtrace
|
@ -1,80 +0,0 @@
|
||||
unless defined?(SPEC_HELPER_IS_LOADED)
|
||||
SPEC_HELPER_IS_LOADED = 1
|
||||
|
||||
dir = File.expand_path(File.dirname(__FILE__))
|
||||
|
||||
$LOAD_PATH.unshift("#{dir}/")
|
||||
$LOAD_PATH.unshift("#{dir}/lib") # a spec-specific test lib dir
|
||||
$LOAD_PATH.unshift("#{dir}/../lib")
|
||||
|
||||
# Don't want puppet getting the command line arguments for rake or autotest
|
||||
ARGV.clear
|
||||
|
||||
require 'puppet'
|
||||
require 'puppet/face'
|
||||
require 'mocha'
|
||||
require 'fog'
|
||||
gem 'rspec', '>=2.0.0'
|
||||
|
||||
Fog.credentials_path = File.join(dir, 'fog-stub-configuration')
|
||||
Fog.mock!
|
||||
|
||||
# So everyone else doesn't have to include this base constant.
|
||||
module PuppetSpec
|
||||
FIXTURE_DIR = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") unless defined?(FIXTURE_DIR)
|
||||
end
|
||||
|
||||
module PuppetTest
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.mock_with :mocha
|
||||
|
||||
config.after :each do
|
||||
Puppet.settings.clear
|
||||
Puppet::Node::Environment.clear
|
||||
Puppet::Util::Storage.clear
|
||||
|
||||
if defined?($tmpfiles)
|
||||
$tmpfiles.each do |file|
|
||||
file = File.expand_path(file)
|
||||
if Puppet.features.posix? and file !~ /^\/tmp/ and file !~ /^\/var\/folders/
|
||||
puts "Not deleting tmpfile #{file} outside of /tmp or /var/folders"
|
||||
next
|
||||
elsif Puppet.features.microsoft_windows?
|
||||
tempdir = File.expand_path(File.join(Dir::LOCAL_APPDATA, "Temp"))
|
||||
if file !~ /^#{tempdir}/
|
||||
puts "Not deleting tmpfile #{file} outside of #{tempdir}"
|
||||
next
|
||||
end
|
||||
end
|
||||
if FileTest.exist?(file)
|
||||
system("chmod -R 755 '#{file}'")
|
||||
system("rm -rf '#{file}'")
|
||||
end
|
||||
end
|
||||
$tmpfiles.clear
|
||||
end
|
||||
|
||||
Puppet::Util::Log.close_all
|
||||
end
|
||||
|
||||
config.before :each do
|
||||
# these globals are set by Application
|
||||
$puppet_application_mode = nil
|
||||
$puppet_application_name = nil
|
||||
|
||||
# Set the confdir and vardir to gibberish so that tests
|
||||
# have to be correctly mocked.
|
||||
Puppet[:confdir] = "/dev/null"
|
||||
Puppet[:vardir] = "/dev/null"
|
||||
|
||||
# Avoid opening ports to the outside world
|
||||
Puppet.settings[:bindaddress] = "127.0.0.1"
|
||||
|
||||
@logs = []
|
||||
Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@ -1,50 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'puppet'
|
||||
require 'puppet/face'
|
||||
describe Puppet::Face[:dashboard, :current] do
|
||||
let :dashboard_options do
|
||||
{:enc_server => 'enc_server', :enc_port => '3001', :enc_auth_user => 'user', :enc_auth_passwd => 'pw'}
|
||||
end
|
||||
let :connection do
|
||||
mock('Puppet::Dashboard::Classifier')
|
||||
end
|
||||
|
||||
describe 'action list' do
|
||||
it 'should default enc_server to Puppet[:server] and port to 3000' do
|
||||
defaults = {:enc_server =>'master', :enc_port => 3000, :enc_auth_user => nil, :enc_auth_passwd => nil}
|
||||
Puppet.expects(:[]).with(:server).returns('master')
|
||||
Puppet::Dashboard::Classifier.expects(:connection).with(defaults).returns connection
|
||||
connection.expects(:list).with('node_classes', 'Listing classes')
|
||||
subject.list('classes', {})
|
||||
end
|
||||
{'classes' => 'node_classes', 'nodes' => 'nodes', 'groups' => 'node_groups'}.each do |k,v|
|
||||
it "should convert the types into their dashboard names" do
|
||||
Puppet::Dashboard::Classifier.expects(:connection).with(dashboard_options).returns connection
|
||||
connection.expects(:list).with(v, "Listing #{k}")
|
||||
subject.list(k, dashboard_options)
|
||||
end
|
||||
end
|
||||
it 'should fail when an invalid type is specified' do
|
||||
expect { subject.list('foo', {} ) }.should raise_error(Puppet::Error, /Invalid type specified/)
|
||||
end
|
||||
end
|
||||
#describe 'actions create_class and create_node' do
|
||||
# {'node' => 'node', 'class' => 'node_class'}.each do |type,dash_type|
|
||||
it "should require the name option for class" do
|
||||
expect { subject.send("create_class", {}) }.should raise_error(ArgumentError)
|
||||
end
|
||||
it "should accept name option for class" do
|
||||
munged_options = dashboard_options.merge(:name => 'dan')
|
||||
Puppet::Dashboard::Classifier.expects(:connection).with(munged_options).returns connection
|
||||
connection.expects(:create_classes).with(['dan'])
|
||||
subject.send("create_class", munged_options)
|
||||
end
|
||||
# end
|
||||
#end
|
||||
describe 'action register_module' do
|
||||
|
||||
end
|
||||
describe 'action add_module' do
|
||||
|
||||
end
|
||||
end
|
@ -1,24 +0,0 @@
|
||||
# IMPORTANT: Be sure you have checked the values below, appropriately
|
||||
# configured 'config/database.yml' in your DASHBOARD_HOME, and
|
||||
# created and migrated the database.
|
||||
|
||||
# Uncomment the line below to start Puppet Dashboard.
|
||||
START=yes
|
||||
|
||||
# Location where puppet-dashboard is installed:
|
||||
DASHBOARD_HOME=<%= dashboard_root %>
|
||||
|
||||
# User which runs the puppet-dashboard program:
|
||||
DASHBOARD_USER=<%= dashboard_user %>
|
||||
|
||||
# Ruby version to run the puppet-dashboard as:
|
||||
DASHBOARD_RUBY=/usr/bin/ruby
|
||||
|
||||
# Rails environment in which puppet-dashboard runs:
|
||||
DASHBOARD_ENVIRONMENT=<%= dashboard_environment %>
|
||||
|
||||
# Network interface which puppet-dashboard web server is running at:
|
||||
DASHBOARD_IFACE=0.0.0.0
|
||||
|
||||
# Port on which puppet-dashboard web server is running at, note that if the
|
||||
# puppet-dashboard user is not root, it has to be a > 1024:
|
@ -1,9 +0,0 @@
|
||||
#
|
||||
# path to where you installed puppet dashboard
|
||||
#
|
||||
DASHBOARD_HOME=<%= dashboard_root %>
|
||||
DASHBOARD_USER=<%= dashboard_user %>
|
||||
DASHBOARD_RUBY=/usr/bin/ruby
|
||||
DASHBOARD_ENVIRONMENT=<%= dashboard_environment %>
|
||||
DASHBOARD_IFACE=0.0.0.0
|
||||
DASHBOARD_PORT=3000
|
@ -1,6 +0,0 @@
|
||||
production:
|
||||
adapter: mysql
|
||||
database: <%= dashboard_db %>
|
||||
username: <%= dashboard_user %>
|
||||
password: <%= dashboard_password %>
|
||||
encoding: <%= dashboard_charset %>
|
@ -1,10 +0,0 @@
|
||||
# Puppet-Dashboard logs:
|
||||
<%= dashboard_root%>/log/production.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
Listen <%= dashboard_port %>
|
||||
|
||||
<VirtualHost *:<%= dashboard_port %>>
|
||||
ServerName <%= name %>
|
||||
DocumentRoot <%= docroot %>
|
||||
RailsBaseURI <%= rails_base_uri %>
|
||||
|
||||
# Apparently HighPerformance, MaxPoolSize, PoolIdleTime and MaxRequests
|
||||
# are all optimized by default in Passenger 3. Currently the dashboard
|
||||
# server has the deb for libapache2-mod-passenger 2.2.11debian-2 installed
|
||||
# PassengerMaxRequests 1000 doesn't need to be set
|
||||
# PassengerHighPerformance on mod_rewrite might be inaccessible if on
|
||||
# MaxPoolSize setting based on 4GB RAM with 4 cpu cores
|
||||
# StatThrottleRate setting checks rails config changes every half hour
|
||||
# rather than every request
|
||||
PassengerMaxPoolSize 30
|
||||
PassengerPoolIdleTime 1500
|
||||
PassengerStatThrottleRate 1800
|
||||
|
||||
<Directory <%= docroot %>>
|
||||
Options None
|
||||
AllowOverride AuthConfig
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
ErrorLog /var/log/<%= scope.lookupvar("apache::params::apache_name") %>/<%= name %>_error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/<%= scope.lookupvar("apache::params::apache_name") %>/<%= name %>_access.log combined
|
||||
ServerSignature On
|
||||
</VirtualHost>
|
||||
|
@ -1,17 +0,0 @@
|
||||
node default {
|
||||
|
||||
class { 'dashboard':
|
||||
dashboard_ensure => 'present',
|
||||
dashboard_user => 'puppet-dbuser',
|
||||
dashboard_group => 'puppet-dbgroup',
|
||||
dashboard_password => 'changeme',
|
||||
dashboard_db => 'dashboard_prod',
|
||||
dashboard_charset => 'utf8',
|
||||
dashboard_site => $::fqdn,
|
||||
dashboard_port => '8081',
|
||||
mysql_root_pw => 'changemetoo',
|
||||
passenger => true,
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user