From f8d4b1e0f0589ac7c3d71fd01d2564fc788e4df1 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 25 Sep 2017 18:01:11 +0000 Subject: [PATCH] Proxy configuration for ODCS in stg. --- playbooks/include/proxies-reverseproxy.yml | 8 ++++++++ playbooks/include/proxies-websites.yml | 7 +++++++ roles/haproxy/templates/haproxy.cfg | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/playbooks/include/proxies-reverseproxy.yml b/playbooks/include/proxies-reverseproxy.yml index 9ef464ebb5..af8b6cbf22 100644 --- a/playbooks/include/proxies-reverseproxy.yml +++ b/playbooks/include/proxies-reverseproxy.yml @@ -616,6 +616,14 @@ tags: - app.os.fedoraproject.org + - role: httpd/reverseproxy + website: odcs.fedoraproject.org + destname: odcs + proxyurl: http://localhost:10066 + tags: + - odcs + when: env == "staging" + - role: httpd/reverseproxy website: data-analysis.fedoraproject.org destname: awstats diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml index d16b3141f1..cb6c959eb4 100644 --- a/playbooks/include/proxies-websites.yml +++ b/playbooks/include/proxies-websites.yml @@ -781,6 +781,13 @@ server_aliases: [mbs.stg.fedoraproject.org] cert_name: "{{wildcard_cert_name}}" + - role: httpd/website + name: odcs.fedoraproject.org + sslonly: true + server_aliases: [odcs.stg.fedoraproject.org] + cert_name: "{{wildcard_cert_name}}" + when: env == "staging" + # fedorahosted is retired. We have the site here so we can redirect it. - role: httpd/website diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index cda10abc5e..5f759c0d6f 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -442,6 +442,13 @@ listen os-nodes 0.0.0.0:10065 option httpchk GET / http-check expect status 503 +{% if env == "staging" %} +listen odcs 0.0.0.0:10066 + balance hdr(appserver) + server odcs-frontend01 odcs-frontend01:80 check inter 20s rise 2 fall 3 + server odcs-frontend02 odcs-frontend02:80 check inter 20s rise 2 fall 3 + option httpchk GET /odcs/1/composes/ +{% endif %} # Apache doesn't handle the initial connection here like the other proxy # entries. This proxy also doesn't use the http mode like the others. # stunnel should be sitting on port 9939 (public) and redirecting