Skip to content

Commit

Permalink
Fixes #28696 - configures apache to serve docker content with pulp3
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Jan 20, 2020
1 parent 132d38f commit 9e81dc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@
include pulpcore::plugin::file

foreman::config::apache::fragment { 'pulpcore-https':
ssl_content => template('foreman_proxy_content/pulpcore-api-apache.conf.erb', 'foreman_proxy_content/pulpcore-content-apache.conf.erb'),
ssl_content => template(
'foreman_proxy_content/pulpcore-api-apache.conf.erb',
'foreman_proxy_content/pulpcore-content-apache.conf.erb',
'foreman_proxy_content/pulpcore-docker-apache.conf.erb'
),
}

foreman::config::apache::fragment { 'pulpcore-http':
Expand Down
1 change: 1 addition & 0 deletions spec/classes/foreman_proxy_content_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class { 'foreman_proxy::plugin::pulp':
is_expected.to contain_foreman__config__apache__fragment('pulpcore-https')
.with_ssl_content(%r{ProxyPass /pulp/api/v3 http://127\.0\.0\.1:24817/pulp/api/v3})
.with_ssl_content(%r{ProxyPass /pulp/content http://127\.0\.0\.1:24816/pulp/content})
.with_ssl_content(%r{ProxyPass /pulpcore_registry/v2/ http://127\.0\.0\.1:24816/v2/})
is_expected.to contain_foreman__config__apache__fragment('pulpcore-http')
.with_content(%r{ProxyPass /pulp/content http://127\.0\.0\.1:24816/pulp/content})
is_expected.to contain_foreman__config__apache__fragment('pulpcore-isos')
Expand Down
6 changes: 6 additions & 0 deletions templates/pulpcore-docker-apache.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Location /pulpcore_registry/v2/>
SSLRequire %{SSL_CLIENT_S_DN_CN} eq "admin"
</Location>

ProxyPass /pulpcore_registry/v2/ http://127.0.0.1:24816/v2/
ProxyPassReverse /pulpcore_registry/v2 http://127.0.0.1:24816/v2

0 comments on commit 9e81dc3

Please sign in to comment.