Skip to content

Commit ce94e24

Browse files
authored
Backup central key management (#484)
* upgrade backup/downloads hosts to match prod deployments * implement a centralized backup_ssh key management pillar * migrate to using centralized backup ssh keys * include docs for review * correct the target_user for new hg backups * save a line!
1 parent d11810f commit ce94e24

File tree

19 files changed

+108
-72
lines changed

19 files changed

+108
-72
lines changed

Vagrantfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33

44
SERVERS = [
5-
"backup-server",
5+
{:name => "backup-server", :codename => "noble"},
66
{:name => "bugs", :codename => "jammy", :ports => [8080]},
77
{:name => "buildbot", :codename => "noble"},
88
"cdn-logs",
99
{:name => "codespeed", :codename => "jammy"},
1010
{:name => "consul", :codename => "jammy"},
11-
"docs",
12-
"downloads",
11+
{:name => "docs", :codename => "noble"},
12+
{:name => "downloads", :codename => "noble"},
1313
{:name => "hg", :codename => "noble"},
1414
{:name => "loadbalancer", :ports => [20000, 20001, 20002, 20003, 20004, 20005, 20010, 20011]},
1515
"mail",

conf/vagrant/master.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ ext_pillar:
2626
- consul:
2727
key_path: /var/lib/consul/encryption_keys/primary.key
2828
acl_path: /var/lib/consul/acl_tokens/
29+
- backup_ssh: {}

pillar/dev/backup/docs.sls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
backup:
2+
directories:
3+
python-docs:
4+
source_directory: /srv/
5+
exclude:
6+
- /srv/docsbuild
7+
target_host: backup-server.vagrant.psf.io
8+
target_directory: /backup/python-docs
9+
target_user: python-docs
10+
frequency: daily
11+
increment_retention: 7D
12+
user: root

pillar/dev/backup/downloads.sls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
backup:
2+
directories:
3+
python-downloads:
4+
source_directory: /srv/
5+
target_host: backup-server.vagrant.psf.io
6+
target_directory: /backup/python-downloads
7+
target_user: downloads
8+
frequency: daily
9+
increment_retention: 365D
10+
user: root

pillar/dev/backup/server.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
backup-server:
2-
backups: {}
1+
backup:
2+
server: true

pillar/dev/top.sls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ base:
1111

1212
'backup-server':
1313
- match: nodegroup
14-
- backup.server
14+
- backup.*
1515

1616
'bugs':
1717
- match: nodegroup
@@ -35,11 +35,13 @@ base:
3535
- firewall.rs-lb-backend
3636
- groups.docs
3737
- secrets.docs
38+
- backup.docs
3839

3940
'downloads':
4041
- match: nodegroup
4142
- firewall.rs-lb-backend
4243
- groups.downloads
44+
- backup.downloads
4345

4446
'gnumailman':
4547
- match: nodegroup

pillar/prod/backup/bugs.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ backup:
66
target_directory: /backup/python-bugs
77
target_user: python-bugs
88
frequency: hourly
9+
increment_retention: 30D
910
user: root

pillar/prod/backup/buildbot.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ backup:
66
target_directory: /backup/buildbot
77
target_user: buildbot
88
frequency: hourly
9+
increment_retention: 90D
910
user: root

pillar/prod/backup/docs.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ backup:
88
target_directory: /backup/python-docs
99
target_user: python-docs
1010
frequency: daily
11+
increment_retention: 7D
1112
user: root

pillar/prod/backup/downloads.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ backup:
66
target_directory: /backup/python-downloads
77
target_user: downloads
88
frequency: daily
9+
increment_retention: 365D
910
user: root

0 commit comments

Comments
 (0)