cookbook 'database_sl', '= 0.1.2'
database_sl (9) Versions 0.1.2 Follow0
Installs/Configures database_sl
cookbook 'database_sl', '= 0.1.2', :supermarket
knife supermarket install database_sl
knife supermarket download database_sl
database_sl Cookbook
Super light database cookbook. As opposed to other database cookbooks, to run
queries it is used only the official terminal-based tool.
Living on the edge, it is used the approach to build custom
resources introduced in
chef-client version 12.5.
Requirements
Platforms
- Ubuntu 14.04 LTS
Chef
- Chef 12.2.0
packages
-
database_sl::postgresql
- Installs PostgreSQL db server and client
Attributes
database_sl::postgresql
See attributes/postgresql.rb
for default values.
-
node['database']['postgresql']['package_version']
- Version of the postgresql package -
node['database']['postgresql']['version']
- Version of the postgresql db
To check available package versions run command:
sudo apt-cache madison postgresql
Resources
Example create postgresql user:
postgresql_user 'create_webuser' do name 'webuser' password 'webuser123' action :create end
Example grant privileges to postgresql user:
postgresql_user 'grant_webuser' do database_name 'database_test' name 'webuser' password 'webuser123' privileges ['ALL PRIVILEGES'] action :grant end
Example create postgresql database:
postgresql_database 'database_test' do action :create end
Usage
database_sl::postgresql
Just include database_sl
in your node's run_list
:
{ "name":"my_node", "run_list": [ "recipe[database_sl::postgresql]" ] }
For sharing at Chef Supermarket:
knife cookbook site share "database_sl" "Databases"
Testing
Before running kitchen test
:
# vagrant box matching `.kitchen.yml` platform driver box
vagrant box add ubuntu-14.04 https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/14.04/ubuntu-14.04-amd64.box
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and Authors
Authors: David Saenz Tagarro
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
database_sl CHANGELOG
This file is used to list changes made in each version of the database_sl cookbook.
0.1.0
- [David Saenz Tagarro] - Initial release of database_sl
0.1.1
- [David Saenz Tagarro] - Full chefspec coverage
- [David Saenz Tagarro] - Reviewed README
0.1.2
- [David Saenz Tagarro] - Fixed FC041: Execute resource used to run curl or wget commands
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Foodcritic Metric
0.1.2 failed this metric
FC013: Use file_cache_path rather than hard-coding tmp paths: /tmp/cook/3422074fea291cacc21a915a/database_sl/recipes/postgresql.rb:16
0.1.2 failed this metric