Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-74 #160

Merged
merged 1 commit into from
May 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

sudo: required
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ But nevertheless you are able to play with `NODE_PRIORITY` environment variable

If you have need to organize your cluster with some tricky logic or less problematic cross checks. You can enable SSH server on each node. Just set ENV variable `SSH_ENABLE=1` (disabled by default) in all containers (including pgpool and barman). That will allow you to connect from any to any node by simple command under `postgres` user: `gosu postgres ssh {NODE NETWORK NAME}`

You might want to change default ssh keys which are put into the cluster. For that you need to mount files with your keys in paths `/home/postgres/.ssh/id_rsa`, `/home/postgres/.ssh/id_rsa.pub`.
You also will have to set identical ssh keys to all containers. For that you need to mount files with your keys in paths `/home/postgres/.ssh/keys/id_rsa`, `/home/postgres/.ssh/keys/id_rsa.pub`.


## Replication slots
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/latest.yml
9 changes: 7 additions & 2 deletions docker-compose/postgres-10_pgpool-3.3_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,6 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -64,7 +65,7 @@ services:
NODE_ID: 2
NODE_NAME: node2
CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)

SSH_ENABLE: 1
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"
REPLICATION_PRIMARY_HOST: pgmaster
CLEAN_OVER_REWIND: 1
Expand All @@ -74,6 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -164,6 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -196,6 +199,8 @@ services:
ports:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down
9 changes: 7 additions & 2 deletions docker-compose/postgres-10_pgpool-3.3_barman-2.4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,6 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -64,7 +65,7 @@ services:
NODE_ID: 2
NODE_NAME: node2
CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)

SSH_ENABLE: 1
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"
REPLICATION_PRIMARY_HOST: pgmaster
CLEAN_OVER_REWIND: 1
Expand All @@ -74,6 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -164,6 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -196,6 +199,8 @@ services:
ports:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down
9 changes: 7 additions & 2 deletions docker-compose/postgres-10_pgpool-3.6_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,6 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -64,7 +65,7 @@ services:
NODE_ID: 2
NODE_NAME: node2
CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)

SSH_ENABLE: 1
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"
REPLICATION_PRIMARY_HOST: pgmaster
CLEAN_OVER_REWIND: 1
Expand All @@ -74,6 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -164,6 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -196,6 +199,8 @@ services:
ports:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down
9 changes: 7 additions & 2 deletions docker-compose/postgres-10_pgpool-3.6_barman-2.4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,6 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -64,7 +65,7 @@ services:
NODE_ID: 2
NODE_NAME: node2
CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)

SSH_ENABLE: 1
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"
REPLICATION_PRIMARY_HOST: pgmaster
CLEAN_OVER_REWIND: 1
Expand All @@ -74,6 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -164,6 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -196,6 +199,8 @@ services:
ports:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down
9 changes: 7 additions & 2 deletions docker-compose/postgres-10_pgpool-3.7_barman-2.3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri May 25 12:36:46 +07 2018 ##
## BUILD_NUMBER=Mon May 28 16:58:37 +07 2018 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,6 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -64,7 +65,7 @@ services:
NODE_ID: 2
NODE_NAME: node2
CLUSTER_NODE_NETWORK_NAME: pgslave1 # (default: hostname of the node)

SSH_ENABLE: 1
PARTNER_NODES: "pgmaster,pgslave1,pgslave3"
REPLICATION_PRIMARY_HOST: pgmaster
CLEAN_OVER_REWIND: 1
Expand All @@ -74,6 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -164,6 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -196,6 +199,8 @@ services:
ports:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
networks:
cluster:
aliases:
Expand Down
1 change: 0 additions & 1 deletion docker-compose/postgres-10_pgpool-3.7_barman-2.4.yml

This file was deleted.

Loading