Browse Source

Listen on Quay Registry Mirror Ports

We need to tell apache to listen on the ports used by the Quay Registry
Mirror. Without this we aren't actually able to provide connections to
this vhost.

Add testing to ensure this is working in a simple manner.

Change-Id: I28bdb7aeb9c3252c6319658acaa530a7d7c25a72
changes/15/729315/5
Clark Boylan 4 months ago
parent
commit
c0ac38c2c9
2 changed files with 24 additions and 1 deletions
  1. +5
    -0
      playbooks/roles/mirror/templates/mirror.vhost.j2
  2. +19
    -1
      testinfra/test_mirror.py

+ 5
- 0
playbooks/roles/mirror/templates/mirror.vhost.j2 View File

@@ -22,6 +22,11 @@ NameVirtualHost *:8083
Listen 4446
NameVirtualHost *:4446

Listen 8084
NameVirtualHost *:8084
Listen 4447
NameVirtualHost *:4447

{% raw %}
LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-agent}i\"" combined-cache
ErrorLogFormat "[%{cu}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% , \ referer\ %{Referer}i"


+ 19
- 1
testinfra/test_mirror.py View File

@@ -91,4 +91,22 @@ def test_dockerv2_mirror(host):
cmd = host.run("wget -O- http://[%s]:8082/v2/" %addr)
assert '401 Unauthorized' in cmd.stderr

# TODO test RHRegistryMirror and QuayMirror
def test_quay_mirror(host):
# QuayRegistryMirror
for addr in host.addr(host.backend.host).ipv4_addresses:
cmd = host.run("wget --no-check-certificate -qO- "
"https://%s:4447/" % addr)
assert 'quay' in cmd.stdout

cmd = host.run("wget -qO- http://%s:8084/" % addr)
assert 'quay' in cmd.stdout

for addr in host.addr(host.backend.host).ipv6_addresses:
cmd = host.run("wget --no-check-certificate -qO- "
"https://[%s]:4447/" % addr)
assert 'quay' in cmd.stdout

cmd = host.run("wget -qO- http://[%s]:8084/" % addr)
assert 'quay' in cmd.stdout

# TODO test RHRegistryMirror

Loading…
Cancel
Save