summaryrefslogtreecommitdiffstats
path: root/playbooks/include/proxies-reverseproxy.yml
blob: 1a5014bcb68106a8cbf089afc69b84c411f576bb (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
- name: Set up those ProxyPassReverse statements.  Somebody get me a cup of coffee..
  hosts: proxies-stg:proxies
  user: root
  gather_facts: True

  vars_files:
   - /srv/web/infra/ansible/vars/global.yml
   - "/srv/private/ansible/vars.yml"
   - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  handlers:
  - include: "{{ handlers_path }}/restart_services.yml"

  vars:
  - varnish_url: http://localhost:6081

  pre_tasks:

  - name: Remove some crusty files from bygone eras
    file: dest=/etc/httpd/conf.d/{{item}} state=absent
    with_items:
    - meetbot.fedoraproject.org/reversepassproxy.conf
    - meetbot.fedoraproject.org/meetbot.conf
    notify:
    - reload proxyhttpd
    tags:
    - httpd
    - httpd/reverseproxy


  roles:

  - role: httpd/reverseproxy
    website: copr.fedoraproject.org
    destname: coprapi
    localpath: /api
    remotepath: /api
    proxyurl: https://copr.fedorainfracloud.org

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: nagios
    localpath: /nagios
    remotepath: /nagios
    proxyurl: http://noc01

  - role: httpd/reverseproxy
    website: nagios.fedoraproject.org
    destname: nagios
    remotepath: /
    proxyurl: http://nagios01.phx2.fedoraproject.org

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: nagios-external
    localpath: /nagios-external
    remotepath: /nagios-external
    proxyurl: http://noc02

  - role: httpd/reverseproxy
    website: lists.fedoraproject.org
    destname: mailman3
    localpath: /
    remotepath: /
    header_scheme: true
    keephost: true
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: lists.fedorahosted.org
    destname: mailman3
    localpath: /
    remotepath: /
    header_scheme: true
    keephost: true
    proxyurl: "{{ varnish_url }}"

  # The place for the raw originals
  - role: httpd/reverseproxy
    website: meetbot-raw.fedoraproject.org
    destname: meetbot
    remotepath: /meetbot/
    # Talk directly to the app server, not haproxy
    proxyurl: http://value01

  # The place for the fancy mote view
  - role: httpd/reverseproxy
    website: meetbot.fedoraproject.org
    destname: mote
    #remotepath: /mote/
    # Talk directly to the app server, not haproxy
    proxyurl: http://value01

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: nuancier
    localpath: /nuancier
    remotepath: /nuancier
    header_scheme: true
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: github2fedmsg
    localpath: /github2fedmsg
    remotepath: /github2fedmsg
    header_scheme: true
    proxyurl: http://localhost:10037

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: fedora-notifications
    localpath: /notifications
    remotepath: /notifications
    header_scheme: true
    proxyurl: http://localhost:10036

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: packages
    localpath: /packages
    remotepath: /packages
    proxyurl: http://localhost:10016

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: tagger
    localpath: /tagger
    remotepath: /tagger
    rewrite: true
    proxyurl: http://localhost:10017

  - role: httpd/reverseproxy
    website: ask.fedoraproject.org
    destname: askbot
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: darkserver.fedoraproject.org
    destname: darkserver
    remotepath: /darkserver/
    # Talk directly to the app server, not haproxy
    proxyurl: http://localhost:10009

  - role: httpd/reverseproxy
    website: paste.fedoraproject.org
    destname: modernpaste
    keephost: true
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: totpcgiprovision
    localpath: /totpcgiprovision
    proxyurl: http://localhost:10019

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: fas
    remotepath: /accounts
    localpath: /accounts
    proxyurl: http://localhost:10004

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: elections
    remotepath: /voting
    localpath: /voting
    proxyurl: http://localhost:10007

  # Fedoauth is odd here -- it has an entry for both stg and prod.
  - role: httpd/reverseproxy
    website: id.stg.fedoraproject.org
    destname: id
    proxyurl: http://localhost:10020
    when: env == "staging"

  - role: httpd/reverseproxy
    website: id.stg.fedoraproject.org
    destname: 00-kdcproxy
    remotepath: /KdcProxy
    localpath: /KdcProxy
    proxyurl: http://localhost:10053
    when: env == "staging"

  - role: httpd/reverseproxy
    website: id.stg.fedoraproject.org
    destname: 00-ipa
    remotepath: /ipa
    localpath: /ipa
    proxyurl: http://localhost:10061
    when: env == "staging"

  - role: httpd/reverseproxy
    website: id.fedoraproject.org
    destname: id
    proxyurl: http://localhost:10020
    when: env != "staging"

  - role: httpd/reverseproxy
    website: id.fedoraproject.org
    destname: 00-kdcproxy
    remotepath: /KdcProxy
    localpath: /KdcProxy
    proxyurl: http://localhost:10053
    when: env != "staging"

  - role: httpd/reverseproxy
    website: id.fedoraproject.org
    destname: 00-ipa
    remotepath: /ipa
    localpath: /ipa
    proxyurl: http://localhost:10061
    when: env != "staging"

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: datagrepper
    remotepath: /datagrepper
    localpath: /datagrepper
    rewrite: true
    proxyurl: http://localhost:10028

  - role: httpd/reverseproxy
    website: badges.fedoraproject.org
    destname: badges
    proxyurl: http://localhost:10032

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: fedocal
    remotepath: /calendar
    localpath: /calendar
    header_scheme: true
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: kerneltest
    remotepath: /kerneltest
    localpath: /kerneltest
    header_scheme: true
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: qa.fedoraproject.org
    destname: blockerbugs
    remotepath: /blockerbugs
    localpath: /blockerbugs
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: fedoraproject.org
    destname: fp-wiki
    wpath: /w
    wikipath: /wiki
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: pkgdb
    remotepath: /pkgdb
    localpath: /pkgdb
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: bodhi.fedoraproject.org
    destname: bodhi
    proxyurl: http://localhost:10010

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: mirrormanager
    remotepath: /mirrormanager
    localpath: /mirrormanager
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: mirrors.fedoraproject.org
    destname: mirrormanager-mirrorlist
    proxyurl: http://localhost:10002

  - role: httpd/reverseproxy
    website: download.fedoraproject.org
    destname: mirrormanager-redirector
    proxyurl: http://localhost:10002

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: koschei
    localpath: /koschei
    remotepath: /koschei
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: mdapi
    remotepath: /mdapi
    localpath: /mdapi
    proxyurl: http://localhost:10043

  - role: httpd/reverseproxy
    website: openqa.fedoraproject.org
    destname: openqa
    remotepath: /
    localpath: /
    proxyurl: http://localhost:10044

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: autocloud
    localpath: /autocloud
    remotepath: /autocloud
    proxyurl: http://localhost:10041

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: statscache
    localpath: /statscache
    remotepath: /statscache
    proxyurl: http://localhost:10042

  - role: httpd/reverseproxy
    website: pdc.fedoraproject.org
    destname: pdc
    proxyurl: http://localhost:10045

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: zanata2fedmsg
    localpath: /zanata2fedmsg
    remotepath: /zanata2fedmsg
    proxyurl: http://localhost:10046

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: yk-val
    remotepath: /yk-val/verify
    localpath: /yk-val/verify
    proxyurl: http://localhost:10004

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: pager
    remotepath: /pager
    localpath: /pager
    # Talk directly to the app server, not haproxy
    proxyurl: http://sundries01

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: awstats
    remotepath: /awstats
    localpath: /awstats
    # Talk directly to the app server, not haproxy
    proxyurl: http://log01

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: epylog
    remotepath: /epylog
    localpath: /epylog
    # Talk directly to the app server, not haproxy
    proxyurl: http://log01

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: maps
    remotepath: /maps
    localpath: /maps
    # Talk directly to the app server, not haproxy
    proxyurl: http://log01

  - role: httpd/reverseproxy
    website: fedoraproject.org
    destname: freemedia
    remotepath: /freemedia
    localpath: /freemedia
    proxyurl: http://localhost:10011

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: collectd
    localpath: /collectd
    remotepath: /collectd
    # Talk directly to the app server, not haproxy
    proxyurl: http://log01

  ### Four entries for taskotron for production
  - role: httpd/reverseproxy
    website: taskotron.fedoraproject.org
    destname: taskotron
    # Talk directly to the app server, not haproxy
    proxyurl: http://taskotron01.vpn.fedoraproject.org

  - role: httpd/reverseproxy
    website: taskotron.fedoraproject.org
    destname: taskotron-resultsdb
    localpath: /resultsdb
    remotepath: /resultsdb
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb01.vpn.fedoraproject.org

  - role: httpd/reverseproxy
    website: taskotron.fedoraproject.org
    destname: taskotron-resultsdbapi
    localpath: /resultsdb_api
    remotepath: /resultsdb_api
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb01.vpn.fedoraproject.org

  - role: httpd/reverseproxy
    website: taskotron.fedoraproject.org
    destname: taskotron-execdb
    localpath: /execdb
    remotepath: /execdb
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb01.vpn.fedoraproject.org

  ### And four entries for taskotron for staging
  - role: httpd/reverseproxy
    website: taskotron.stg.fedoraproject.org
    destname: taskotron
    # Talk directly to the app server, not haproxy
    proxyurl: http://taskotron-stg01.qa.fedoraproject.org
    when: env == "staging"

  - role: httpd/reverseproxy
    website: taskotron.stg.fedoraproject.org
    destname: taskotron-resultsdb
    localpath: /resultsdb
    remotepath: /resultsdb
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb-stg01.qa.fedoraproject.org
    when: env == "staging"

  - role: httpd/reverseproxy
    website: taskotron.stg.fedoraproject.org
    destname: taskotron-resultsdbapi
    localpath: /resultsdb_api
    remotepath: /resultsdb_api
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb-stg01.qa.fedoraproject.org
    when: env == "staging"

  - role: httpd/reverseproxy
    website: taskotron.stg.fedoraproject.org
    destname: taskotron-execdb
    localpath: /execdb
    remotepath: /execdb
    # Talk directly to the app server, not haproxy
    proxyurl: http://resultsdb-stg01.qa.fedoraproject.org
    when: env == "staging"

  ### Beaker production
  - role: httpd/reverseproxy
    website: beaker.qa.fedoraproject.org
    destname: beaker
    # Talk directly to the app server, not haproxy
    proxyurl: http://beaker01.vpn.fedoraproject.org
    when: env == "production"

  ### Beaker staging
  - role: httpd/reverseproxy
    website: beaker.stg.fedoraproject.org
    destname: beaker-stg
    # Talk directly to the app server, not haproxy
    proxyurl: http://beaker-stg01.qa.fedoraproject.org
    when: env == "staging"

  ### QA staging

  - role: httpd/reverseproxy
    website: qa.stg.fedoraproject.org
    destname: qa-stg
    # Talk directly to the app server, not haproxy
    proxyurl: http://qa-stg01.qa.fedoraproject.org
    when: env == "staging"

  - role: httpd/reverseproxy
    website: qa.stg.fedoraproject.org
    destname: blockerbugs
    remotepath: /blockerbugs
    localpath: /blockerbugs
    proxyurl: "{{ varnish_url }}"
    when: env == "staging"

  - role: httpd/reverseproxy
    website: phab.qa.stg.fedoraproject.org
    destname: qa-stg-phab
    # Talk directly to the app server, not haproxy
    proxyurl: http://phab.qa-stg01.qa.fedoraproject.org
    keephost: true
    when: env == "staging"

  - role: httpd/reverseproxy
    website: docs.qa.stg.fedoraproject.org
    destname: qa-stg-docs
    # Talk directly to the app server, not haproxy
    proxyurl: http://docs.qa-stg01.qa.fedoraproject.org
    when: env == "staging"

  ### QA production

  - role: httpd/reverseproxy
    website: qa.fedoraproject.org
    destname: qa-prod
    # Talk directly to the app server, not haproxy
    proxyurl: http://qa-prod01.vpn.fedoraproject.org

  - role: httpd/reverseproxy
    website: phab.qa.fedoraproject.org
    destname: qa-prod-phab
    # Talk directly to the app server, not haproxy
    proxyurl: http://phab.qa-prod01.vpn.fedoraproject.org
    keephost: true

  - role: httpd/reverseproxy
    website: docs.qa.fedoraproject.org
    destname: qa-prod-docs
    # Talk directly to the app server, not haproxy
    proxyurl: http://docs.qa-prod01.vpn.fedoraproject.org

  # This one gets its own role (instead of httpd/reverseproxy) so that it can
  # copy in some silly static resources (globe.png, index.html)
  - role: geoip-city-wsgi/proxy
    website: geoip.fedoraproject.org
    proxyurl: http://localhost:10029

  - role: httpd/reverseproxy
    website: src.fedoraproject.org
    destname: git
    proxyurl: http://localhost:10057
    header_scheme: true
    header_expect: true
    keephost: true

  - role: httpd/reverseproxy
    website: osbs.fedoraproject.org
    destname: osbs
    proxyurl: http://localhost:10047

  - role: httpd/reverseproxy
    website: registry.fedoraproject.org
    destname: registry
    # proxyurl in this one is totally ignored, because Docker.
    # (turns out it uses PATCH requests that Varnish cannot deal with)
    proxyurl: "{{ varnish_url }}"

  - role: httpd/reverseproxy
    website: candidate-registry.fedoraproject.org
    destname: candidate-registry
    proxyurl: http://localhost:10054

  - role: httpd/reverseproxy
    website: retrace.fedoraproject.org
    destname: retrace
    proxyurl: http://localhost:10049
    when: env == "staging"

  - role: httpd/reverseproxy
    website: faf.fedoraproject.org
    destname: faf
    proxyurl: http://localhost:10050
    when: env == "staging"

  - role: httpd/reverseproxy
    website: apps.fedoraproject.org
    destname: pps
    remotepath: /pps
    localpath: /pps
    proxyurl: http://localhost:10051
    when: env == "staging"

  - role: httpd/reverseproxy
    website: admin.fedoraproject.org
    destname: fas3
    remotepath: /fas3
    localpath: /fas3
    proxyurl: http://localhost:10052
    when: env == "staging"

  - role: httpd/reverseproxy
    website: mbs.fedoraproject.org
    destname: mbs
    proxyurl: http://localhost:10063

  - role: httpd/reverseproxy
    website: koji.fedoraproject.org
    destname: koji
    proxyurl: http://localhost:10056
    keephost: true

  - role: httpd/reverseproxy
    website: ppc.koji.fedoraproject.org
    destname: ppckoji
    proxyurl: http://localhost:10058
    keephost: true

  - role: httpd/reverseproxy
    website: s390.koji.fedoraproject.org
    destname: s390koji
    proxyurl: http://localhost:10059
    keephost: true

  - role: httpd/reverseproxy
    website: arm.koji.fedoraproject.org
    destname: armkoji
    proxyurl: http://localhost:10060
    keephost: true

  - role: httpd/reverseproxy
    website: kojipkgs.fedoraproject.org
    destname: kojipkgs
    proxyurl: http://localhost:10062
    keephost: true

  - role: httpd/reverseproxy
    website: data-analysis.fedoraproject.org
    destname: awstats
    remotepath: /
    localpath: /
    proxyurl: http://data-analysis01.phx2.fedoraproject.org