commit
131aa5dbb3
9 changed files with 208 additions and 112 deletions
|
@ -1,10 +1,36 @@
|
|||
2014-02-12 - Version 3.3.1
|
||||
Bugfix:
|
||||
##2014-03-04 - Supported Release 3.3.3
|
||||
###Summary
|
||||
|
||||
This is a supported release. This release removes a testing symlink that can
|
||||
cause trouble on systems where /var is on a seperate filesystem from the
|
||||
modulepath.
|
||||
|
||||
####Features
|
||||
####Bugfixes
|
||||
####Known Bugs
|
||||
* SLES is not supported.
|
||||
|
||||
##2014-03-04 - Supported Release 3.3.2
|
||||
###Summary
|
||||
This is a supported release. It fixes a problem with updating passwords on postgresql.org distributed versions of PostgreSQL.
|
||||
|
||||
####Bugfixes
|
||||
- Correct psql path when setting password on custom versions.
|
||||
- Documentation updates
|
||||
- Test updates
|
||||
|
||||
####Known Bugs
|
||||
* SLES is not supported.
|
||||
|
||||
|
||||
##2014-02-12 - Version 3.3.1
|
||||
####Bugfix:
|
||||
- Allow dynamic rubygems host
|
||||
|
||||
2014-01-28 - Version 3.3.0
|
||||
|
||||
Summary:
|
||||
##2014-01-28 - Version 3.3.0
|
||||
|
||||
###Summary
|
||||
|
||||
This release rolls up a bunch of bugfixes our users have found and fixed for
|
||||
us over the last few months. This improves things for 9.1 users, and makes
|
||||
|
@ -13,14 +39,14 @@ this module usable on FreeBSD.
|
|||
This release is dedicated to 'bma', who's suffering with Puppet 3.4.1 issues
|
||||
thanks to Puppet::Util::SUIDManager.run_and_capture.
|
||||
|
||||
Features:
|
||||
####Features
|
||||
- Add lc_ config entry settings
|
||||
- Can pass template at database creation.
|
||||
- Add FreeBSD support.
|
||||
- Add support for customer `xlogdir` parameter.
|
||||
- Switch tests from rspec-system to beaker. (This isn't really a feature)
|
||||
|
||||
Bugfixes:
|
||||
####Bugfixes
|
||||
- Properly fix the deprecated Puppet::Util::SUIDManager.run_and_capture errors.
|
||||
- Fix NOREPLICATION option for Postgres 9.1
|
||||
- Wrong parameter name: manage_pg_conf -> manage_pg_hba_conf
|
||||
|
@ -33,26 +59,27 @@ Bugfixes:
|
|||
- Add some missing privileges.
|
||||
- Remove deprecated and unused concat::fragment parameters.
|
||||
|
||||
2013-11-05 - Version 3.2.0
|
||||
|
||||
Summary:
|
||||
##2013-11-05 - Version 3.2.0
|
||||
|
||||
###Summary
|
||||
|
||||
Add's support for Ubuntu 13.10 (and 14.04) as well as x, y, z.
|
||||
|
||||
Features:
|
||||
####Features
|
||||
- Add versions for Ubuntu 13.10 and 14.04.
|
||||
- Use default_database in validate_db_connection instead of a hardcoded
|
||||
'postgres'
|
||||
- Add globals/params layering for default_database.
|
||||
- Allow specification of default database name.
|
||||
|
||||
Bugs:
|
||||
####Bugs
|
||||
- Fixes to the README.
|
||||
|
||||
|
||||
2013-10-25 - Version 3.1.0
|
||||
##2013-10-25 - Version 3.1.0
|
||||
|
||||
Summary:
|
||||
###Summary
|
||||
|
||||
This is a minor feature and bug fix release.
|
||||
|
||||
|
@ -62,12 +89,12 @@ The default version of Fedora 17 has now been added, so that Fedora 17 users can
|
|||
|
||||
And finally we've extended the capabilities of the defined type postgresql::validate_db_connection so that now it can handle retrying and sleeping between retries. This feature has been monopolized to fix a bug we were seeing with startup race conditions, but it can also be used by remote systems to 'wait' for PostgreSQL to start before their Puppet run continues.
|
||||
|
||||
Features:
|
||||
####Features
|
||||
- Defined $default_version for Fedora 17 (Bret Comnes)
|
||||
- add search_path attribute to postgresql_psql resource (Jeremy Kitchen)
|
||||
- (GH-198) Add wait and retry capability to validate_db_connection (Ken Barber)
|
||||
|
||||
Bugs:
|
||||
####Bugs
|
||||
- enabling defined postgres user password without resetting on every puppet run (jonoterc)
|
||||
- periods are valid in configuration variables also (Jeremy Kitchen)
|
||||
- Add zero length string to join() function (Jarl Stefansson)
|
||||
|
@ -76,34 +103,37 @@ Bugs:
|
|||
- Remove concat::setup for include in preparation for the next concat release (Ken Barber)
|
||||
|
||||
|
||||
2013-10-14 - Version 3.0.0
|
||||
##2013-10-14 - Version 3.0.0
|
||||
|
||||
Final release of 3.0, enjoy!
|
||||
|
||||
2013-10-14 - Version 3.0.0-rc3
|
||||
|
||||
Summary:
|
||||
##2013-10-14 - Version 3.0.0-rc3
|
||||
|
||||
###Summary
|
||||
|
||||
Add a parameter to unmanage pg_hba.conf to fix a regression from 2.5, as well
|
||||
as allowing owner to be passed into x.
|
||||
|
||||
Features:
|
||||
####Features
|
||||
- `manage_pg_hba_conf` parameter added to control pg_hba.conf management.
|
||||
- `owner` parameter added to server::db.
|
||||
|
||||
2013-10-09 - Version 3.0.0-rc2
|
||||
|
||||
Summary:
|
||||
##2013-10-09 - Version 3.0.0-rc2
|
||||
|
||||
###Summary
|
||||
|
||||
A few bugfixes have been found since -rc1.
|
||||
|
||||
Fixes:
|
||||
####Fixes
|
||||
- Special case for $datadir on Amazon
|
||||
- Fix documentation about username/password for the postgresql_hash function
|
||||
|
||||
2013-10-01 - Version 3.0.0-rc1
|
||||
|
||||
Summary:
|
||||
##2013-10-01 - Version 3.0.0-rc1
|
||||
|
||||
###Summary
|
||||
|
||||
Version 3 was a major rewrite to fix some internal dependency issues, and to
|
||||
make the new Public API more clear. As a consequence a lot of things have
|
||||
|
@ -224,67 +254,60 @@ The older concat module is now deprecated and moved into the
|
|||
you may need to intervene during the installing of this package - as both use
|
||||
the same `concat` namespace.
|
||||
|
||||
2013-09-09 Release 2.5.0
|
||||
=======================
|
||||
---
|
||||
##2013-09-09 Release 2.5.0
|
||||
|
||||
Summary
|
||||
-------
|
||||
###Summary
|
||||
|
||||
The focus of this release is primarily to capture the fixes done to the
|
||||
types and providers to make sure refreshonly works properly and to set
|
||||
the stage for the large scale refactoring work of 3.0.0.
|
||||
|
||||
Features
|
||||
--------
|
||||
####Features
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
####Bugfixes
|
||||
- Use boolean for refreshonly.
|
||||
- Fix postgresql::plperl documentation.
|
||||
- Add two missing parameters to config::beforeservice
|
||||
- Style fixes
|
||||
|
||||
|
||||
2013-08-01 Release 2.4.1
|
||||
========================
|
||||
##2013-08-01 Release 2.4.1
|
||||
|
||||
Summary
|
||||
-------
|
||||
###Summary
|
||||
|
||||
This minor bugfix release solves an idempotency issue when using plain text
|
||||
passwords for the password_hash parameter for the postgresql::role defined
|
||||
type. Without this, users would continually see resource changes everytime
|
||||
your run Puppet.
|
||||
|
||||
Bugfixes
|
||||
---------
|
||||
####Bugfixes
|
||||
- Alter role call not idempotent with cleartext passwords (Ken Barber)
|
||||
|
||||
2013-07-19 Release 2.4.0
|
||||
========================
|
||||
|
||||
Summary
|
||||
-------
|
||||
##2013-07-19 Release 2.4.0
|
||||
|
||||
###Summary
|
||||
|
||||
This updates adds the ability to change permissions on tables, create template
|
||||
databases from normal databases, manage PL-Perl's postgres package, and
|
||||
disable the management of `pg_hba.conf`.
|
||||
|
||||
Features
|
||||
--------
|
||||
####Features
|
||||
- Add `postgresql::table_grant` defined resource
|
||||
- Add `postgresql::plperl` class
|
||||
- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class
|
||||
- Add `istemplate` parameter to the `postgresql::database` define
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
####Bugfixes
|
||||
- Update `postgresql::role` class to be able to update roles when modified
|
||||
instead of only on creation.
|
||||
- Update tests
|
||||
- Fix documentation of `postgresql::database_grant`
|
||||
|
||||
2.3.0
|
||||
=====
|
||||
|
||||
##2.3.0
|
||||
|
||||
This feature release includes the following changes:
|
||||
|
||||
|
@ -295,8 +318,8 @@ This feature release includes the following changes:
|
|||
(Chris Price)
|
||||
* Improved integration testing (Ken Barber)
|
||||
|
||||
2.2.1
|
||||
=====
|
||||
|
||||
##2.2.1
|
||||
|
||||
This release fixes a bug whereby one of our shell commands (psql) were not ran from a globally accessible directory. This was causing permission denied errors when the command attempted to change user without changing directory.
|
||||
|
||||
|
@ -310,8 +333,8 @@ This patch should correct that.
|
|||
|
||||
* Set /tmp as default CWD for postgresql_psql
|
||||
|
||||
2.2.0
|
||||
=====
|
||||
|
||||
##2.2.0
|
||||
|
||||
This feature release introduces a number of new features and bug fixes.
|
||||
|
||||
|
@ -345,8 +368,9 @@ This release in particular has largely been contributed by the community members
|
|||
* Allow SQL commands to be run against a specific DB (Carlos Villela)
|
||||
* Drop trailing comma to support Puppet 2.6 (Michael Arnold)
|
||||
|
||||
2.1.1
|
||||
=====
|
||||
|
||||
##2.1.1
|
||||
|
||||
|
||||
This release provides a bug fix for RHEL 5 and Centos 5 systems, or specifically systems using PostgreSQL 8.1 or older. On those systems one would have received the error:
|
||||
|
||||
|
@ -364,8 +388,8 @@ This bug is due to a new feature we had added in 2.1.0, whereby the `include` di
|
|||
* Only install `include` directive and included file on PostgreSQL >= 8.2
|
||||
* Add system tests for Centos 5
|
||||
|
||||
2.1.0
|
||||
=====
|
||||
|
||||
##2.1.0
|
||||
|
||||
This release is primarily a feature release, introducing some new helpful constructs to the module.
|
||||
|
||||
|
@ -448,8 +472,8 @@ A big thanks to all those listed below who made this feature release possible :-
|
|||
2013-02-15 - Erik Dalén <dalen@spotify.com>
|
||||
* Fix case whereby we were modifying a hash after creation
|
||||
|
||||
2.0.1
|
||||
=====
|
||||
|
||||
##2.0.1
|
||||
|
||||
Minor bugfix release.
|
||||
|
||||
|
@ -459,8 +483,7 @@ Minor bugfix release.
|
|||
2013-01-15 - Jordi Boggiano <j.boggiano@seld.be>
|
||||
* Add support for ubuntu 12.10 status (3504405)
|
||||
|
||||
2.0.0
|
||||
=====
|
||||
##2.0.0
|
||||
|
||||
Many thanks to the following people who contributed patches to this
|
||||
release:
|
||||
|
@ -513,9 +536,9 @@ Notable features:
|
|||
|
||||
* Many other bug fixes and improvements!
|
||||
|
||||
---
|
||||
##1.0.0
|
||||
|
||||
1.0.0
|
||||
=====
|
||||
2012-09-17 - Version 0.3.0 released
|
||||
|
||||
2012-09-14 - Chris Price <chris@puppetlabs.com>
|
6
Gemfile
6
Gemfile
|
@ -5,9 +5,9 @@ group :development, :test do
|
|||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'rspec-puppet', '~> 1.0'
|
||||
gem 'puppet-lint', '~> 0.3.2'
|
||||
gem 'beaker', :require => false
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'serverspec', :require => false
|
||||
gem 'beaker', :require => false
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'serverspec', :require => false
|
||||
end
|
||||
|
||||
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name 'puppetlabs-postgresql'
|
||||
version '3.3.1'
|
||||
version '3.3.3'
|
||||
source 'git://github.com/puppetlabs/puppet-postgresql.git'
|
||||
author 'Inkling/Puppet Labs'
|
||||
description 'PostgreSQL defined resource types'
|
||||
|
|
11
README.md
11
README.md
|
@ -7,6 +7,8 @@ Table of Contents
|
|||
1. [Overview - What is the PostgreSQL module?](#overview)
|
||||
2. [Module Description - What does the module do?](#module-description)
|
||||
3. [Setup - The basics of getting started with PostgreSQL module](#setup)
|
||||
* [PE 3.2 supported module](#pe-3.2-supported-module)
|
||||
* [Configuring the server](#configuring-the-server)
|
||||
4. [Usage - How to use the module for various tasks](#usage)
|
||||
5. [Upgrading - Guide for upgrading from older revisions of this module](#upgrading)
|
||||
6. [Reference - The classes, defines,functions and facts available in this module](#reference)
|
||||
|
@ -47,6 +49,15 @@ The postgresql module offers many security configuration settings. Before gettin
|
|||
|
||||
Your answers to these questions will determine which of the module's parameters you'll want to specify values for.
|
||||
|
||||
###PE 3.2 supported module
|
||||
|
||||
PE 3.2 introduces Puppet Labs supported modules. The version of the postgresql module that ships within PE 3.2 is supported via normal [Puppet Enterprise support](http://puppetlabs.com/services/customer-support) channels. If you would like to access the [supported module](http://forge.puppetlabs.com/supported) version, you will need to uninstall the shipped module and install the supported version from the Puppet Forge. You can do this by first running
|
||||
|
||||
# puppet module uninstall puppetlabs-postgresql
|
||||
and then running
|
||||
|
||||
# puppet module install puppetlabs/postgresql
|
||||
|
||||
###Configuring the server
|
||||
|
||||
The main configuration you'll need to do will be around the `postgresql::server` class. The default parameters are reasonable, but fairly restrictive regarding permissions for who can connect and from where. To manage a PostgreSQL server with sane defaults:
|
||||
|
|
120
metadata.json
120
metadata.json
|
@ -1,42 +1,82 @@
|
|||
{
|
||||
"name": "puppetlabs/postgresql",
|
||||
"version": "3.3.0",
|
||||
"summary": "PostgreSQL",
|
||||
"source": "git://github.com/puppetlabs/puppetlabs-postgresql.git",
|
||||
"project_page": "http://github.com/puppetlabs/puppetlabs-postgresql",
|
||||
"author": "Puppet Labs",
|
||||
"license": "Apache-2.0",
|
||||
"operatingsystem_support": [
|
||||
"RedHat",
|
||||
"OpenSUSE",
|
||||
"SLES",
|
||||
"SLED",
|
||||
"Debian",
|
||||
"Ubuntu"
|
||||
],
|
||||
"puppet_version": [
|
||||
"2.7",
|
||||
"3.0",
|
||||
"3.1",
|
||||
"3.2",
|
||||
"3.3"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "puppetlabs/stdlib",
|
||||
"version_requirement": ">=3.2.0 <5.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/concat",
|
||||
"version_requirement": ">= 1.0.0 <2.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/apt",
|
||||
"version_requirement": ">=1.1.0 <2.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/firewall",
|
||||
"version_requirement": ">= 0.0.4"
|
||||
}
|
||||
]
|
||||
"operatingsystem_support": [
|
||||
{
|
||||
"operatingsystem": "RedHat",
|
||||
"operatingsystemrelease": [
|
||||
"5",
|
||||
"6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "CentOS",
|
||||
"operatingsystemrelease": [
|
||||
"5",
|
||||
"6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "OracleLinux",
|
||||
"operatingsystemrelease": [
|
||||
"5",
|
||||
"6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "Scientific",
|
||||
"operatingsystemrelease": [
|
||||
"5",
|
||||
"6"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "Debian",
|
||||
"operatingsystemrelease": [
|
||||
"6",
|
||||
"7"
|
||||
]
|
||||
},
|
||||
{
|
||||
"operatingsystem": "Ubuntu",
|
||||
"operatingsystemrelease": [
|
||||
"10.04",
|
||||
"12.04"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
"name": "pe",
|
||||
"version_requirement": "3.2.x"
|
||||
},
|
||||
{
|
||||
"name": "puppet",
|
||||
"version_requirement": "3.x"
|
||||
}
|
||||
],
|
||||
"name": "puppetlabs-postgresql",
|
||||
"version": "3.3.3",
|
||||
"source": "git://github.com/puppetlabs/puppet-postgresql.git",
|
||||
"author": "Inkling/Puppet Labs",
|
||||
"license": "ASL 2.0",
|
||||
"summary": "PostgreSQL defined resource types",
|
||||
"description": "PostgreSQL defined resource types",
|
||||
"project_page": "https://github.com/puppetlabs/puppet-postgresql",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "puppetlabs/stdlib",
|
||||
"version_requirement": ">=3.2.0 <5.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/firewall",
|
||||
"version_requirement": ">= 0.0.4"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/apt",
|
||||
"version_requirement": ">=1.1.0 <2.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppetlabs/concat",
|
||||
"version_requirement": ">= 1.0.0 <2.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
centos-64-x64.yml
|
10
spec/acceptance/nodesets/default.yml
Normal file
10
spec/acceptance/nodesets/default.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
HOSTS:
|
||||
centos-64-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-6-x86_64
|
||||
box : centos-64-x64-vbox4210-nocm
|
||||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
type: git
|
|
@ -39,7 +39,7 @@ describe 'postgresql::server::db', :unless => UNSUPPORTED_PLATFORMS.include?(fac
|
|||
user => 'test1',
|
||||
password => postgresql_password('test1', 'test1'),
|
||||
encoding => 'UTF8',
|
||||
locale => 'en_NG',
|
||||
locale => 'en_NG.UTF-8',
|
||||
}
|
||||
EOS
|
||||
|
||||
|
|
|
@ -83,6 +83,15 @@ describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(f
|
|||
after :all do
|
||||
psql('--command="drop database postgresql_test_db" postgres', 'postgres')
|
||||
pp = <<-EOS.unindent
|
||||
if $::osfamily == 'Debian' {
|
||||
class { 'apt': }
|
||||
# XXX Need to purge postgresql-common after uninstalling 9.3 because
|
||||
# it leaves the init script behind. Poor packaging.
|
||||
package { 'postgresql-common':
|
||||
ensure => purged,
|
||||
require => Class['postgresql::server'],
|
||||
}
|
||||
}
|
||||
class { 'postgresql::globals':
|
||||
manage_package_repo => true,
|
||||
version => '9.3',
|
||||
|
@ -102,6 +111,9 @@ describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(f
|
|||
|
||||
it 'perform installation and create a db' do
|
||||
pp = <<-EOS.unindent
|
||||
if $::osfamily == 'Debian' {
|
||||
class { 'apt': }
|
||||
}
|
||||
class { "postgresql::globals":
|
||||
version => "9.3",
|
||||
manage_package_repo => true,
|
||||
|
@ -116,7 +128,7 @@ describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(f
|
|||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
expect(apply_manifest(pp, :catch_failures => true).stderr).to eq('')
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
|
||||
shell('test -d /tmp/pg_xlogs') do |r|
|
||||
|
|
|
@ -67,11 +67,12 @@ RSpec.configure do |c|
|
|||
# Install module and dependencies
|
||||
puppet_module_install(:source => proj_root, :module_name => 'postgresql')
|
||||
hosts.each do |host|
|
||||
on host, shell('chmod 755 /root')
|
||||
on host, "/bin/touch #{default['puppetpath']}/hiera.yaml"
|
||||
on host, 'chmod 755 /root'
|
||||
if fact('osfamily') == 'Debian'
|
||||
shell("echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen")
|
||||
shell('/usr/sbin/locale-gen')
|
||||
shell('/usr/sbin/update-locale')
|
||||
on host, "echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen"
|
||||
on host, '/usr/sbin/locale-gen'
|
||||
on host, '/usr/sbin/update-locale'
|
||||
end
|
||||
if fact('osfamily') == 'RedHat'
|
||||
shell('yum -y install policycoreutils-python')
|
||||
|
|
Loading…
Reference in a new issue