diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 7a5df1229a..d91c3d6872 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -296,11 +296,15 @@ listen osbs 0.0.0.0:10047 balance hdr(appserver) server osbs-master01 osbs-master01:8443 check inter 10s rise 1 fall 2 check ssl verify none +# This is silly, but basically, stg has registry01/02, prod has registry02/03 listen docker-registry 0.0.0.0:10048 balance hdr(appserver) - server docker-registry01 docker-registry01:5000 check inter 10s rise 1 fall 2 {% if env == "staging" %} + server docker-registry01 docker-registry01:5000 check inter 10s rise 1 fall 2 +{% endif %} server docker-registry02 docker-registry02:5000 check inter 10s rise 1 fall 2 +{% if env == "production" %} + server docker-registry03 docker-registry03:5000 check inter 10s rise 1 fall 2 {% endif %} {% if env == "staging" %} diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.registry.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.registry.conf index e43ed5f4a5..67a36f56ef 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.registry.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.registry.conf @@ -14,8 +14,7 @@ RewriteRule ^/v2/(.*)/blobs/([a-zA-Z0-9:]*) https://cdn.registry.fedoraproject.o # This is terible, but Docker. RewriteCond %{REQUEST_METHOD} ^(PATCH|POST|PUT|DELETE)$ -{% if env == "staging" %} -RewriteRule ^/v2/(.*)$ http://docker-registry01:5000/v2/$1 [P,L] +RewriteRule ^/v2/(.*)$ http://docker-registry02:5000/v2/$1 [P,L] RewriteRule ^/v2/(.*)$ http://localhost:6081/v2/$1 [P,L] DocumentRoot /srv/web/registry-index/ @@ -23,10 +22,6 @@ DocumentRoot /srv/web/registry-index/ Require all granted -{% else %} -RewriteRule ^/(.*)$ http://localhost:10048/$1 [P,L] -RewriteRule ^/(.*)$ http://localhost:6081/$1 [P,L] -{% endif %} SSLVerifyClient optional SSLVerifyDepth 1