This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 184
[WIP] various GNU/Linux Debian package improvements #377
Open
ZeroPointEnergy
wants to merge
1
commit into
sodabrew:master
Choose a base branch
from
ZeroPointEnergy:debian_ext_improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,7 @@ end | |
group :mysql do | ||
gem 'mysql2' | ||
end | ||
|
||
group :sqlite do | ||
gem 'sqlite3' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]============================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
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.
|
||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
i#!/bin/bash | ||
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. Unexpected |
||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This note is providing instructions for MySQL, but the sample entries bellow are PostgreSQL related