Re: SSH-free PostgreSQL

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tianon Gravi <admwiggin(at)gmail(dot)com>
Cc: Joe Ferguson <joe(at)infosiftr(dot)com>, Postgres-Docker Mailing List <pgsql-pkg-docker(at)postgresql(dot)org>
Subject: Re: SSH-free PostgreSQL
Date: 2014-07-30 19:52:20
Message-ID: 53D94CF4.8090000@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-docker

On 07/30/2014 12:42 PM, Tianon Gravi wrote:
> On 30 Jul 2014 13:40, "Josh Berkus" <josh(at)agliodbs(dot)com
> <mailto:josh(at)agliodbs(dot)com>> wrote:
>>
>> On 07/30/2014 12:34 PM, Joseph Ferguson wrote:
>> > On Wed, Jul 30, 2014 at 11:55 AM, Josh Berkus <josh(at)agliodbs(dot)com
> <mailto:josh(at)agliodbs(dot)com>> wrote:
>> >>
>> >> Question: how does --link work if the two dockers are on different
> machines?
>> >
>> > Currently it does not work at all. The local docker daemon knows
>> > nothing of other docker daemons. I think expanding --link or
>> > something similar is planned for the future.
>> >
>> > Regardless, the --link could still be emulated by setting the correct
>> > env vars (POSTGRES_PORT_5432_TCP_ADDR POSTGRES_PORT_5432_TCP_PORT) on
>> > the linked-from host and setting the proper routing and possible port
>> > mapping to the container on the other machine.
>>
>> Those settings aren't *enough* though. We also need to know user and
>> application name.
>
> Well, you're not going to get that from just --link either, so I don't
> see a way for those to not be specified by the user.

Yeah, so I think having a MASTER_CONNECT_STRING ENV specified by the
user is the way to go. If it's populated, it's a replica.

This brings up another issue with using the Ubuntu packages. Those
packages initdb a database directory. Increasingly, I'm thinking that
we *don't* want the generic initdb'd directory; we want to populate it
with something more sensible (whether master or replica). Is there a
more elegant way to do this than scripting an rm -rf?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-pkg-docker by date

  From Date Subject
Next Message Joseph Ferguson 2014-07-30 20:09:42 Re: SSH-free PostgreSQL
Previous Message Tianon Gravi 2014-07-30 19:42:45 Re: SSH-free PostgreSQL