Skip to content

Commit 3a44a27

Browse files
authored
v11 Table Flip (#705)
* Remove testing with 9 and 10 as they are no long supported * Refactor installation, configuration and service resources 1. Condense client_install, server_install and respository resource into a single install resource. 2. Remove service action from install to remove the ability to enter a pathological situation where the chef run will not complete due to the service not starting because of a config error but the config error is unable to be corrected to allow the service to start. 3. Refactor the server_conf resource to config and add load_current_value support. 4. Initial work to switch back to pg gem instead of shell_out for SQL controlled resources. (may revert) [ci skip] * Skip module disable on non-module platforms * Move templates to default * Add systemd unit drop-in if external PID is set * Create pg_hba.conf parser class * Update access resource to match * Set desired_state on common properties * Update templates * Fix access auth_options comparison * Update ident resource to use parser class * Role * Database * Split libraries * Extension * Add database inspec test * MDL config * Chefspec fixup * Reenable all kitchen test versions * CI fixup * Refactor libs * Testing fixup * Kitchen cookbook fixup * CI shorten testing temporarily * More kitchen test fixing * Use exec_params where we can * Test cookbook fixup * Config set version desired state false * Update version match regex for Debian platforms * RHEL 7 needs epel to install * Kitchen test locale fixup * Libraries include refactor * Test property update * Install resource update * Turns out we can update access entries * Access test fixup * Ident test fixup * Disable sort on pg_hba entries * Skip role password overwrite unless explicit * Extension kitchen fixup * Reenable multi converge for ident * pg install refactor * Make access test indempotent * Reenable all CI suites * Expand initdb locale testing platforms * Skip database locale for v13 * Automatic version detection * Fixup missing requires * Expand default packages * Accept version as an integer also * Correct name properties in resources * Initial docs update * Support pg_hba file comments * Add comment support for ident resources * Further docs update * Update upgrading file * Update README chef required version Fixes #702 * Formatting fixup
1 parent f394772 commit 3a44a27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3360
-1584
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,40 @@ jobs:
1818
matrix:
1919
os:
2020
- 'almalinux-8'
21-
- 'amazonlinux-2'
2221
- 'centos-7'
2322
- 'centos-stream-8'
23+
- 'centos-stream-9'
2424
- 'debian-10'
2525
- 'debian-11'
2626
- 'rockylinux-8'
27-
- 'ubuntu-1804'
2827
- 'ubuntu-2004'
28+
- 'ubuntu-2204'
2929

3030
suite:
31-
- 'access-96'
32-
- 'access-10'
3331
- 'access-11'
3432
- 'access-12'
35-
- 'access-12'
36-
- 'client-install-96'
37-
- 'client-install-10'
33+
- 'access-13'
34+
- 'access-14'
35+
- 'access-15'
3836
- 'client-install-11'
3937
- 'client-install-12'
4038
- 'client-install-13'
41-
- 'client-multi-install'
39+
- 'client-install-14'
40+
- 'client-install-15'
4241
- 'extension-12'
4342
- 'extension-13'
43+
- 'extension-14'
44+
- 'extension-15'
4445
- 'ident-12'
4546
- 'ident-13'
46-
- 'initdb-locale-13'
47-
- 'repo-96'
48-
- 'repo-10'
49-
- 'repo-11'
50-
- 'repo-12'
51-
- 'repo-13'
52-
- 'server-install-96'
53-
- 'server-install-10'
47+
- 'ident-14'
48+
- 'ident-15'
49+
- 'initdb-locale-15'
5450
- 'server-install-11'
5551
- 'server-install-12'
5652
- 'server-install-13'
57-
exclude:
58-
- os: amazonlinux-2
59-
suite: initdb-locale-13
60-
- os: debian-10
61-
suite: initdb-locale-13
62-
- os: debian-11
63-
suite: initdb-locale-13
64-
- os: ubuntu-1804
65-
suite: initdb-locale-13
66-
- os: ubuntu-2004
67-
suite: initdb-locale-13
53+
- 'server-install-14'
54+
- 'server-install-15'
6855
fail-fast: false
6956

7057
steps:

.mdlrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rules "~MD013", "~MD024"
1+
rules "~MD007", "~MD013", "~MD024"

Berksfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# frozen_string_literal: true
21
source 'https://supermarket.chef.io'
32

43
metadata

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ This file is used to list changes made in the last 3 major versions of the postg
44

55
## Unreleased
66

7+
- Major refactor, see [UPGRADING.md](UPGRADING.md)
8+
- Condense repository, client_install and server_install into common install resource with actions replacing the previous split resources.
9+
- `:repository` action
10+
- `:install` action
11+
- `:client_install` action
12+
- `:server_install` action
13+
- Refactor database, role (user) and extension resources to use pg gem for database access
14+
- All `load_current_value` support
15+
- Rename user resource to role to match PostgreSQL (still aliased to `:postgresql_user`)
16+
- Update various resource properties to match PostgreSQL side
17+
718
## 10.0.2 - *2022-12-04*
819

920
Standardise files with files in sous-chefs/repo-management

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ We follow the currently supported versions listed on <https://www.postgresql.org
3131

3232
### Chef
3333

34-
- Chef 15.3+
34+
- Chef 16
3535

3636
### Cookbook Dependencies
3737

3838
- `yum` >= 7.2.0 (for `dnf_module` resource)
3939

4040
## Resources
4141

42-
- [`postgresql_access`](documentation/access.md)
43-
- [`postgresql_client_install`](documentation/client_install.md)
44-
- [`postgresql_database`](documentation/database.md)
45-
- [`postgresql_extension`](documentation/extension.md)
46-
- [`postgresql_ident`](documentation/ident.md)
47-
- [`postgresql_server_conf`](documentation/server_conf.md)
48-
- [`postgresql_server_install`](documentation/server_install.md)
49-
- [`postgresql_user`](documentation/user.md)
42+
- [postgresql_access](documentation/postgresql_access.md)
43+
- [postgresql_config](documentation/postgresql_config.md)
44+
- [postgresql_database](documentation/postgresql_database.md)
45+
- [postgresql_extension](documentation/postgresql_extension.md)
46+
- [postgresql_ident](documentation/postgresql_ident.md)
47+
- [postgresql_install](documentation/postgresql_install.md)
48+
- [postgresql_role](documentation/postgresql_role.md)
49+
- [postgresql_service](documentation/postgresql_service.md)
5050

5151
## Contributors
5252

UPGRADING.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
1-
# Upgrading from v6.0
1+
# Upgrading
2+
3+
## Upgrading to v11.0
4+
5+
Version 11 is a major refactor and will require wrapping cookbooks to be updated to match the resource changes.
6+
7+
### Summary
8+
9+
- All resources now provide `load_current_value` support so will report changes on converge and will fire notifications.
10+
- To provide this, all database access has been switched back to using the `pg` gem
11+
- The `:client_install`, `:server_install` and `:repository` resources have been condensed into a single `:install` resource providing the same install functionality
12+
- Service actions have been removed from the install resource
13+
- The `:server_conf` resource have been renamed to `:config` and server configuration is expected to be passed as a Hash to the `:server_config` property
14+
- This change has been made to support later PostgreSQL version where some configuration values may have been removed
15+
- A `:service` resource is provided to manage PostgreSQL service management
16+
- Various resource properties have been renamed to remove collisions and match the PostgreSQL documentation and system column names
17+
- The `:access` and `:ident` resources now use a persistent accumulator so removals require an explicit `:delete` action
18+
19+
## Upgrading from v6.0
220

321
From v7.0.0 of the postgresql cookbook we have removed all recipes and attributes from the cookbook.
422

5-
## Deprecations
23+
### Deprecations
624

7-
### Gem
25+
#### Gem
826

927
Due to limitations in the gem compile process (libssl related) we have removed the pg_gem.
1028

1129
We no longer support accessing the database via the gem, and internally use the cli.
1230

13-
### PG Tune
31+
#### PG Tune
1432

1533
We currently do not implement the PG Tune functionality.
1634

1735
This may be added in a future release.
1836

19-
## Major Changes
37+
### Major Changes
2038

2139
Recipes are no longer supported so you should take a look at the examples in `test/cookbooks/test/recipes`
2240

documentation/.gitkeep

Whitespace-only changes.

documentation/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Index
2+
3+
[Back to resource list](../README.md#resources)
4+
5+
## Resources
6+
7+
- [postgresql_access](postgresql_access.md)
8+
- [postgresql_config](postgresql_config.md)
9+
- [postgresql_database](postgresql_database.md)
10+
- [postgresql_extension](postgresql_extension.md)
11+
- [postgresql_ident](postgresql_ident.md)
12+
- [postgresql_install](postgresql_install.md)
13+
- [postgresql_role](postgresql_role.md)
14+
- [postgresql_service](postgresql_service.md)

documentation/access.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

documentation/client_install.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)