-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathinit.sls
141 lines (124 loc) · 3.06 KB
/
init.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
include:
- nginx
- postgresql.client
deadsnakes-ppa:
pkgrepo.managed:
- ppa: deadsnakes/ppa
buildbot-deps:
pkg.installed:
- pkgs:
- git
- python3.9-dev
- python3.9-venv
- build-essential
- libpq-dev
- require:
- pkgrepo: deadsnakes-ppa
buildbot-user:
user.present:
- name: buildbot
- home: /srv/buildbot/
- shell: /bin/bash
- createhome: False
/etc/buildbot:
file.directory:
- user: buildbot
- group: buildbot
- mode: "0750"
/data/www/buildbot:
file.directory:
- user: buildbot
- group: root
- mode: "0755"
- makedirs: True
/srv:
file.directory:
- user: buildbot
- group: buildbot
- mode: "0755"
/srv/buildbot:
git.latest:
- name: https://github.com/python/buildmaster-config.git
- rev: main
- target: /srv/buildbot
- user: buildbot
- force_reset: True
- force_fetch: True
- require:
- user: buildbot-user
- file: /srv
{# vagrant up fails due to this file not existing (see: https://github.com/python/psf-salt/pull/367#issuecomment-2218636563) #}
/srv/buildbot/master/twistd.log:
file.managed:
- user: buildbot
- group: buildbot
- mode: "0644"
- replace: False
- require:
- git: /srv/buildbot
update-master:
cmd.run:
- runas: buildbot
- cwd: /srv/buildbot
- name: make update-master
- require:
- git: /srv/buildbot
- onchanges:
- git: /srv/buildbot
/srv/buildbot/buildbot.sh start -q /srv/buildbot/master:
cron.present:
- identifier: START_BUILDBOT
- user: buildbot
- special: '@reboot'
find /data/www/buildbot/daily-dmg -type f -mtime +14 -exec rm {} \;:
cron.present:
- identifier: DAILY_CLEAN_BUILDBOT_DMG
- user: buildbot
- special: '@daily'
find /data/www/buildbot/test-results -type f -mtime +7 -exec rm {} \;:
cron.present:
- identifier: DAILY_CLEAN_BUILDBOT_TEST_RESULTS
- user: buildbot
- special: '@daily'
curl --head 'https://buildbot.python.org/plugins/wsgi_dashboards/release_status/index.html?refresh=true':
cron.present:
- identifier: RELEASE_DASHBOARD_CACHE_REFRESH
- user: buildbot
- minute: '*/5'
/etc/nginx/sites.d/buildbot-master.conf:
file.managed:
- source: salt://buildbot/config/nginx.conf.jinja
- template: jinja
- user: root
- group: root
- mode: "0644"
- context:
instance: master
port: 9000
- require:
- file: /etc/nginx/sites.d/
- file: /etc/nginx/fastly_params
/etc/consul.d/service-buildbot-master.json:
file.managed:
- source: salt://consul/etc/service.jinja
- template: jinja
- context:
name: buildbot-master
port: 9000
- user: root
- group: root
- mode: "0644"
- require:
- pkg: consul-pkgs
/etc/consul.d/service-buildbot-master-worker.json:
file.managed:
- source: salt://consul/etc/service.jinja
- template: jinja
- context:
name: buildbot-master-worker
port: 9020
- user: root
- group: root
- mode: "0644"
- require:
- pkg: consul-pkgs