A wrapper cookbook to install PostgreSQL with the defaults for a G5 development environment.
0.2.0
We recommend using ChefDK generators to generate your new cookbook:
$ chef generate cookbook my-cookbook
The cookbook is currently only available via git. We recommend using Berkshelf to manage the installation.
To initialize Berkshelf in your project, if you haven't done so already:
$ cd my-chef-cookbook
$ chef exec berks init
Add a dependency on g5-postgresql to your cookbook's metadata.rb:
depends 'g5-postgresql'
To reference this cookbook in git, simply add the following line to your
Berksfile
:
cookbook 'g5-postgresql', git: 'git@github.com:G5/g5-postgresql.git', tag: 'v0.2.0'
-
node['postgresql']['password']['postgres']
- the encrypted value of the password that should be set on the postgres user. To generate the md5-hashed value from the command line:echo -n 'iloverandompasswordsbutthiswilldo''postgres' | openssl md5 | sed -e 's/.* /md5/'
For more information on how to set this attribute, see the Chef Solo Note in the documentation for the wrapped cookbook.
See the wrapped postgresql cookbook for more attributes.
Installs PostgreSQL server and client, and configures them for use
by the vagrant
user.
See the wrapped postgresql cookbook for more information.
Include the default recipe in one of your cookbook's recipes:
include_recipe 'g5-postgresql::default'
Set the postgres user's encrypted password in your Vagrantfile:
config.vm.provision :chef_solo do |chef|
# ...
chef.json = {
postgresql: {
password: {
postgres: 'my-md5-hashed-password-value'
}
}
end
end
- Maeve Revels / @maeve
- Fork it
- Set up your development environment
- Create your feature branch (
git checkout -b my-new-feature
) - Write your code and specs
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
If you find bugs, have feature requests or questions, please file an issue.
- Clone the repository locally:
$ git clone git@github.com:G5/g5-postgresql.git
$ cd g5-postgresql
- Install required cookbooks using Berkshelf:
$ chef exec berks install
- Provision an instance for testing using test-kitchen:
$ chef exec kitchen converge
See chef exec kitchen help
for more test-kitchen commands.
The unit tests use ChefSpec,
and live in the test/unit
directory. To execute the entire
suite:
$ chef exec rspec
To run the foodcritic linting tool:
$ chef exec foodcritic .
The integration tests use ServerSpec, and live
in the test/integration/default/serverspec
directory. To execute
the test suite:
$ chef exec kitchen verify
We strive to follow semantic versioning. After all pull requests have been merged to master and you determine the version number for the next release:
-
Update CHANGELOG.md with the new version, release date, and a synopsis of changes included in this release.
## v0.1.1 (2014-08-04) * Fixed #42: A short description here
-
Update metadata.rb with the new version.
name 'g5-postgresql' description 'G5 wrapper cookbook for installing PostgreSQL' version '0.1.1' # ...
-
Update README.md with the new version.
## Current version 0.1.1
-
Commit your changes and create a tag for the new version.
git commit -m "Prepare to release v0.1.1" git push origin master git tag -a v0.1.1 -m "Minor bug fixes" git push --tags
Copyright (c) 2014 G5
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.