cookbook 'couchdb', '= 2.5.2'
couchdb
(24) Versions
2.5.2
-
Follow42
Installs CouchDB 2.0 from package or source
cookbook 'couchdb', '= 2.5.2', :supermarket
knife supermarket install couchdb
knife supermarket download couchdb
Description
Installs and configures CouchDB. Optionally can install CouchDB from sources.
Requirements
Requires a platform that can install Erlang from distribution packages.
Platform
Originally tested on Debian 5+, Ubuntu 8.10+, OpenBSD and FreeBSD.
Also works on Red Hat, CentOS and Fedora, requires the EPEL yum repository.
Tested via Test Kitchen (1.0-alpha):
- Ubuntu 10.04, 12.04
- CentOS 5.8, 6.3
Cookbooks
- erlang
When using the couchdb::source
recipe, the build-essential
recipe
is required. It is not a direct dependency of this cookbook as it is
an optional installation method, and package installation is
recommended.
Attributes
Cookbook attributes are named under the couch_db
keyspace.
-
node['couch_db']['src_checksum']
- sha256sum of the default version of couchdb to download -
node['couch_db']['src_version']
- default version of couchdb to download, used in the full URL to download. -
node['couch_db']['src_mirror']
- full URL to download. -
node['couch_db']['install_erlang']
- specify if erlang should be installed prior to couchdb, true by default.
Configuration
The local.ini
file is dynamically generated from attributes. Each key in
node['couch_db']['config']
is a CouchDB configuration directive, and will
be rendered in the config file. For example, the attribute:
node['couch_db']['config']['httpd']['bind_address'] = "0.0.0.0"
Will result in the following lines in the local.ini
file:
[httpd]
bind_address = "0.0.0.0"
The attributes file contains default values for platform-independent
parameters. All parameter values that expect a path argument are
not set by default. The default values that are currently set have
been taken from the CouchDB configuration
wiki page.
The resulting configuration file is now dynamically rendered from the
attributes. Each subkey below the config
key is a specific section
of the local.ini
file. Then each subkey in a section is a parameter
associated with a value.
You should consult the CouchDB documentation for specific
configuration details.
For values that are "on" or "off", they should be specified as literal
true
or false
. Any configuration option set to the literal nil
will
be skipped entirely. All other values (e.g., string, numeric literals) will
be used as is. So for example:
node.default['couch_db']['config']['couchdb']['os_process_timeout'] = 5000
node.default['couch_db']['config']['couchdb']['delayed_commits'] = true
node.default['couch_db']['config']['couchdb']['batch_save_interval'] = nil
node.default['couch_db']['config']['httpd']['port'] = 5984
node.default['couch_db']['config']['httpd']['bind_address'] = "127.0.0.1"
Will result in the following config lines:
[couchdb]
os_process_timeout = 5000
delayed_commits = true
[httpd]
port = 5984
bind_address = 127.0.0.1
(no line printed for batch_save_interval
as it is nil
)
Defaults
Here the list of attributes that are already provided by the recipe
and their associated default value.
Section [couchdb]
-
node['couch_db']['config]['couchdb']['max_document_size']
- Maximum size of a document in bytes, defaults to4294967296
(4 GB
). -
node['couch_db']['config]['couchdb']['max_attachment_chunk_size']
- Maximum chunk size of an attachment in bytes, defaults to4294967296
(4 GB
). -
node['couch_db']['config]['couchdb']['os_process_timeout']
- OS process timeout for view and external servers in milliseconds, defaults to5000
(5 seconds
). -
node['couch_db']['config]['couchdb']['max_dbs_open']
- Upper bound limit on the number of databases that can be open at one time, defaults to100
. -
node['couch_db']['config]['couchdb']['delayed_commits']
- Determines if commits should be delayed, defaults totrue
. -
node['couch_db']['config]['couchdb']['batch_save_size']
- Number of document at which to save a batch, defaults to1000
. -
node['couch_db']['config]['couchdb']['batch_save_interval']
- Interval after which to save batches in milliseconds, default to1000
(1 second
).
Section [httpd]
-
node['couch_db']['config']['httpd']['port']
- Port CouchDB should bind to, defaults to5984
. -
node['couch_db']['config']['httpd']['bind_address']
- IP address CouchDB should bind to, defaults to127.0.0.1
.
Section [log]
-
node['couch_db']['config']['log']['level']
- CouchDB's log level, defaults toinfo
.
Recipes
default
Installs the couchdb package, creates the data directory and starts the couchdb service.
source
Downloads the CouchDB source from the Apache project site, plus development dependencies. Then builds the binaries for installation, creates a user and directories, then sets up the couchdb service. Uses the init script provided in the cookbook.
License and Author
- Author: Joshua Timberman (joshua@opscode.com)
- Author: Matthieu Vachon (matthieu.o.vachon@gmail.com)
- Author: Joan Touzet (wohali@apache.org)
Copyright 2009-2014, Opscode, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
CouchDB Cookbook CHANGELOG
This file is used to list changes made in each version of the CouchDB cookbook.
v2.5.1
New cookbook maintainer
Update default version to CouchDB 1.5.0
Update source download URL to new format
Fix testkitchen support
Fix stray "w" in 1.5.0
v2.5.0
Porting to use cookbook yum ~> 3.0
Fixing up style to pass rubocop
Updating testing bits
v2.4.8
fixing metadata version error. locking to 3.0"
v2.4.6
Locking yum dependency to '< 3'
v2.4.4
Bug
-
COOK-3659 - Don't change directory ownership of
/var/run
v2.4.2
Bug
-
COOK-3323 - Force
local.ini
file changes to restart CouchDB
v2.4.0
- [COOK-1629] - source recipe not working on centos 5.8
- [COOK-2608] - Update source install version to 1.2.1
v2.2.0
- [COOK-1905] - It should be possible to customize the local.ini file in couchdb cookbook
v2.1.0
- [COOK-2139] - fedora has couchdb package, no EPEL required
v2.0.0
Major version bump due to use of platform_family (only available on newer versions of ohai/chef).
- [COOK-1838] - Switch to platform_family approach to support scientific
v1.0.4
- [COOK-1623] - add attribute to prevent erlang installation
- [COOK-1627] - set attributes at default precedence instead of normal (set)
v1.0.2
- [COOK-1399] - make bind address an attribute
v1.0.0
- Create group for couchdb
Collaborator Number Metric
2.5.2 passed this metric
Contributing File Metric
2.5.2 passed this metric
Foodcritic Metric
2.5.2 failed this metric
FC064: Ensure issues_url is set in metadata: couchdb/metadata.rb:1
FC065: Ensure source_url is set in metadata: couchdb/metadata.rb:1
FC066: Ensure chef_version is set in metadata: couchdb/metadata.rb:1
FC069: Ensure standardized license defined in metadata: couchdb/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
2.5.2 passed this metric
No Binaries Metric
2.5.2 passed this metric
Testing File Metric
2.5.2 passed this metric
Version Tag Metric
2.5.2 passed this metric
2.5.2 passed this metric
2.5.2 passed this metric
Foodcritic Metric
2.5.2 failed this metric
FC064: Ensure issues_url is set in metadata: couchdb/metadata.rb:1
FC065: Ensure source_url is set in metadata: couchdb/metadata.rb:1
FC066: Ensure chef_version is set in metadata: couchdb/metadata.rb:1
FC069: Ensure standardized license defined in metadata: couchdb/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
2.5.2 passed this metric
No Binaries Metric
2.5.2 passed this metric
Testing File Metric
2.5.2 passed this metric
Version Tag Metric
2.5.2 passed this metric
2.5.2 failed this metric
FC065: Ensure source_url is set in metadata: couchdb/metadata.rb:1
FC066: Ensure chef_version is set in metadata: couchdb/metadata.rb:1
FC069: Ensure standardized license defined in metadata: couchdb/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.5.2 passed this metric
No Binaries Metric
2.5.2 passed this metric
Testing File Metric
2.5.2 passed this metric
Version Tag Metric
2.5.2 passed this metric
2.5.2 passed this metric
2.5.2 passed this metric
Version Tag Metric
2.5.2 passed this metric
2.5.2 passed this metric