appliance/postgresql: Move wait function to pkg/postgres

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
controller: Wait for postgres to come up

This solves a race condition where bootstrap starts the controller
before postgres is fully available in service discovery.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test: Fix race in TestControllerRestart

Creating a client doesn't actually make any connections, so try to
connect to the stream inside of the attempts function.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Merge pull request #659 from flynn/fix-postgres-race

Fix postgres race
Merge pull request #660 from flynn/fix-scheduler-test

test: Fix race in TestControllerRestart
all: Update etcd to v2.0.0-rc.1

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
all: Use IANA-assigned ports for etcd

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
appliance/etcd: Add CA certificates to container image

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Update configuration file format

Configuration files are now JSON describing the arguments and
environment variables to add when running the daemon.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Fix panic converting error in log

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Add expose_env field to service manifest

Environment variables listed in this field are copied from the daemon
environment into the job.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Configure etcd clustering via environment variables directly

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
pkg: Add etcdcluster package

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host/cli: Add init command for configuring the cluster

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Default to 1-node etcd configuration if none is specified

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Lookup default external IP

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
discoverd: Bump etcd connection attempts to 10 minutes

When starting a v0.5 cluster for the first time it can take a while for
all of the nodes to show up.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Bump discoverd connection attempts to 10 minutes

When starting a etcd v0.5 cluster for the first time it can take a while
for all of the nodes to show up.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test/cluster: Update etcd configuration for v2.0

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
website: Update cluster bootstrap documentation with `flynn-host init`

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>