Serve qcow2 images from builder http servers

Let people download our qcow2 images to aid in local reproduction of
issues. We only serve the qcow2 files as they are smallest.

Note that this should probably be updated to use a negative match
against qcow2 so that we can ensure only qcow2 is served regardless of
what image formats we are using. Unfortuantely I can't get that to work
with autoindex. If you have ideas feel free to share them.

Change-Id: Ia23e68e87d2126eac2e22d9c3fed8406e2f447cb
This commit is contained in:
Clark Boylan 2018-04-20 10:35:08 -07:00
parent 026afd3957
commit 2d269e75a1

View File

@ -8,6 +8,22 @@
Require all granted
</Directory>
# Allow access to image files
Alias /images /opt/nodepool_dib
<Directory /opt/nodepool_dib>
Options <%= scope.lookupvar("httpd::params::options") %>
AllowOverride None
Require all granted
# Only allow access to the qcow2 files as they are smallest
<FilesMatch ".+\.(vhd|raw)(\.(md5|sha256))?$">
Require all denied
</FilesMatch>
</Directory>
# Exclude the dib build dir as well.
<Directory /opt/nodepool_dib/*.d/>
Require all denied
</Directory>
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_error.log
LogLevel warn
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/nodepool_access.log combined