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.
Personal Internet VMware PHP Linux Shell Bluecoat Proxy Windows Hardware Virtualization Nagios MySQL DB Monitoring Mail Android Network Wyse Hacks Tomcat Postgres Apple Mac Backup BSD ZFS Solaris SmartOS Unix Multimedia Perl Database MongoDB CMS OTRS FreeBSD Wordpress LXC Nginx Proxmox DNS Graphics GlusterFS Security Chef HAProxy Icinga Ansible HTML MariaDB Containers Rancher Docker AWS ELK Kibana Logstash Filebeat Varnish PGSQL PostgreSQL ElasticSearch CouchDB Bash Macintosh Container Minio Grafana InfluxDB Databases NFS OSSEC SystemD Java Zoneminder Surveillance Elasticsearch SSL TLS Icingaweb2 Cloud Wireless Kubernetes Ubuntu