Update the poise and postgresql cookbooks
This commit is contained in:
1 parent
448bffe34e
commit
374d6bc975
12 files changed
+26
-14
No files matched your search
@@ -20,7 +20,7 @@ cookbook 'application', '~> 5.2.0'
|
||||
cookbook 'application_javascript', '~> 1.0.0'
|
||||
cookbook 'application_ruby', '~> 4.1.0'
|
||||
cookbook 'application_git', '= 1.1.0' # 1.2.0 doesn't work with knife-solo
|
||||
cookbook 'poise', '~> 2.8.1'
|
||||
cookbook 'poise', '~> 2.8.2'
|
||||
cookbook 'poise-languages', '~> 2.1.1'
|
||||
cookbook 'poise-ruby', '~> 2.4.0'
|
||||
cookbook 'poise-javascript', git: 'https://github.com/poise/poise-javascript.git',
|
||||
@@ -33,7 +33,7 @@ cookbook 'firewall', '~> 2.6.3'
|
||||
cookbook 'nginx', '= 9.0.0'
|
||||
cookbook 'build-essential', '~> 8.1.1'
|
||||
cookbook 'mysql', '= 6.1.3'
|
||||
cookbook 'postgresql', '= 7.1.3'
|
||||
cookbook 'postgresql', '= 7.1.4'
|
||||
cookbook 'apt', '~> 7.0.0'
|
||||
cookbook 'git', '= 6.0.0'
|
||||
cookbook 'hostsfile', '= 2.4.5'
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@ DEPENDENCIES
|
||||
openssl (= 7.1.0)
|
||||
php (= 4.2.0)
|
||||
php-fpm (= 0.7.9)
|
||||
poise (= 2.8.1)
|
||||
poise (~> 2.8.2)
|
||||
poise-archive (~> 1.5.0)
|
||||
poise-javascript (~> 1.2.0)
|
||||
poise-languages (= 2.1.1)
|
||||
@@ -47,7 +47,7 @@ DEPENDENCIES
|
||||
poise-ruby-build (= 1.1.0)
|
||||
poise-service (~> 1.5.2)
|
||||
postfix (= 5.0.2)
|
||||
postgresql (= 7.1.3)
|
||||
postgresql (= 7.1.4)
|
||||
redis
|
||||
git: https://github.com/phlipper/chef-redis.git
|
||||
revision: 7476279fc9c8727f082b8d77b5e1922dc2ef437b
|
||||
@@ -155,7 +155,7 @@ GRAPH
|
||||
php-fpm (0.7.9)
|
||||
apt (>= 0.0.0)
|
||||
yum (>= 3.0)
|
||||
poise (2.8.1)
|
||||
poise (2.8.2)
|
||||
poise-archive (1.5.0)
|
||||
poise (~> 2.6)
|
||||
poise-build-essential (1.0.0)
|
||||
@@ -180,7 +180,7 @@ GRAPH
|
||||
poise-service (1.5.2)
|
||||
poise (~> 2.0)
|
||||
postfix (5.0.2)
|
||||
postgresql (7.1.3)
|
||||
postgresql (7.1.4)
|
||||
rbac (1.0.3)
|
||||
redis (0.5.6)
|
||||
apt (>= 0.0.0)
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## v2.8.2
|
||||
|
||||
* Remove support for Chef before 12.14.
|
||||
* Fixed compatibility with Chef 14.3.
|
||||
|
||||
## v2.8.1
|
||||
|
||||
* Fix a missing `require` when using `subclass_providers!` on Chef 12.3.
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
require 'poise'
|
||||
require 'poise/error'
|
||||
require 'poise/utils'
|
||||
|
||||
|
||||
@@ -217,8 +217,8 @@ module Poise
|
||||
def included(klass)
|
||||
super
|
||||
klass.extend(ClassMethods)
|
||||
klass.const_get(:HIDDEN_IVARS) << :@subcontexts
|
||||
klass.const_get(:FORBIDDEN_IVARS) << :@subcontexts
|
||||
klass.const_set(:HIDDEN_VARS, klass.const_get(:HIDDEN_IVARS) + [:@subcontexts])
|
||||
klass.const_set(:FORBIDDEN_IVARS, klass.const_get(:FORBIDDEN_IVARS) + [:@subcontexts])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
|
||||
|
||||
module Poise
|
||||
VERSION = '2.8.1'
|
||||
VERSION = '2.8.2'
|
||||
end
|
||||
@@ -1 +1 @@
|
||||
{"name":"poise","version":"2.8.1","description":"Helpers for writing extensible Chef cookbooks.","long_description":"# Poise\n\n[](https://travis-ci.org/poise/poise)\n[](https://rubygems.org/gems/poise)\n[](https://supermarket.chef.io/cookbooks/poise)\n[](https://codecov.io/github/poise/poise)\n[](https://gemnasium.com/poise/poise)\n[](https://www.apache.org/licenses/LICENSE-2.0)\n\n## What is Poise?\n\nThe poise cookbook is a set of libraries for writing reusable cookbooks. It\nprovides helpers for common patterns and a standard structure to make it easier to create flexible cookbooks.\n\n## Writing your first resource\n\nRather than LWRPs, Poise promotes the idea of using normal, or \"heavy weight\"\nresources, while including helpers to reduce much of boilerplate needed for this. Each resource goes in its own file under `libraries/` named to match\nthe resource, which is in turn based on the class name. This means that the file `libraries/my_app.rb` would contain `Chef::Resource::MyApp` which maps to the resource `my_app`.\n\nAn example of a simple shell to start from:\n\n```ruby\nrequire 'poise'\nrequire 'chef/resource'\nrequire 'chef/provider'\n\nmodule MyApp\n class Resource < Chef::Resource\n include Poise\n provides(:my_app)\n actions(:enable)\n\n attribute(:path, kind_of: String)\n # Other attribute definitions.\n end\n\n class Provider < Chef::Provider\n include Poise\n provides(:my_app)\n\n def action_enable\n notifying_block do\n ... # Normal Chef recipe code goes here\n end\n end\n end\nend\n```\n\nStarting from the top, first we require the libraries we will be using. Then we\ncreate a module to hold our resource and provider. If your cookbook declares\nmultiple resources and/or providers, you might want additional nesting here.\nThen we declare the resource class, which inherits from `Chef::Resource`. This\nis similar to the `resources/` file in an LWRP, and a similar DSL can be used.\nWe then include the `Poise` mixin to load our helpers, and then call\n`provides(:my_app)` to tell Chef this class will implement the `my_app`\nresource. Then we use the familiar DSL, though with a few additions we'll cover\nlater.\n\nThen we declare the provider class, again similar to the `providers/` file in an\nLWRP. We include the `Poise` mixin again to get access to all the helpers and\ncall `provides()` to tell Chef what provider this is. Rather than use the\n`action :enable do ... end` DSL from LWRPs, we just define the action method\ndirectly. The implementation of action comes from a block of recipe code\nwrapped with `notifying_block` to capture changes in much the same way as\n`use_inline_resources`, see below for more information about all the features of\n`notifying_block`.\n\nWe can then use this resource like any other Chef resource:\n\n```ruby\nmy_app 'one' do\n path '/tmp'\nend\n```\n\n## Helpers\n\nWhile not exposed as a specific method, Poise will automatically set the\n`resource_name` based on the class name.\n\n### Notifying Block\n\nAs mentioned above, `notifying_block` is similar to `use_inline_resources` in LWRPs. Any Chef resource created inside the block will be converged in a sub-context and if any have updated it will trigger notifications on the current resource. Unlike `use_inline_resources`, resources inside the sub-context can still see resources outside of it, with lookups propagating up sub-contexts until a match is found. Also any delayed notifications are scheduled to run at the end of the main converge cycle, instead of the end of this inner converge.\n\nThis can be used to write action methods using the normal Chef recipe DSL, while still offering more flexibility through subclassing and other forms of code reuse.\n\n### Include Recipe\n\nIn keeping with `notifying_block` to implement action methods using the Chef DSL, Poise adds an `include_recipe` helper to match the method of the same name in recipes. This will load and converge the requested recipe.\n\n### Resource DSL\n\nTo make writing resource classes easier, Poise exposes a DSL similar to LWRPs for defining actions and attributes. Both `actions` and\n`default_action` are just like in LWRPs, though `default_action` is rarely needed as the first action becomes the default. `attribute` is also available just like in LWRPs, but with some enhancements noted below.\n\nOne notable difference over the standard DSL method is that Poise attributes\ncan take a block argument.\n\n#### Template Content\n\nA common pattern with resources is to allow passing either a template filename or raw file content to be usLine truncated
|
||||
{"name":"poise","version":"2.8.2","description":"Helpers for writing extensible Chef cookbooks.","long_description":"# Poise\n\n[](https://travis-ci.org/poise/poise)\n[](https://rubygems.org/gems/poise)\n[](https://supermarket.chef.io/cookbooks/poise)\n[](https://codecov.io/github/poise/poise)\n[](https://gemnasium.com/poise/poise)\n[](https://www.apache.org/licenses/LICENSE-2.0)\n\n## What is Poise?\n\nThe poise cookbook is a set of libraries for writing reusable cookbooks. It\nprovides helpers for common patterns and a standard structure to make it easier to create flexible cookbooks.\n\n## Writing your first resource\n\nRather than LWRPs, Poise promotes the idea of using normal, or \"heavy weight\"\nresources, while including helpers to reduce much of boilerplate needed for this. Each resource goes in its own file under `libraries/` named to match\nthe resource, which is in turn based on the class name. This means that the file `libraries/my_app.rb` would contain `Chef::Resource::MyApp` which maps to the resource `my_app`.\n\nAn example of a simple shell to start from:\n\n```ruby\nrequire 'poise'\nrequire 'chef/resource'\nrequire 'chef/provider'\n\nmodule MyApp\n class Resource < Chef::Resource\n include Poise\n provides(:my_app)\n actions(:enable)\n\n attribute(:path, kind_of: String)\n # Other attribute definitions.\n end\n\n class Provider < Chef::Provider\n include Poise\n provides(:my_app)\n\n def action_enable\n notifying_block do\n ... # Normal Chef recipe code goes here\n end\n end\n end\nend\n```\n\nStarting from the top, first we require the libraries we will be using. Then we\ncreate a module to hold our resource and provider. If your cookbook declares\nmultiple resources and/or providers, you might want additional nesting here.\nThen we declare the resource class, which inherits from `Chef::Resource`. This\nis similar to the `resources/` file in an LWRP, and a similar DSL can be used.\nWe then include the `Poise` mixin to load our helpers, and then call\n`provides(:my_app)` to tell Chef this class will implement the `my_app`\nresource. Then we use the familiar DSL, though with a few additions we'll cover\nlater.\n\nThen we declare the provider class, again similar to the `providers/` file in an\nLWRP. We include the `Poise` mixin again to get access to all the helpers and\ncall `provides()` to tell Chef what provider this is. Rather than use the\n`action :enable do ... end` DSL from LWRPs, we just define the action method\ndirectly. The implementation of action comes from a block of recipe code\nwrapped with `notifying_block` to capture changes in much the same way as\n`use_inline_resources`, see below for more information about all the features of\n`notifying_block`.\n\nWe can then use this resource like any other Chef resource:\n\n```ruby\nmy_app 'one' do\n path '/tmp'\nend\n```\n\n## Helpers\n\nWhile not exposed as a specific method, Poise will automatically set the\n`resource_name` based on the class name.\n\n### Notifying Block\n\nAs mentioned above, `notifying_block` is similar to `use_inline_resources` in LWRPs. Any Chef resource created inside the block will be converged in a sub-context and if any have updated it will trigger notifications on the current resource. Unlike `use_inline_resources`, resources inside the sub-context can still see resources outside of it, with lookups propagating up sub-contexts until a match is found. Also any delayed notifications are scheduled to run at the end of the main converge cycle, instead of the end of this inner converge.\n\nThis can be used to write action methods using the normal Chef recipe DSL, while still offering more flexibility through subclassing and other forms of code reuse.\n\n### Include Recipe\n\nIn keeping with `notifying_block` to implement action methods using the Chef DSL, Poise adds an `include_recipe` helper to match the method of the same name in recipes. This will load and converge the requested recipe.\n\n### Resource DSL\n\nTo make writing resource classes easier, Poise exposes a DSL similar to LWRPs for defining actions and attributes. Both `actions` and\n`default_action` are just like in LWRPs, though `default_action` is rarely needed as the first action becomes the default. `attribute` is also available just like in LWRPs, but with some enhancements noted below.\n\nOne notable difference over the standard DSL method is that Poise attributes\ncan take a block argument.\n\n#### Template Content\n\nA common pattern with resources is to allow passing either a template filename or raw file content to be usLine truncated
|
||||
@@ -4,6 +4,10 @@ This file is used to list changes made in the last 3 major versions of the postg
|
||||
|
||||
## Unreleased
|
||||
|
||||
## v7.1.4 (28-03-2019)
|
||||
|
||||
- Fix installation of extensions.
|
||||
|
||||
## v7.1.3 (15-01-2019)
|
||||
|
||||
- Added support for dash in database role name.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# PostgreSQL cookbook
|
||||
|
||||
[](https://circleci.com/gh/sous-chefs/postgresql/tree/master) [](https://supermarket.chef.io/cookbooks/postgresql) [](https://pullreminders.com?ref=badge)
|
||||
[](https://supermarket.chef.io/cookbooks/postgresql)
|
||||
[](https://circleci.com/gh/sous-chefs/postgresql)
|
||||
[](https://pullreminders.com?ref=badge)
|
||||
|
||||
Installs and configures PostgreSQL as a client or a server.
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ module PostgresqlCookbook
|
||||
if new_resource.version
|
||||
version_result.stdout == new_resource.version
|
||||
else
|
||||
!version_result.stdout.nil?
|
||||
!version_result.stdout.chomp.empty?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"name":"postgresql","version":"7.1.3","description":"Installs and configures postgresql for clients or servers","long_description":"# PostgreSQL cookbook\n\n[](https://circleci.com/gh/sous-chefs/postgresql/tree/master) [](https://supermarket.chef.io/cookbooks/postgresql) [](https://pullreminders.com?ref=badge)\n\nInstalls and configures PostgreSQL as a client or a server.\n\n## Upgrading\n\nIf you are wondering where all the recipes went in v7.0+, or how on earth I use this new cookbook please see upgrading.md for a full description.\n\n## Requirements\n\n### Platforms\n\n- Amazon Linux\n- Debian 7+\n- Ubuntu 14.04+\n- Red Hat/CentOS/Scientific 6+\n- Fedora\n\n### PostgreSQL version\n\nWe follow the currently supported versions listed on <https://www.postgresql.org/support/versioning/>\n\n### Chef\n\n- Chef 13.8+\n\n### Cookbook Dependencies\n\nNone.\n\n## Resources\n\n### postgresql_client_install\n\nThis resource installs PostgreSQL client packages.\n\n#### Actions\n\n- `install` - (default) Install client packages\n\n#### Properties\n\nName | Types | Description | Default | Required?\n------------------- | ----------------- | ------------------------------------------------------------- | ----------------------------------------- | ---------\n`version` | String | Version of PostgreSQL to install | '9.6' | no\n`setup_repo` | Boolean | Define if you want to add the PostgreSQL repo | true | no\n`hba_file` | String | | `#{conf_dir}/main/pg_hba.conf` | no\n`ident_file` | String | | `#{conf_dir}/main/pg_ident.conf` | no\n`external_pid_file` | String | | `/var/run/postgresql/#{version}-main.pid` | no\n`password` | String, nil | Pass in a password, or have the cookbook generate one for you | <random string> | no\n\n#### Examples\n\nTo install version 9.5:\n\n```ruby\npostgresql_client_install 'My PostgreSQL Client install' do\n version '9.5'\nend\n```\n\n### postgresql_server_install\n\nThis resource installs PostgreSQL client and server packages.\n\n#### Actions\n\n- `install` - (default) Install client and server packages\n- `create` - Initialize the database\n\n#### Properties\n\nName | Types | Description | Default | Required?\n------------------- | --------------- | --------------------------------------------- | -------------------------------------------------- | ---------\n`version` | String | Version of PostgreSQL to install | '9.6' | no\n`setup_repo` | Boolean | Define if you want to add the PostgreSQL repo | true | no\n`hba_file` | String | Path of pg_hba.conf file | `<default_os_path>/pg_hba.conf'` | no\n`ident_file` | String | Path of pg_ident.conf file | `<default_os_path>/pg_ident.conf` | no\n`external_pid_file` | String | Path of PID file | `/var/run/postgresql/<version>-main.pid</version>` | no\n`password` | String, nil | Set PostgreSQL user password | 'generate' | no\n`port` | Integer | Set listen port of PostgreSQL service | 5432 | no\n`initdb_locale` | String | Locale to initialise the database with | 'C' | no\n\n#### Examples\n\nTo install PostgreSQL server, set your own postgres password using non-default service port.\n\n```ruby\npostgresql_server_install 'My PostgreSQL Server install' do\n action :install\nend\n\npostgresql_server_install 'Setup my PostgreSQL 9.6 server' do\n password 'MyP4ssw0rd'\n port 5433\n action :create\nend\n```\n\n#### Known issues\n\nOn some platforms (e.g. Ubuntu 18.04), your `initdb_locale` should be set to the\nsame as the template database [GH-555](https://github.com/sous-chefs/postgresql/issues/555).\n\n### postgresql_server_conf\n\nThis resource manages postgresql.conf configuration file.\n\n#### ActionsLine truncated
|
||||
{"name":"postgresql","version":"7.1.4","description":"Installs and configures postgresql for clients or servers","long_description":"# PostgreSQL cookbook\n\n[](https://supermarket.chef.io/cookbooks/postgresql)\n[](https://circleci.com/gh/sous-chefs/postgresql)\n[](https://pullreminders.com?ref=badge)\n\nInstalls and configures PostgreSQL as a client or a server.\n\n## Upgrading\n\nIf you are wondering where all the recipes went in v7.0+, or how on earth I use this new cookbook please see upgrading.md for a full description.\n\n## Requirements\n\n### Platforms\n\n- Amazon Linux\n- Debian 7+\n- Ubuntu 14.04+\n- Red Hat/CentOS/Scientific 6+\n- Fedora\n\n### PostgreSQL version\n\nWe follow the currently supported versions listed on <https://www.postgresql.org/support/versioning/>\n\n### Chef\n\n- Chef 13.8+\n\n### Cookbook Dependencies\n\nNone.\n\n## Resources\n\n### postgresql_client_install\n\nThis resource installs PostgreSQL client packages.\n\n#### Actions\n\n- `install` - (default) Install client packages\n\n#### Properties\n\nName | Types | Description | Default | Required?\n------------------- | ----------------- | ------------------------------------------------------------- | ----------------------------------------- | ---------\n`version` | String | Version of PostgreSQL to install | '9.6' | no\n`setup_repo` | Boolean | Define if you want to add the PostgreSQL repo | true | no\n`hba_file` | String | | `#{conf_dir}/main/pg_hba.conf` | no\n`ident_file` | String | | `#{conf_dir}/main/pg_ident.conf` | no\n`external_pid_file` | String | | `/var/run/postgresql/#{version}-main.pid` | no\n`password` | String, nil | Pass in a password, or have the cookbook generate one for you | <random string> | no\n\n#### Examples\n\nTo install version 9.5:\n\n```ruby\npostgresql_client_install 'My PostgreSQL Client install' do\n version '9.5'\nend\n```\n\n### postgresql_server_install\n\nThis resource installs PostgreSQL client and server packages.\n\n#### Actions\n\n- `install` - (default) Install client and server packages\n- `create` - Initialize the database\n\n#### Properties\n\nName | Types | Description | Default | Required?\n------------------- | --------------- | --------------------------------------------- | -------------------------------------------------- | ---------\n`version` | String | Version of PostgreSQL to install | '9.6' | no\n`setup_repo` | Boolean | Define if you want to add the PostgreSQL repo | true | no\n`hba_file` | String | Path of pg_hba.conf file | `<default_os_path>/pg_hba.conf'` | no\n`ident_file` | String | Path of pg_ident.conf file | `<default_os_path>/pg_ident.conf` | no\n`external_pid_file` | String | Path of PID file | `/var/run/postgresql/<version>-main.pid</version>` | no\n`password` | String, nil | Set PostgreSQL user password | 'generate' | no\n`port` | Integer | Set listen port of PostgreSQL service | 5432 | no\n`initdb_locale` | String | Locale to initialise the database with | 'C' | no\n\n#### Examples\n\nTo install PostgreSQL server, set your own postgres password using non-default service port.\n\n```ruby\npostgresql_server_install 'My PostgreSQL Server install' do\n action :install\nend\n\npostgresql_server_install 'Setup my PostgreSQL 9.6 server' do\n password 'MyP4ssw0rd'\n port 5433\n action :create\nend\n```\n\n#### Known issues\n\nOn some platforms (e.g. Ubuntu 18.04), your `initdb_locale` should be set to the\nsame as the template database [GH-555](https://github.com/sous-chefs/postgresql/issues/555).\n\n### postgresql_server_conf\n\nThis resource manages postgresql.conf configuration file.\n\n#### ActioLine truncated
|
||||
@@ -5,7 +5,7 @@ maintainer_email 'help@sous-chefs.org'
|
||||
license 'Apache-2.0'
|
||||
description 'Installs and configures postgresql for clients or servers'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '7.1.3'
|
||||
version '7.1.4'
|
||||
source_url 'https://github.com/sous-chefs/postgresql'
|
||||
issues_url 'https://github.com/sous-chefs/postgresql/issues'
|
||||
chef_version '>= 13.8'
|
||||
|
||||
Reference in new issue
Block a user