crowbar/crowbar — pull request #1912 by VictorLowther (2013-10-06 11:41:12+00:00)
Title: CB 2.0: Switch to Postgres for production, and refactor the provisioner BC to hook it back into the node lifecycle. [3/3]

This pull request is mostly for feedback right now, and does the
following:

* Switch from sqlite to postgres for our production database. Since
we were running several processes in parallel banging on sqlite, we
were getting occasional locking violations that could only be
cleared by restarting Crowbar. Since that problem will only get
worse as we parallelize things, switch to a real database that
handles multiple concurrent connections just fine -- Postgres.
* Refactor the provisioner to hook it back into the node lifecycle.
This lets the provisioner start managing its DHCP and PXE
functionality on a per-node basis again.

For now, I am using Postgres 9.3 from the package repositories
maintained by postgresql.org. This should allow us to start taking
advantage of some of the nicer things that have been happening in the
9.x development branch w.r.t JSON handling. The Crowbar postgres
install is currently restricted to listening on a UNIX socket that it
trusts implicitly, so the only security we have there is that Postgres
is not reachable using IP. This was done to ease bootstrapping and to
not interfere with the Postgres instance that chef-server needs to set up.

releases/development/master/extra/barclamp_install.rb | 4 ++++
.../development/master/extra/install-crowbar-native.sh | 15 +++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)

Crowbar-Pull-ID: 1894f0c22097ce2fe14718ee0722577a3af82967

Crowbar-Release: development