Skip to content

Commit f534302

Browse files
author
Aaron Hicks
committed
Errors in documentation are only ever found after releasing a new version. Version 0.2.2
1 parent bf56b70 commit f534302

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

Modulefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name 'Aethylred-puppetdashboard'
2-
version '0.2.1'
2+
version '0.2.2'
33
source 'https://github.com/Aethylred/puppet-puppetdashboard'
44
author 'Aethylred'
55
license 'GPL3'

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,23 @@ class {'mysql::server':
8989

9090
## Classes and Resources
9191

92-
The base class can be used to manage all the other classes provided by this module. It does provide the option to not manage some classes so that those classes can be instanced seperately, or the resources that they manage can be defined independently.
92+
The base class can be used to manage all the other classes provided by this module. It does provide the option to not manage some classes so that those classes can be instanced separately, or the resources that they manage can be defined independently.
9393

9494
The parameters are described in the base class and the default values given are the same in the other classes. As the parameter names are consistent across classes the other classes will simply list the parameters they can use.
9595

96-
Some classes have been created as sub-classes to simplfy the addition of future classes to support alternative services (e.g. PosgreSQL or Ngnix) or operating systems (e.g. RedHat). For example, the database class has been created as `puppetdashboard::db::mysql` to allow for the future creation of a `puppetdashboard::db::posgres` class.
96+
Some classes have been created as sub-classes to simplify the addition of future classes to support alternative services (e.g. PosgreSQL or Ngnix) or operating systems (e.g. RedHat). For example, the database class has been created as `puppetdashboard::db::mysql` to allow for the future creation of a `puppetdashboard::db::posgres` class.
9797

9898
### The base `puppetdashboard` class
9999

100100
* **ensure**: This ensure statement is passed to the installation provided and should accept any standard `package` ensure statement including `latest` and specifying a version. The default value is `installed`.
101-
* **provider**: If set an alternative installation provide will be used. Currently the only alternative provider that is recongnised is `git`, and this provider has not been completed. The default value is undefined which will use the default package provider.
101+
* **provider**: If set an alternative installation provide will be used. Currently the only alternative provider that is recognised is `git`. The default value is undefined which will use the default package provider.
102102
* **install_dir**: This sets the directory in which the Puppet Dashboard application is installed. This parameter is intended to be passed to alternative providers and it is not recommended that this parameter is used if the default package provider is used. The default value is `/usr/share/puppet-dashboard`.
103103
* **manage_vhost**: If this is `true` then an Apache virtual host will be defined using the Puppetlabs Apache Module. The default value is `true`.
104104
* **manage_db**: If this is `true` then a MySQL database will be defined using the Puppetlabs MySQL Module and initialised with the Puppet Dashboard database schema. The default vaue is `true`.
105105
* **db_name**: This value is used as the name of the Puppet Dashboard MySQL database. The default value is `puppetdashboard`.
106106
* **db_user**: This value is used as the name of the Puppet Dashboard MySQL database user. The default value is `puppetdashboard`.
107-
* **db_password**: This value is used to set the password of the Puppet Dashboard MySQL database user. It is strongly recommended that passwords are not included in a Puppet manifest in clear text, consider storing them seperately in Hiera. The default value is `veryunsafeword`.
108-
* **db_passwd_hash**: This value is used to set the password of the Puppet Dashboard MySQL database user by directly providing a pre-salted and encrypted hash. It is strongly recommended that password hashes are not included in a Puppet manifest in clear text, consider storing them seperately in Hiera. Setting the `db_passwd_hash` parameter will overide the `db_password` parameter. The default value is undefined.
107+
* **db_password**: This value is used to set the password of the Puppet Dashboard MySQL database user. It is strongly recommended that passwords are not included in a Puppet manifest in clear text, consider storing them separately in Hiera. The default value is `veryunsafeword`.
108+
* **db_passwd_hash**: This value is used to set the password of the Puppet Dashboard MySQL database user by directly providing a pre-salted and encrypted hash. It is strongly recommended that password hashes are not included in a Puppet manifest in clear text, consider storing them separately in Hiera. Setting the `db_passwd_hash` parameter will override the `db_password` parameter. The default value is undefined.
109109
* **config_settings_source**: This parameter sets a source URL, as per using the source parameter of a `file` resource, that is used to supply a `settings.yml` file. The default value is undefined.
110110
* **db_adapter**: This parameter sets the database adapter used by the dashboard web application. The default value is to use `mysql`. Note: The package install of the Dashboard currently only supports MySQL.
111111
* **config_database_source**: This parameter sets a source URL, as per using the source parameter of a `file` resource, that is used to supply a `database.yml` file. The default value is undefined.
@@ -114,18 +114,19 @@ Some classes have been created as sub-classes to simplfy the addition of future
114114
* **time_zone**: This sets the default time zone the application will run in. The correct time zone can be discovered by running `rake time:zones:local` in the Puppet Dashboard install directory. The default is undefined.
115115
* **read_only_mode**: Setting this to `true` will put the Puppet Dashboard in to read-only mode. The default value is undefined.
116116
* **disable_legacy_report_upload_url**: Setting this to `true` will disable the legacy report upload mode. The default value is undefined.
117-
* **cn_name**: This sets the `cn_name` of the puppet dashboard in the `settings.yml` file. The default value os `dashboard`.
118-
* **ca_server**: This sets the `ca_server` for the puppet dashboard in the `settings.yml` file. The default value os `puppet`.
119-
* **inventory_server**: This sets the `inventory_server` for the puppet dashboard in the `settings.yml` file. The default value os `puppet`.
120-
* **file_bucket_server**: This sets the `file_bucket_server` for the puppet dashboard in the `settings.yml` file. The default value os `puppet`.
117+
* **cn_name**: This sets the `cn_name` of the puppet dashboard in the `settings.yml` file. The default value is `dashboard`.
118+
* **ca_server**: This sets the `ca_server` for the puppet dashboard in the `settings.yml` file. The default value is `puppet`.
119+
* **inventory_server**: This sets the `inventory_server` for the puppet dashboard in the `settings.yml` file. The default value is `puppet`.
120+
* **file_bucket_server**: This sets the `file_bucket_server` for the puppet dashboard in the `settings.yml` file. The default value is `puppet`.
121121
* **docroot**: This sets the document root directory for the Puppet Dashboard web application. This parameter is intended to be used with alternative providers and it is not recommended that this parameter is used with the default package provider is used. The default value is `/usr/share/puppet-dashboard/public`.
122122
* **port**: This sets the listen port for the Puppet Dashboard site Apache virtual host configuration. It is not passed to the webrick service if that is enabled. The default value is `80`.
123-
* **servername**: This sets the servername passed to the Puppet Dashboard site Apache virtual host configuration. It is not passed to the webrick service if that is enabled. The default value is the fully qualified domain name of the node as provided by the `fqdn` fact.
123+
* **servername**: This sets the `servername` passed to the Puppet Dashboard site Apache virtual host configuration. It is not passed to the webrick service if that is enabled. The default value is the fully qualified domain name of the node as provided by the `fqdn` fact.
124124
* **error_log_file**: This sets the error log file name passed to the Puppet Dashboard site Apache virtual host configuration. It is not passed to the webrick service if that is enabled. The default value is based on the fully qualified domain name of the node as provided by the `fqdn` fact, in the form of `dashboard.${fqdn}_error.log`.
125+
* **access_log_file**: This sets the access log file name passed to the Puppet Dashboard site Apache virtual host configuration. It is not passed to the webrick service if that is enabled. The default value is based on the fully qualified domain name of the node as provided by the `fqdn` fact, in the form of `dashboard.${fqdn}_access.log`.
125126
* **number_of_workers**: This sets the number of Puppet Dashboard worker processes to be run by the Puppet Dashboard Workers service. It is recommended to be running exactly one worker process per CPU core. The default value is `2`.
126127
* **apache_user**: This sets the user that the web server runs as. The default value is provided by the Puppetlabs Apache Module.
127128
* **disable_webrick**: If this parameter is set to `true` the Puppet Dashboard webrick service is disabled. Enabling this service is not recommended. Using both webrick and Apache is probably dangerous. The default value is `true`.
128-
* **enable_workers**: If this parameter is set to `true` then the Puppet Dasboard Worker process management service will be enabled and configured. The default value is true.
129+
* **enable_workers**: If this parameter is set to `true` then the Puppet Dashboard Worker process management service will be enabled and configured. The default value is true.
129130
* **secret_token**: This parameter is used to set the secret token used to identify cookies used by the Dashboard web applications. Setting this as a parameter is preferable to using generating one randomly on each install using the bundle script (`echo "secret_token: '$(bundle exec rake secret)'" >> config/settings.yml`) as this ensures consistency when installing the Dashboard. The default is to leave this undefined, which results in no secret token being specified in the settings file.
130131

131132
### The `puppetdashboard::config` class
@@ -213,16 +214,16 @@ class { 'puppetdashboard':
213214
```
214215
### Git Provider
215216

216-
The git provisioner installs the puppet-dashboard from the [Puppet Dashboad git repository on GitHub](https://github.com/sodabrew/puppet-dashboard). This allows the dashboard installation from unpackaged versions and onto Linux distributions that do not have packages available to them. Using the git provisioner requires the git package to be installed, and that the Puppetlabs vcsrepo module is installed. This feature is not fully functional.
217+
The git provisioner installs the puppet-dashboard from the [Puppet Dashboad git repository on GitHub](https://github.com/sodabrew/puppet-dashboard). This allows the dashboard installation from unpackaged versions and onto Linux distributions that do not have packages available to them. Using the git provisioner requires the git package to be installed, and that the Puppetlabs vcsrepo module is installed.
217218

218219
The git provider requires that:
219-
* the system version of Ruby is 1.9.1 or later, with bundler and development libraries.
220+
* the system version of Ruby is 1.9.1 or later, with bundler, rake, and development libraries.
220221
* git is installed
221222
* other module dependencies are met (see `Puppetfile`)
222223

223224
A working manifest that can do this is given in `tests/git_install.pp`, a `Puppetfile` for [`librarian-puppet`](https://github.com/rodjek/librarian-puppet) is provided that will install the dependent Puppet Modules required to make this work. The script and Puppetfile have been tested on Ubuntu 12.04 LTS.
224225

225-
It is recommended that the git provisioner is used as it is not dependent on end-of-life versions of Ruby, and can install the latest version of the Dashboard.
226+
It is recommended that the git provisioner is used as it is not dependent on end-of-life versions of Ruby, and can install the latest version of the Dashboard. It currently works for the Puppet Dashboard version 2.0.0-beta1.
226227

227228
## Troubleshooting
228229

@@ -232,6 +233,7 @@ Make sure the installed Ruby, Ruby development libraries, and Rubygems are all c
232233

233234
* Secure access to Puppet Dashboard via HTTPS, ideally this should still allow read-only access via HTTP.
234235
* [Optimse and maintain the Puppet Dashboard Database](http://docs.puppetlabs.com/dashboard/manual/1.2/maintaining.html)
236+
* Beaker acceptance tests
235237

236238
## Acknowledgements
237239

manifests/init.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
$port = $puppetdashboard::params::apache_port,
2727
$servername = $::fqdn,
2828
$error_log_file = $puppetdashboard::params::error_log_file,
29+
$access_log_file = $puppetdashboard::params::access_log_file,
2930
$number_of_workers = $::processorcount,
3031
$apache_user = $puppetdashboard::params::apache_user,
3132
$disable_webrick = true,
@@ -151,6 +152,7 @@
151152
port => $port,
152153
servername => $servername,
153154
error_log_file => $error_log_file,
155+
access_log_file => $access_log_file,
154156
before => Service['puppet-dashboard-workers'],
155157
require => [
156158
Class[

spec/classes/init_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
'docroot' => '/usr/share/puppet-dashboard/public',
6363
'port' => '80',
6464
'servername' => 'test.example.org',
65-
'error_log_file' => 'dashboard.test.example.org_error.log'
65+
'error_log_file' => 'dashboard.test.example.org_error.log',
66+
'access_log_file' => 'dashboard.test.example.org_access.log',
67+
'before' => 'Service[puppet-dashboard-workers]'
6668
) }
6769
it { should contain_class('puppetdashboard::workers::debian').with(
6870
'enable_workers' => true,
@@ -83,7 +85,6 @@
8385
'install_dir' => '/usr/share/puppet-dashboard',
8486
'apache_user' => 'www-data',
8587
'port' => '80',
86-
8788
'require' => [
8889
'Class[Puppetdashboard::Config]',
8990
'Anchor[post_config_exec]',

0 commit comments

Comments
 (0)