Improve cookie setup for RPMs
authorNick Vatamaniuc <vatamane@apache.org>
Mon, 16 May 2022 15:50:14 +0000 (11:50 -0400)
committerNick Vatamaniuc <nickva@users.noreply.github.com>
Wed, 18 May 2022 12:04:08 +0000 (08:04 -0400)
commit227f6b4fb6c5f3d6890f56449cf465b7eb948df0
tree038ebfefcf63513122c2b357b112141051ccf9dc
parent48afa6770e5a7f503a8249828668c35cbeaeb244
Improve cookie setup for RPMs

Previously, with an embedded prompt, it was hard to automatically
provision nodes.

Avoid the interactive TTY prompt by setting a random 48 character (285
bits of entropy) cookie from /dev/urandom instead. This should help
automating standalone setups.

Improve clustered setups by allowing users to specify the cookie as an
environment variable. In this way the cookie may be automaticaly
provisioned on all the nodes of the cluster during the initial
install.

Fixes https://github.com/apache/couchdb-pkg/issues/94
rpm/SPECS/couchdb.spec.in