Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

couchdb (24) Versions 2.5.3

Installs CouchDB 2.0 from package or source

Policyfile
Berkshelf
Knife
cookbook 'couchdb', '= 2.5.3', :supermarket
cookbook 'couchdb', '= 2.5.3'
knife supermarket install couchdb
knife supermarket download couchdb
README
Dependencies
Changelog
Quality 100%

Description

Installs and configures CouchDB. Optionally can install CouchDB from sources.

Requirements

Requires a platform that can install Erlang from distribution packages.

Platform

Tested via Test Kitchen:

  • CentOS 6.9, 7.3
  • Debian 7, 8
  • Ubuntu 12.04, 14.04

NOTE Ubuntu 16.04 (xenial) does not have an old enough version of Erlang
available to support CouchDB 1.x! This cookbook will move to support CouchDB 2.x
soon, resolving this issue.

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 to 4294967296 (4 GB).
  • node['couch_db']['config]['couchdb']['max_attachment_chunk_size'] - Maximum chunk size of an attachment in bytes, defaults to 4294967296 (4 GB).
  • node['couch_db']['config]['couchdb']['os_process_timeout'] - OS process timeout for view and external servers in milliseconds, defaults to 5000 (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 to 100.
  • node['couch_db']['config]['couchdb']['delayed_commits'] - Determines if commits should be delayed, defaults to true.
  • node['couch_db']['config]['couchdb']['batch_save_size'] - Number of document at which to save a batch, defaults to 1000.
  • node['couch_db']['config]['couchdb']['batch_save_interval'] - Interval after which to save batches in milliseconds, default to 1000 (1 second).

Section [httpd]

  • node['couch_db']['config']['httpd']['port'] - Port CouchDB should bind to, defaults to 5984.
  • node['couch_db']['config']['httpd']['bind_address'] - IP address CouchDB should bind to, defaults to 127.0.0.1.

Section [log]

  • node['couch_db']['config']['log']['level'] - CouchDB's log level, defaults to info.

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.

LWRPs

database

Can be used to create a database on a CouchDB install.

  • database_name - name of the database to create.
  • database_host - host name or IP address of the database server.
  • database_port - TCP port of the database server.
  • couchdb_user - username to bind to the CouchDB server with (optional).
  • couchdb_password - password to bind to the CouchDB server with (optional).

License and Author

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.

Copyright 2009-2014, Opscode, Inc.
Copyright 2014-2017, Joan Touzet

CouchDB Cookbook CHANGELOG

This file is used to list changes made in each version of the CouchDB cookbook.

v2.5.3

  • Final release explicitly targeting CouchDB 1.x.
  • Multiple fixes for CentOS, recent Debian/Ubuntu builds
  • Prefer /usr/lib64/ over /usr/lib when present
  • Store CouchDB UUID into host-specific local.ini file
  • New database LWRP provider
  • Source downloaded via https (closes #40)
  • Clean up build directory when building from source
  • Fixed init script problem on multiple platforms
  • Documentation received a complete overhaul
  • Many style cleanups for Ruby and Chef 12/13
  • Full support for test-kitchen, rubocop, rake, foodcritic, etc.
    • Includes basic smoke test

v2.5.2

  • Add nohup to running couch to make it work with Test Kitchen
  • adding case for libmozjs package for ubuntu 14.04
  • Specify upstart service provider for ubuntu >=13.10

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.3 passed this metric

Contributing File Metric
            

2.5.3 passed this metric

Foodcritic Metric
            

2.5.3 passed this metric

License Metric
            

2.5.3 passed this metric

No Binaries Metric
            

2.5.3 passed this metric

Testing File Metric
            

2.5.3 passed this metric

Version Tag Metric
            

2.5.3 passed this metric