Skip to content

Commit

Permalink
Fix ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
paunin committed Apr 26, 2019
1 parent 3835642 commit a7ae9f7
Show file tree
Hide file tree
Showing 107 changed files with 468 additions and 445 deletions.
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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

sudo: required
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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 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`.
You also will have to set identical ssh keys to all containers. For that you need to mount files with your keys in paths `/tmp/.ssh/keys/id_rsa`, `/tmp/.ssh/keys/id_rsa.pub`.


## Replication slots
Expand Down
2 changes: 1 addition & 1 deletion doc/RECOVERY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Upod recovery completion duplicates wil be removed.
```
1. Check sshd is running on master, if not start it:
```
SSH_ENABLE=1 /home/postgres/.ssh/entrypoint.sh
SSH_ENABLE=1 sshd_start
```
1. Connect to barman container and select appropriate base backup
```
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-3.2_pgpool-3.7_barman-2.4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

##########################################################################
## AUTO-GENERATED FILE ##
## BUILD_NUMBER=Fri 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-4.0_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose/postgres-10_repmgr-4.0_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 26 Apr 2019 10:18:51 +08 ##
## BUILD_NUMBER=Fri 26 Apr 2019 22:57:06 +08 ##
##########################################################################

version: '2'
Expand Down Expand Up @@ -51,7 +51,7 @@ services:
- 5422:5432
volumes:
- pgmaster:/var/lib/postgresql/data
- ./ssh/:/home/postgres/.ssh/keys
- ./ssh/:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand All @@ -75,7 +75,7 @@ services:
- 5441:5432
volumes:
- pgslave1:/var/lib/postgresql/data
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -166,7 +166,7 @@ services:
BACKUP_SCHEDULE: "*/30 */5 * * *"
volumes:
- backup:/var/backups
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down Expand Up @@ -200,7 +200,7 @@ services:
- 5430:5432
- 9898:9898 # PCP
volumes:
- ./ssh:/home/postgres/.ssh/keys
- ./ssh:/tmp/.ssh/keys
networks:
cluster:
aliases:
Expand Down
Loading

0 comments on commit a7ae9f7

Please sign in to comment.