Forge Home

couchdb

CouchDB installation and management

13,879 downloads

5,615 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
  • 1.0.0-rc1 (pre-release)
  • 1.0.0-beta
released Jun 29th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'zpetr-couchdb', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add zpetr-couchdb
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install zpetr-couchdb --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: couchdb

Documentation

zpetr/couchdb — version 1.0.0 Jun 29th 2018

CouchDB


Table of Contents

  1. Overview
  2. Module Description
  3. Usage
  4. Examples
  5. Reference
  6. Limitations

##Overview

The couchdb module installs, configures, and manages the CouchDB instances on any CouchDB version of 1.x branch (2.x is not supported by this version) starting from 1.2.0 to 1.7.1 (version 1.6.2 is prefered and installed by default).

Installation is based on jhs/build-couchdb builder.

##Module Description

The CouchDB module manages both the installation and configuration of CouchDB.

You can lunch multiple instances of CouchDB on the same node, create databases and import data from remote source.

##Usage

###Preconfiguration

include couchdb

###Install instance

couchdb::instance { "instance-ref": }

###Create database

couchdb::db { "database_name": }

##Examples

  • Default installation of the latest version of CouchDB on port 5984
include couchdb
couchdb::instance { "main": }
  • Latest version of CouchDB on port 5985 with http authentication enabled
include couchdb
couchdb::instance { "main":
    port            => '5985',
    www_auth        => true,
    admin_login     => 'admin',
    admin_password  => 'admin',
}
  • Multiple versions
include couchdb
couchdb::instance { "main": }
couchdb::instance { "test":
    version         => '1.4.0'
    port            => '5985',
}
  • Install and create database
include couchdb
couchdb::instance { "main": }
couchdb::db { "database_test": }

##Reference

###Classes

  • couchdb: Download build scripts and verify dependencies.

###Defines

  • couchdb::instance: Install one instance of CouchDB.
  • couchdb::db: Create a database.

###Parameters

####couchdb

#####manage_user

Manage specific user for CouchDB instance. If false root is used.

  • Value: boolean (true/false)
  • Default: true

#####manage_group

Manage specific group for CouchDB instance. If false root group is used.

  • Value: boolean (true/false)
  • Default: true

#####user

Specific user name for CouchDB instance. Used if manage_user = true.

  • Default: couchdb

#####group

Specific group name for CouchDB instance. Used if manage_group = true.

  • Default: couchdb

#####couchdb_src_dir

Folder where CouchDB source code will be downloaded.

  • Default: /usr/local/src/couchdb

####couchdb::instance

#####ref

Unique name of CouchDB instance.

#####version

Version of CouchDB to install (starting from 1.2.0)

  • Value
    • stable / latest / last - Latest version
    • unstable / trunk / dev - Current trunk version
    • *.* - Install version: *.*.0. Example: 1.5
    • *.*.* - Version to install. Example: 1.4.0
  • Default: stable

#####dir

Directory for the CouchDB instance.

  • Default: /usr/local/couchdb.

NB! Sub-folder with the ref name is automaticly added to this directory. See ref2dir

#####ref2dir

Add ref name as sub-folder of installation dir.

  • Value: boolean (true/false)
  • Default: true

#####start_on_boot

Start instance automaticly on node boot.

  • Value: boolean (true/false)
  • Default: true

#####bind

IP bind adress. CouchDB instance will be accessible only from this IP. Set to 0.0.0.0 to access CouchDB from any computer other than local.

  • Value: IP
  • Default: 0.0.0.0

#####port

Instance port.

  • Default: 5984

#####www_auth

Enable Http-Authentication.

  • Value: boolean (true/false)
  • Default: false

#####admin_login

If www_auth is setted to true, set admin user login to this parameter.

  • Default: [not setted]

#####admin_password

If www_auth is setted to true, set admin user password to this parameter.

  • Default: [not setted]

#####cors

Enable CORS on this instance. By enabling CORS functionality, a CouchDB instance can accept direct connections to protected DBs and instances, without the browser functionality being blocked due to the same origin constraint.

  • Value: boolean (true/false)
  • Default: false

#####cors_origins

Domains than allowed to serve a data from this CouchDB instance.

  • Default: *

#####cors_headers

Restricted Accepted Headers

  • Default: Access-Control-Allow-Headers,Content-Type,Authorization,Content-Length,X-Requested-With,Accept

####couchdb::db

#####dbname

Database name.

#####target

Instance target URL. If you protect instance by login/password, use URL in form: http(s)://login:password@URI:PORT

#####source

Source URL where this database will be replecated from.

  • Default: [empty]

##Limitations

This module has been tested on:

  • RedHat Enterprise Linux
    • 4
    • 5
    • 6
    • 7
  • CentOS
    • 5
    • 6
  • Debian
    • 5
    • 6
    • 7
  • Ubuntu
    • 9
    • 10
    • 11