Commit graph

105 commits

Author SHA1 Message Date
Ken Barber
e45d909313 Merge pull request #301 from dawik/master
Spelling and redundancy fix in README
2013-10-31 05:45:49 -07:00
Dejan Golja
286762e98c Misspelled class postgresql::globals (missing ending 's' in some cases) 2013-10-31 13:51:16 +11:00
Dejan Golja
2b6cc9a558 Added missing depedenncy '->' in the Class: postgresql::globals usage example 2013-10-31 13:41:08 +11:00
David Wikmans
57f3f09a1d Spelling and redundancy fix in README 2013-10-30 20:27:12 +01:00
Reid Vandewiele
cdf5b077fe Add globals/params layering for default_database
This makes the variable consistent with the manner in which most/all of
the rest of the postgresql module currently works.

Commit also adds the new param to the README file.
2013-10-26 17:56:48 -07:00
Ken Barber
5df36cf1f7 (GH-198) Fix race condition on postgresql startup
This patch is a fix for the race condition that keeps occuring during
postgresql setup. Its very rare on its own, but when you are using this
module in a CI environment it happens quite frequently.

Basically what happens is that sometimes the service will announce the
database has started, but really it is still working in the background.
Sometimes the unix socket may not be listening, and sometimes the
system is still loading and you get a weird client error.

The fix itself is a modification to postgresql::validate_db_connection
so that it is able to connect on the local unix socket, plus retry
until the database is available.

This new and improved validate_db_connection can then be put into the
build pipeline (in the service class in particular) to ensure the
database is started before continuing on with the remaining steps.

This in effect blocks the puppet module from continuing until the
postgresql database is fully started and able to receive connections
which is perfect.

Tests and documentation provided.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-10-24 00:33:45 +01:00
Mickaël Canévet
6f614b0b37 Add a parameter to (un)manage pg_hba.conf 2013-10-16 14:58:08 +02:00
duritong
194bdf019c Fix documentation about username/password for the postgresql_hash function
This is messed up in different ways and this commit brings it in align with what the function actually does.
2013-10-07 18:39:30 +02:00
Bret Comnes
2718f14017 Special case for $datadir on Amazon
Closes #252
2013-10-02 12:48:44 -07:00
Ashley Penney
ea9db68ca9 Prepare 3.0.0 release. 2013-10-01 13:21:59 -04:00
Ashley Penney
1a53de99d5 Merge pull request #248 from gjngeldenhuis/spelling
Fixing small typos
2013-09-20 10:14:14 -07:00
Gerrard Geldenhuis
ce93e93534 Fixing small typos 2013-09-20 17:41:53 +01:00
Ken Barber
891b1d71a2 Rename contrib to server::contrib
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-20 14:35:24 +01:00
Ken Barber
809003d0f9 serverspec + some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 16:30:15 +01:00
Ken Barber
59c1cbfbf8 Major rewrite to solve order dependencies and unclear public API
This is a very very large change to the module. It started out as a fix to add
postgresl::server::config_entry, and quickly became a rewrite to fix a lot of
ordering issues inherent in the API.

Since this changes the Public API it is considered a backwards compatible
change.

See the upgrading guide in README.md for more details as to what has been
modified in this patch.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:15 +01:00
Hunter Haugen
9d753b40a8 Merge pull request #229 from mcanevet/plperl
Add README entry for postgresql::plperl
2013-08-13 16:07:34 -07:00
Mickaël Canévet
70c3341c24 Add README entry for postgresql::plperl 2013-08-12 10:14:19 +02:00
Hunter Haugen
847f54ce6c Merge pull request #204 from mcanevet/set_istemplate
Add support for istemplate parameter where creating db
2013-07-19 12:55:16 -07:00
Hunter Haugen
a946157a42 Update readme 2013-07-16 14:31:28 -07:00
Mickaël Canévet
988f45c8a4 Document istemplate parameter 2013-07-16 08:49:03 +02:00
Mickaël Canévet
1f736fcfc0 Add support for optional management of pg_hba.conf
This patch adds support for disabling management of pg_hba.conf by the module,
through the parameter `manage_pg_hba_conf`.
2013-07-08 13:29:48 +01:00
Chris Price
e764c20289 Update docs to reflect new owner parameter for ::database type. 2013-06-06 14:50:15 -07:00
Ken Barber
80c85e8f2b Convert system tests to use rspec-system
This patch ports all of the existing system tests to use rspec-system instead.

To assist with this conversion some patches were made to fix OS compatibility
where necessary. We also added an ensure parameter to the postgresql::server
class to assist with removing PostgreSQL configuration to aid with testing
cleanups.

The documentation has been updated to indicate test usage with rspec-system,
we've also renamed the 'tests' directory to 'examples'.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-06-04 15:36:24 +01:00
Max Martin
976be1305b Correct database_user param name
README formerly incorrectly referred to the password_hash parameter as password.
2013-05-15 12:58:39 -06:00
Chris Price
a7cd5d96ed Add a few more docs about running system tests 2013-05-06 10:50:03 -07:00
Chris Price
d7cce420d9 Fix example command in README for running system tests on a distro 2013-05-06 10:41:08 -07:00
Ken Barber
cd3b7a83a4 Release 2.2.0
Signed-off-by: Ken Barber <ken@bob.sh>
2013-04-26 17:21:37 +01:00
Kamil Szymanski
82ce5d0480 Add documentation, rspec test and support for global overriding contrib package name 2013-03-02 10:49:57 +01:00
Ken Barber
78e183c43b Merge pull request #142 from kamilszymanski/connection_limit
Allow to set connection limit for new role
2013-03-01 06:32:22 -08:00
Jordi Boggiano
19a37f8b17 Fix readme typo 2013-02-28 20:25:16 +01:00
Kamil Szymanski
e7b25d6b29 Allow to set connection limit for new role 2013-02-28 00:43:24 +01:00
Ken Barber
e74360c805 Add documentation for replication flag for postgresql::role
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-25 18:46:31 +00:00
Ken Barber
501289394a Cleaned up and added unit tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-25 17:50:53 +00:00
Ken Barber
39f30eb886 Fix module file, remove extra README.md and fix some docs
The module file had the wrong revision in it for starters. And there was some
missing items from the .gitignore.

The extra README.md in spec/system was getting extracted as the main README
on the forge so I remove it, moving the content that was not duplicated
already into README.md.

I took the opportunity also to finish the documentation in the Reference
section of the README to make sure all classes and defined resources are
documented.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-20 13:47:10 +00:00
Ken Barber
07eb908847 Increment version, cleanup and changelog for release 2.1.0
This patch provides new changelog notes for the next release. It also does some
cleanup:

* Move CHANGELOG.md to Changelog so it gets rendered in the forge
* Fix LICENSE so only the necessary boiler plate gets displayed in the Forge

And finally it increments the Modulefile version to 2.1.0.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-17 01:01:17 +00:00
Ken Barber
86a0453f2f Provide new defined resources for managing pg_hba.conf
This patch provides a more advanced way of managing pg_hba rules, by providing a
defined resource to manage a pg_hba file, and a defined resource for managing
rules within such a file (pg_hba_rule).

These new resources are wrappers around ripinaar-concat, and utilise file
assemblies instead of a template to compose the pg_hba.conf file.

I've provided a function that interprets the old ip4|6acl arrays and converts
them to this new format for backwards compatibility as well.

I slightly reformatted our documentation to allow for better documentation of
defined resources in 'Usage' as well, and provided examples of how to use this
new resource.

This hopefully should go a long way to solving the PR's related to lack of full
functionality for pg_hba.conf.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-12 00:34:42 +00:00
Michael Arnold
556ab32b73 Add support for JDBC connector.
Modify params.pp to abstract the package name for the postgresql JDBC
connector and add Class['postgresql::java'].  Also update the README.md
to mention the availability of this class.
2013-02-05 23:22:13 -07:00
Ken Barber
e9370fee7b Add unit tests and travis-ci support
This patch includes some very basic and initial unit testing using rspec-puppet
and for the case of facts, just normal rspec.

I've taken a very light approach here as rspec-puppet can be quite combinatorial
when one gets carried away. For now I've just added basic compile failure
detection effectively for classes and defined resources. As we continue to work
on the code and find regressions this work can be expanded.

For facts and functions I've also taken a basic approach for now.

One little thing I did change, was the strange string that the fact returns
when the default version is undefined. Instead of an error message I've just
returned the string 'unknown' which is more in line with other facts I've seen
in the wild, and to be quite honest 'unknown' is fairly self-explantory. Since
a fact isn't an error reporting message this seemed more appropriate, and looked
nicer in the rspec test.

As far as travis-ci support, I've added the same configuration that @jmmcune
came up with for stdlib which is pretty light and reasonable standard now we
propogated that to 4 or so other modules in the puppetlabs/ namespace. It should
work out of the box.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-05 15:15:03 +00:00
Chris Price
d0419adac9 Merge pull request #105 from kbrezina/feature/master/adding-include-to-pg-conf
Support for included configuration file
2013-02-01 12:50:21 -08:00
Karel Brezina
236ce4783a Added info about the advanced configuration file 2013-02-01 12:46:59 +01:00
jv
f9ad9776e2 typo fix in example 2013-01-31 11:50:45 -08:00
Lauren Rother
79879099b7 Fixed typos, rewording and typsetting per feedback
Updated spelling errors, typsetting issues and some wording suggestions
based on module author feedback
2013-01-22 15:16:21 -08:00
Lauren Rother
f140ce3be4 Updated content to conform to README best practices template
Before alterations, this content was the module author-determined
description of and instructions for use of the module.

As part of a joint Forge/Docs team effort to standardize formatting and
encourage quality module documentation, a best practices README
template was created via internal and external user testing. That
template was then applied to this module.

I pulled in content from the original README on GitHub and the Module
of the Week blog post. A table of contents was added for navigability,
standard headings were added (Overview, Module Description, Setup,
Usage, Implementation, etc.) to organize content, existent and
pulled-in content was moved under its appropriate heading and edited
for tone/flow/clarity, links to outside documentation were updated, and
basic formatting was done to adhere to template standards.
2013-01-18 16:17:08 -08:00
Chris Price
1d6ad0ce9b Update CHANGELOG, README, Modulefile for 2.0.0 release 2013-01-15 16:09:10 -08:00
Chris Price
76fcf269d8 Merge branch 'master' into cprice-puppet-feature/master/port-psql-to-ruby
Conflicts:
	manifests/database.pp
	manifests/database_grant.pp
	manifests/psql.pp
	manifests/role.pp
2012-11-30 15:49:07 -08:00
Chris Price
2a922f104a Initial working implementation of ruby psql type/provider
This commit provides a working implementation of a ruby
type/provider (`postgresql_psql` for handling the PSQL
commands.  This is a little more flexible than doing it
via Exec resources, which is what the `postgresql::psql`
type was doing.

The old type is still present but now includes a
deprecation notification, and all of the other types
that were using the `::psql` type have been ported over
to use the `postgresql_psql` type instead.
2012-11-04 21:47:49 -08:00
Chris Price
7b71eb36f9 Merge pull request #22 from cprice-puppet/patch-1
Update README.md
2012-10-29 10:46:43 -07:00
Chris Price
10d916ef64 Merge pull request #20 from dharwood/dharwood/pg_hba_acls
Defining ACLs in pg_hba.conf
2012-10-29 10:46:30 -07:00
Chris Price
8c082a0f65 Update README.md
Correct references to 'user' and 'grant' types, which were renamed to 'database_*'.
2012-10-27 17:04:52 -07:00
Ryan Coleman
2c82464f24 Adjust ownership to Puppet Labs
Prior to this commit, Inkling Systems was responsible for improving
and maintaining this module. The maintainer has moved on and Inkling
wished for Puppet Labs to continue with this modules maintenance.

This commit adjusts the README and Modulefile for this change in
ownership.
2012-10-24 10:20:20 -07:00
dharwood
555f3e9838 typos in readme and test/server.pp 2012-10-22 12:41:05 -07:00
dharwood
b8389d19ad ACLs functioning, added examples in README and test, comments in config manifests 2012-10-22 12:34:24 -07:00
stormcrow
399709a483 first commit of acls 2012-10-21 23:46:54 -07:00
Björn Albers
f40b79382a Add sample usage for postgresql::server class.
I had some issues trying to connect to the server, managed with
defaults:

  vagrant@precise32:~$ psql
  psql: FATAL:  role "vagrant" does not exist
  vagrant@precise32:~$ psql -U postgres
  psql: FATAL:  Peer authentication failed for user "postgres"
  vagrant@precise32:~$ psql -U postgres -h 127.0.0.1
  psql: FATAL:  pg_hba.conf rejects connection for host "127.0.0.1", user
  "postgres", database "postgres", SSL on
  FATAL:  pg_hba.conf rejects connection for host "127.0.0.1", user
  "postgres", database "postgres", SSL off
  vagrant@precise32:~$ psql -U postgres -h /var/run/postgresql
  psql: FATAL:  Peer authentication failed for user "postgres"

After some trial and error I found out that the reasons for this was
restrictive permissions on the unix socket (which isn't bad at all):

  vagrant@precise32:~$ ls -l /var/run/postgresql/
  total 4
  -rw------- 1 postgres postgres 5 Oct 16 20:16 9.1-main.pid

So I though I send some usage examples to help noops like myself to a
quicker start with your module :-)
2012-10-16 23:39:48 +02:00
Kenneth Knowles
01c9cbeb7c Initial commit 2012-04-19 15:37:18 -07:00