Skip to content

Commit 116c640

Browse files
committed
Fix ssh
1 parent 3835642 commit 116c640

107 files changed

Lines changed: 468 additions & 445 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
sudo: required

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ But nevertheless you are able to play with `NODE_PRIORITY` environment variable
160160

161161
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}`
162162

163-
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`.
163+
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`.
164164

165165

166166
## Replication slots

doc/RECOVERY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Upod recovery completion duplicates wil be removed.
1616
```
1717
1. Check sshd is running on master, if not start it:
1818
```
19-
SSH_ENABLE=1 /home/postgres/.ssh/entrypoint.sh
19+
SSH_ENABLE=1 sshd_start
2020
```
2121
1. Connect to barman container and select appropriate base backup
2222
```

docker-compose/postgres-10_repmgr-3.2_pgpool-3.3_barman-2.3.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-3.2_pgpool-3.3_barman-2.4.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-3.2_pgpool-3.6_barman-2.3.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-3.2_pgpool-3.6_barman-2.4.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-3.2_pgpool-3.7_barman-2.3.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-3.2_pgpool-3.7_barman-2.4.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

docker-compose/postgres-10_repmgr-4.0_pgpool-3.3_barman-2.3.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77
version: '2'
@@ -51,7 +51,7 @@ services:
5151
- 5422:5432
5252
volumes:
5353
- pgmaster:/var/lib/postgresql/data
54-
- ./ssh/:/home/postgres/.ssh/keys
54+
- ./ssh/:/tmp/.ssh/keys
5555
networks:
5656
cluster:
5757
aliases:
@@ -75,7 +75,7 @@ services:
7575
- 5441:5432
7676
volumes:
7777
- pgslave1:/var/lib/postgresql/data
78-
- ./ssh:/home/postgres/.ssh/keys
78+
- ./ssh:/tmp/.ssh/keys
7979
networks:
8080
cluster:
8181
aliases:
@@ -166,7 +166,7 @@ services:
166166
BACKUP_SCHEDULE: "*/30 */5 * * *"
167167
volumes:
168168
- backup:/var/backups
169-
- ./ssh:/home/postgres/.ssh/keys
169+
- ./ssh:/tmp/.ssh/keys
170170
networks:
171171
cluster:
172172
aliases:
@@ -200,7 +200,7 @@ services:
200200
- 5430:5432
201201
- 9898:9898 # PCP
202202
volumes:
203-
- ./ssh:/home/postgres/.ssh/keys
203+
- ./ssh:/tmp/.ssh/keys
204204
networks:
205205
cluster:
206206
aliases:

0 commit comments

Comments
 (0)