-
Notifications
You must be signed in to change notification settings - Fork 184
Add optimize/orphaned for postgresql database & append many modification for debian #333
Changes from 12 commits
d1228c6
d2ed530
7eab2c5
4ca4dd6
2f315e6
9abffdc
5ff9808
ac6e37e
93559a3
a4903e3
0f309be
299f6f1
e0bee58
5c5b8f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ Contributors | |
* Nick Fagerlund <[email protected]> | ||
* Nick Lewis <[email protected]> | ||
* Nigel Kersten <[email protected]> | ||
* Pascal Vibet <[email protected]> | ||
* Patrick Carlisle <[email protected]> | ||
* Paul Berry <[email protected]> | ||
* Peter Meier <[email protected]> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,14 +28,14 @@ group :assets do | |
gem 'execjs' , '~> 2.0.0' # Will use system-available JS runtime | ||
end | ||
|
||
group :development, :test do | ||
gem 'mocha', '~> 0.13.3', :require => false | ||
gem 'sqlite3' | ||
gem 'rspec-rails', '~> 2.13.0' | ||
gem 'factory_girl', '< 3.0' # supports ruby 1.8.7 | ||
gem 'shoulda-matchers', '< 2.0' # support ruby 1.8.7 | ||
gem 'rspec-html-matchers' | ||
gem 'nokogiri', '< 1.6' # support ruby 1.8.7 | ||
gem :development, :test do | ||
gem 'mocha', '~> 0.13.3', :require => false | ||
gem 'sqlite3' | ||
gem 'rspec-rails', '~> 2.13.0' | ||
gem 'factory_girl', '< 3.0' # supports ruby 1.8.7 | ||
gem 'shoulda-matchers', '< 2.0' # supports ruby 1.8.7 | ||
gem 'respc-html-matchers' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo here, too. Please revert this block to exactly the prior Gemfile contents. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's done Le 16/09/2015 10:26, Aaron Stone a écrit :
|
||
gem 'nokogiri', '< 1.6' # support ruby 1.8.7 | ||
end | ||
|
||
group :postgresql do | ||
|
@@ -45,3 +45,7 @@ end | |
group :mysql do | ||
gem 'mysql2', '~> 0.3.11' | ||
end | ||
|
||
group :sqlite do | ||
gem 'sqlite3' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# config/database.yml | ||
# | ||
# IMPORTANT NOTE: Before starting Dashboard, you will need to ensure that the | ||
# MySQL user and databases you've specified in this file exist, and that the | ||
# user has all permissions on the relevant databases. This will have to be done | ||
# with an external database administration tool. If using the command-line | ||
# `mysql` client, the commands to do this will resemble the following: | ||
# | ||
# CREATE DATABASE dashboard_production CHARACTER SET utf8; | ||
# CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'my_password'; | ||
# GRANT ALL PRIVILEGES ON dashboard_production.* TO 'dashboard'@'localhost'; | ||
# | ||
# ----- | ||
# | ||
# This file should be a YAML hash with one key for each of the standard Rails | ||
# environments: production, development, and test. | ||
# | ||
# - The "production" environment gives the best performance, and should be used | ||
# most of the time by most users. **Note that Rails does not consider | ||
# production its default environment, and you must specify it manually with | ||
# the RAILS_ENV environment variable when running any rake tasks.** | ||
# - The "development" environment gives worse performance, but yields better | ||
# logging and error reporting when something goes wrong. | ||
# - The "test" environment is only used for running Dashboard's automated tests. | ||
# It should never be used by most users. If you are using the test | ||
# environment, **DO NOT set its database to the same database used by the | ||
# development or production environments,** as it will be erased and | ||
# re-written every time the automated tests are run. | ||
# | ||
# The environment is set when Dashboard is started, a console is started, or a | ||
# rake task is run. Most production-quality Rails servers (such as Passenger) | ||
# will default to the production environment, but the included WEBrick server | ||
# script will default to development unless run with the `-e production` option. | ||
# | ||
# Each environment should be a hash with keys for: | ||
# | ||
# - database | ||
# - username | ||
# - password | ||
# - encoding | ||
# - adapter | ||
# | ||
# At the moment, "adapter" can be "mysql2" or "postgresql", and "encoding" should always | ||
# be "utf8". | ||
# | ||
production: | ||
database: dashboard_production | ||
username: dashboard | ||
password: | ||
encoding: utf8 | ||
adapter: postgresql | ||
|
||
development: | ||
database: dashboard_development | ||
username: dashboard | ||
password: | ||
encoding: utf8 | ||
adapter: postgresql | ||
|
||
test: | ||
database: dashboard_test | ||
username: dashboard | ||
password: | ||
encoding: utf8 | ||
adapter: postgresql | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#===[ Settings ]========================================================= | ||
# | ||
# This file is meant for storing setting information that is never | ||
# published or committed to a revision control system. | ||
# | ||
# Do not modify this "config/settings.yml.example" file directly -- you | ||
# should copy it to "config/settings.yml" and customize it there. | ||
# | ||
#---[ Values ]---------------------------------------------------------- | ||
|
||
# Node name to use when contacting the puppet master. This is the | ||
# CN that is used in Dashboard's certificate. | ||
cn_name: 'dashboard' | ||
|
||
ca_crl_path: 'certs/dashboard.ca_crl.pem' | ||
|
||
ca_certificate_path: 'certs/dashboard.ca_cert.pem' | ||
|
||
certificate_path: 'certs/dashboard.cert.pem' | ||
|
||
private_key_path: 'certs/dashboard.private_key.pem' | ||
|
||
public_key_path: 'certs/dashboard.public_key.pem' | ||
|
||
# Hostname of the certificate authority. | ||
ca_server: 'puppet' | ||
|
||
# Port for the certificate authority. | ||
ca_port: 8140 | ||
|
||
# Key length for SSL certificates | ||
key_length: 1024 | ||
|
||
# The "inventory service" allows you to connect to a puppet master to retrieve and node facts | ||
enable_inventory_service: false | ||
|
||
# Hostname of the inventory server. | ||
inventory_server: 'puppet' | ||
|
||
# Port for the inventory server. | ||
inventory_port: 8140 | ||
|
||
# Set this to true to allow Dashboard to display diffs on files that | ||
# are archived in the file bucket. | ||
use_file_bucket_diffs: false | ||
|
||
# Hostname of the file bucket server. | ||
file_bucket_server: 'puppet' | ||
|
||
# Port for the file bucket server. | ||
file_bucket_port: 8140 | ||
|
||
# Amount of time in seconds since last report before a node is considered no longer reporting | ||
no_longer_reporting_cutoff: 3600 | ||
|
||
# How many days of history to display on the "Daily Run Status" graph | ||
daily_run_history_length: 30 | ||
|
||
use_external_node_classification: true | ||
|
||
# Uncomment the following line to set a local time zone. Run | ||
# "rake time:zones:local" for the name of your local time zone. | ||
#time_zone: 'Pacific Time (US & Canada)' | ||
|
||
# Look at http://ruby-doc.org/core/classes/Time.html#M000298 for the strftime formatting | ||
datetime_format: '%Y-%m-%d %H:%M %Z' | ||
date_format: '%A, %B %e, %Y' | ||
|
||
# Set this to the URL of an image. The image will be scaled to the specified dimensions. | ||
custom_logo_url: '/images/dashboard_logo.png' | ||
custom_logo_width: 155px | ||
custom_logo_height: 23px | ||
custom_logo_alt_text: 'Puppet Dashboard' | ||
|
||
# We will be deprecating using "http://dashboard_servername/reports" as the puppet master's reporturl. | ||
# Set this to 'true' once you have changed all your puppet masters to send reports to | ||
# "http://dashboard_servername/reports/upload" | ||
disable_legacy_report_upload_url: false | ||
|
||
# Set this to true to prevent storing details about not-changed events | ||
# which saves a tremendous amount of space in the resource_statuses table. | ||
disable_report_unchanged_events: false | ||
|
||
# Disables the UI and controller actions for editing nodes, classes, groups and reports. Report submission is still allowed | ||
enable_read_only_mode: false | ||
|
||
# Default number of items of each kind to display per page | ||
nodes_per_page: 20 | ||
classes_per_page: 50 | ||
groups_per_page: 50 | ||
reports_per_page: 20 | ||
|
||
# Previously Dashboard used only ID numbers as URL slugs, set to true to return to that style. | ||
numeric_url_slugs: false | ||
|
||
# Adds optional custom links in the top bar of puppet dashboard. | ||
# Exemple that will add two links: | ||
#custom_links: | ||
# - | ||
# href: /link/href | ||
# title: The title that will be displayed | ||
# - | ||
# href: /node_groups/1 | ||
# title: Special group | ||
|
||
# Generate a new secret_token for production use! | ||
secret_token: 'b1bbd28f6f9ebfc25f09da9bff4643f75d5ad8c8da8b60234168c81cd6d32c15e5e5421196ee99da248d37d84f73c9ecb38608fc0d8b2709872290a3f43b244e' | ||
#===[ fin ]============================================================= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
usr/share/puppet-dashboard/log | ||
usr/share/puppet-dashboard/tmp | ||
usr/share/puppet-dashboard/spool | ||
var/log/puppet-dashboard | ||
var/spool/puppet-dashboard | ||
var/tmp/puppet-dashboard | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -u | ||
|
||
PUPPET_DB_PATH=/usr/share/puppet-dashboard | ||
|
||
# Prune records up to one month old: | ||
UPTO=10 | ||
# Valid units of time are: hr,day,wk,min,yr,mon | ||
UNIT=mon | ||
|
||
output=`rake -s -f ${PUPPET_DB_PATH}/Rakefile RAILS_ENV=production reports:prune upto=${UPTO} unit=${UNIT} 2>&1 1> /dev/null` | ||
if [ $? -ne 0 ]; then | ||
logger -i "${output}" | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
i#!/bin/bash | ||
|
||
set -u | ||
|
||
PUPPET_DB_PATH=/usr/share/puppet-dashboard | ||
|
||
# Prune records up to one month old: | ||
UPTO=1 | ||
# Valid units of time are: hr,day,wk,min,yr,mon | ||
UNIT=mon | ||
|
||
output=`rake -s -f ${PUPPET_DB_PATH}/Rakefile RAILS_ENV=production db:raw:optimize 2>&1 1> /dev/null` | ||
if [ $? -ne 0 ]; then | ||
logger -i "${output}" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it's
group
notgem
. Would be best to change this block to exactly match the prior Gemfile contents.