CouchDB comes with a nice and (mostly) intuitive user interface called Fauxton. It can be accessed when adding "_utils" to the CouchDB URL, for example https://mycouchdb.example.com/_utils.
For a standalone CouchDB you can check the whole config, create new admin users, etc in the UI, however when you run a clustered CouchDB, these pages do not open:
Config disabled: It seems that you are running a cluster with 2 nodes. For CouchDB 2.0 we recommend using a configuration management tools like Chef, Ansible, Puppet or Salt (in no particular order) to configure your nodes in a cluster.
We highly recommend against configuring nodes in your cluster using the HTTP API and suggest using a configuration management tool for all configurations.
Technically speaking this "blockage" makes sense because it prevents you to make wrong configuration changes in the wrong places.
Note: With some trickery in the URI you can still access the config on a per-node-level. For example: http://localhost:email@example.com will show the config for the cluster node couchdb01.example.com. But use with caution!!
In order to create a new server admin user in the cluster, one needs to:
1) Figure out the cluster members
2) Add this new server admin to each cluster member
Finding the members of the cluster is pretty easy, just go to /_membership on your CouchDB:
$ curl -s "http://localhost:5984/_membership" -u admin:XXX
This means we need to add the new server admin into the nodes firstname.lastname@example.org and email@example.com.
To create the new server admin, we can use curl with the PUT method to create the new user. Important here is the URI which contains the cluster node's local configuration:
$ curl -s -X PUT "http://localhost:firstname.lastname@example.org/_config/admins/newadminuser" -d '"secret"' -u admin:XXX
This creates a new local server admin called "newadminuser" on node "email@example.com" with a password "secret".
The user should now appear in the list of admin users:
$ curl -s "http://localhost:firstname.lastname@example.org/_config/admins/" -u admin:XXX
All server admins are now shown. The newly created "newadminuser" and the default "admin" user which I used to create the new user.
Now don't forget to create the new user on the other cluster node(s), too. This data will not be synced in the cluster as it is part of the local (node) configuration.
$ curl -s -X PUT "http://localhost:email@example.com/_config/admins/newadminuser" -d '"secret"' -u admin:XXX
Now your new server admin can be used on the cluster.
No comments yet.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder