Bug 1152267 - Support multiple instances of couchdb
Summary: Support multiple instances of couchdb
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: couchdb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-10-13 18:26 UTC by Thomas Vander Stichele
Modified: 2016-03-03 19:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)
older style init file (3.54 KB, application/x-shellscript)
2014-10-13 18:26 UTC, Thomas Vander Stichele
no flags Details
a systemd ctl file for multiple instances (532 bytes, text/plain)
2014-10-13 18:27 UTC, Thomas Vander Stichele
no flags Details

Description Thomas Vander Stichele 2014-10-13 18:26:33 UTC
Created attachment 946532 [details]
older style init file

Description of problem:

couchdb is often used as a supporting database for different software which recommends using a different separate instance for various reasons.  Examples I know of are:

 - hood.ie which uses different parameters for the config of couchdb
 - feat, a clustering agent which uses python view servers which need to be custom-configured
 - desktopcouch, which uses per-user couch instances
 - puppet can use it as an ENC

I'm adding an init file (for older Fedora and pre-7 RHEL), and a systemd multiple instances file.

In my puppet modules for couchdb, I also add some selinux rules for these differently named instances, which potentially might make sense to just put in selinux-policy-targeted instead.

Comment 1 Thomas Vander Stichele 2014-10-13 18:27:16 UTC
Created attachment 946533 [details]
a systemd ctl file for multiple instances

Comment 2 Thomas Vander Stichele 2014-10-13 18:28:54 UTC
For reference, the puppet rules I have to set couchdb types:

  selinux::filecontext { "/var/log/${name}":
    seltype => 'couchdb_log_t'

  selinux::filecontext { "/etc/${name}(/.*)?":
    seltype => 'couchdb_conf_t'

  selinux::filecontext { "/var/lib/${name}(/.*)?":
    seltype => 'couchdb_var_lib_t'

In selinux-policy, the file couchdb.fc could be adapted:

/etc/couchdb(/.*)?      gen_context(system_u:object_r:couchdb_conf_t,s0)

/etc/rc\.d/init\.d/couchdb      --      gen_context(system_u:object_r:couchdb_initrc_exec_t,s0)

/usr/bin/couchdb        --      gen_context(system_u:object_r:couchdb_exec_t,s0)

/var/lib/couchdb(/.*)?  gen_context(system_u:object_r:couchdb_var_lib_t,s0)

/var/log/couchdb(/.*)?  gen_context(system_u:object_r:couchdb_log_t,s0)

/var/run/couchdb(/.*)?  gen_context(system_u:object_r:couchdb_var_run_t,s0)

line 1/4/5 should be changed to accept couchdb-.* instead of just couchdb

Comment 3 Jaroslav Reznik 2015-03-03 16:21:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:

Note You need to log in before you can comment on or make changes to this bug.