25 Commits

Author SHA1 Message Date
Clark Boylan
79ff2afb87 Enable ssl on all mirror vhosts
Previously we had enabled SSL on our main vhost for the mirrors. Do
similar for all of the proxy cache vhosts for docker and other external
resources.

As part of this change we improve the testing to ensure that the new
vhosts are working as expected. One testing specific change to note is
the testinfra node names did not match our existing system-config-run
job nodenames. This has been corrected.

Additionally RHRegistryMirror and QuayMirror may not be working and
fixing those is left as a followup.

Change-Id: I9dbbd4080c3a2cce4acc39d63244f7a645503553
2020-05-19 11:52:20 -07:00
Radosław Piliszek
3c47bdbd5d Set AllowEncodedSlashes NoDecode on 8080 revproxy
This is a follow-up on nocanon from [1].
This ensures Apache does not filter any requests originally
containing encoded slashes.

[1] I5a3a6551536e2d1e87aa074e0de7619a367b1971

Change-Id: I94fcb67a914da6ab4d6e1bfd0a2e02121d22559c
2020-04-05 16:07:28 +02:00
Radosław Piliszek
cc4c46c2e8 Do not canonicalize URLs to registry.npmjs.org
Kolla Monasca Grafana images are currently not buildable in CI
due to:
404 Not Found - GET http://mirror.bhs1.ovh.openstack.org:8080/registry.npmjs/@types%2fcolor-name

The url-escaped slash gets mangled by Apache on its way to
registry which causes 404.

This patch fixes that.

Change-Id: I5a3a6551536e2d1e87aa074e0de7619a367b1971
2020-04-02 14:29:00 +02:00
Ian Wienand
7187b313d8 Remove /tarballs proxy from mirrors
As described in the dependent change, which removes the environment
var to set this up, this is no longer required.

Story: #2006598
Task: #39014

Change-Id: I93455dd1512aeb9111feaf516abfb60695976663
Depends-On: https://review.opendev.org/714543
2020-03-24 09:20:01 +11:00
Ian Wienand
cad5d6482d mirror: remove debug output of apache config
This isn't necessary in production and creates a lot of noise.

Change-Id: I38c9353554beca234e1da6dc74ba4a1f6e9742e7
2019-12-10 09:37:20 +11:00
Zuul
b167038b3f Merge "Mirror Ceph Nautilus for Debian based" 2019-10-23 23:48:37 +00:00
Tobias Urdin
de519d5617 Mirror Ceph Nautilus for Debian based
Ceph Nautilus is released and the official mirror
is available. This adds the Ceph Nautilus mirror
so we can sync it for Stretch and Bionic.

Based on the same change that was done when Mimic
was released [1]

[1] https://review.opendev.org/#/c/571989/

Change-Id: I9424d1f4df58acde8ea70dc16283d4de89189bae
2019-10-24 09:07:30 +11:00
Kevin Carter
8b0877cb68
Add proxy for quay
This change adds a proxy config for quay which should assist
us when gating using images provided by the publically
available registry.

Change-Id: I971705e59724e70bd9d42a6920cf4f883556f673
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-09-19 16:49:20 -05:00
Ian Wienand
e15735e586 Publish .log files as text/plain
Default apache mimetypes don't include .log as text/plain; add it.
Log export was added with I67870f6d439af2d2a63a5048ef52cecff3e75275 so
match the .log.1 file that logrotate creates for our rsync mirror logs
too.

Change-Id: Iaf3f19d26f3a6fda7ef3571573af219a31f1dced
2019-07-16 11:33:47 +10:00
Zuul
482abf3bf0 Merge "mirror-update: export mirroring logs" 2019-07-15 22:47:34 +00:00
Zuul
0f78ac2dcc Merge "Add proxy for registry.access.redhat" 2019-07-11 20:39:34 +00:00
Alex Schultz
2f96a248c8 Add apt-puppetlabs mirroring back
This used to be mirrored, however there were issues when upstream
dropped the PC1 repositories a few months back. The puppet openstack
jobs are still trying to leverage this mirror but it does not exist in
some regions because it was disabled on the afs content. This change
fixes the reprepo configuration to still pull down puppet5/6 for xenial
and strech and add the symlink back to the mirrors.

Change-Id: I71ad5afe086a503d75a365543ad8869e35ef873b
2019-07-11 11:12:14 -06:00
Kevin Carter
525d21a332
Add proxy for registry.access.redhat
This change adds a proxy config for registry.access.redhat which should
assist us when gating using images provided by the publically available
registry.

Change-Id: Ica7477d63659610de852d305a63f3e78d0dd8c4f
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-10 07:31:08 -05:00
Ian Wienand
959f0301e7 mirror-update: export mirroring logs
This adds a periodic job to copy logs to a mirror volume, and export
it via the usual mirror http.

I have precreated the log volume; just as a R/W volume because this is
expected to be very low volume access.

Change-Id: I67870f6d439af2d2a63a5048ef52cecff3e75275
2019-07-04 09:11:29 +10:00
Zuul
d36db889cc Merge "Revert "Move openSUSE Tumbleweed into a caching mirror instead"" 2019-06-27 01:44:50 +00:00
Jeremy Stanley
428872075e Revert "Move openSUSE Tumbleweed into a caching mirror instead"
This reverts commit b3ce1c52dc7ca455ffd94ea07d8a4fb1b6905fa8.
It removed the AFS mirror at the same time it added the proxy,
but jobs don't know to look for the proxy since it's on a
totally different TCP port.

Change-Id: I87cc03eb3322bd7b093dd6fe798aadb48f319805
2019-06-26 23:29:20 +00:00
Ian Wienand
d33105535a Separate openafs CI mirror
This is an intermediate step to having both kafs and openafs testing
in the gate; this just makes it clear which host is which.

Change-Id: I8cd006227ed47ad5f2c5eec664083477dd7ba397
2019-06-17 15:56:09 +10:00
Zuul
cd0c12cddc Merge "Switch mirror Apache logs to ISO8601" 2019-06-11 19:34:05 +00:00
Ian Wienand
eabd710974 Switch mirror Apache logs to ISO8601
Unfortunately it's not uncommon to be correlating mirror access logs
to remote requests to see what is going on with access failures.  It
is *much* easier when everything is in ISO8601 format and not using
strings for month names, etc.

Switch the log format used everywhere to "compact ISO 8601 format,
including micro-seconds".  The errorlog format is based on

 http://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat

Change-Id: I0aafb831d5c5ca3abf031771d5f59c986611e197
2019-06-11 09:36:06 +10:00
Zuul
a12de2104e Merge "mirror: rename 80/443 log files" 2019-06-07 13:21:00 +00:00
Ian Wienand
42e54e2c08 mirror: rename 80/443 log files
Having proxy_[80|443]_access.log is wrong beacuse they're not really
proxies (I think I just copied this incorrectly).  Change it to
mirror_, and update the macro that is only used on the mirror portions
too.

Change-Id: I8eca941fee9606d25dd25bc54bc552ccc7094e0f
2019-06-07 10:14:14 +10:00
Clark Boylan
48945cabc2 Serve ubuntu package content on opendev mirrors
The /var/www/mirror/ubuntu -> /afs/openstack.org/mirror/ubuntu symlink
was missing so we weren't serving ubuntu mirror content from the opendev
mirror. Add this to the list of afs content symlinks we create.

Change-Id: I10b985afbaa737033cd5c1d4dd72eb8e77f8eb32
2019-05-30 15:20:10 -07:00
James E. Blair
a92ac59e15 Fix new mirror system errors
Fix the reported stat name for the mirror playbook.

Run the mirror job in gate.

Set follow=false so that we're telling Ansible to set the perms
on the link rather than the target (which is the default).

Change-Id: Id594cf3f7ab1dacae423cd2b7e158a701d086af6
2019-05-24 09:42:38 -07:00
Dirk Mueller
b3ce1c52dc Move openSUSE Tumbleweed into a caching mirror instead
Tumbleweed is only rarely used in the openStack CI, so mirroring it
fully is not worth the time/space overhead. a caching proxy
should be good enough. Add it to the directories to clean up
and remove the older entries because they will no longer be
matching.

Change-Id: I987da098cf4a7330cdec8da9ae3cfbff2f330bf8
2019-05-24 16:19:40 +10:00
Ian Wienand
670107045a Create opendev mirrors
This impelements mirrors to live in the opendev.org namespace.  The
implementation is Ansible native for deployment on a Bionic node.

The hostname prefix remains the same (mirrorXX.region.provider.) but
the groups.yaml splits the opendev.org mirrors into a separate group.
The matches in the puppet group are also updated so to not run puppet
on the hosts.

The kerberos and openafs client parts do not need any updating and
works on the Bionic host.

The hosts are setup to provision certificates for themselves from
letsencrypt.  Note we've added a new handler for mirror nodes to use
that restarts apache on certificate issue/renewal.

The new "mirror" role is a port of the existing puppet mirror.pp.  It
installs apache, sets up some modules, makes some symlinks, sets up a
cleanup cron job and installs the apache vhost configuration.

The vhost configuration is also ported from the extant puppet.  It is
simplified somewhat; but the biggest change is that we have extracted
the main port 80 configuration into a macro which is applied to both
port 80 and 443; i.e. the host will have SSL support.  The other ports
are left alone for now, but can be updated in due course.

Thus we should be able to CNAME the existing mirrors to new nodes, and
any existing http access can continue.  We can update our mirror setup
scripts to point to https resources as appropriate.

Change-Id: Iec576d631dd5b02f6b9fb445ee600be060f9cf1e
2019-05-21 11:08:25 +10:00