cookbook 'database_sl', '= 0.1.5'
database_sl (9) Versions 0.1.5 Follow0
Installs/Configures database_sl
cookbook 'database_sl', '= 0.1.5', :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
- Initial release of database_sl
0.1.1
- Full chefspec coverage
- Reviewed README
0.1.2
- Fixed FC041: Execute resource used to run curl or wget commands
0.1.3
- Fixed FC013: Use file_cache_path rather than hard-coding tmp paths
0.1.4
- Added guard to adding postgresql media key
- Fixed reference to localhost in connection options (127.0.0.1)
0.1.5
- Renamed
adding_apt_repository
resource toadding_postgresql_apt_repository
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.5 passed this metric
0.1.5 passed this metric