Skip to content

Commit

Permalink
Add support for running a Pulpcore mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl authored and ehelms committed Oct 13, 2020
1 parent 4f8628e commit 5718a34
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
30 changes: 23 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
$foreman_url = $foreman_proxy::foreman_base_url
$reverse_proxy_real = $pulp or $reverse_proxy

# TODO: doesn't allow deploying a Pulp non-mirror without Foreman
$shared_with_foreman_vhost = ($pulpcore and !$pulpcore_mirror) or $pulp_master

$rhsm_port = $reverse_proxy_real ? {
true => $reverse_proxy_port,
false => 443
Expand Down Expand Up @@ -331,13 +334,26 @@
}
}

if $pulpcore and !$pulpcore_mirror {
include foreman::config::apache
$servername = $foreman::config::apache::servername
$priority = $foreman::config::apache::priority
$apache_http_vhost = 'foreman'
$apache_https_vhost = 'foreman-ssl'
Class['foreman::config::apache'] -> Class['pulpcore::apache']
if $pulpcore {
if $shared_with_foreman_vhost {
include foreman::config::apache
$servername = $foreman::config::apache::servername
$priority = $foreman::config::apache::priority
$apache_http_vhost = 'foreman'
$apache_https_vhost = 'foreman-ssl'
Class['foreman::config::apache'] -> Class['pulpcore::apache']
} elsif $pulp and $pulp::manage_httpd {
$servername = $facts['networking']['fqdn']
$priority = '05'
$apache_http_vhost = 'pulp-http'
$apache_https_vhost = 'pulp-https'
Class['pulp::apache'] -> Class['pulpcore::apache']
} else {
$servername = undef
$priority = undef
$apache_http_vhost = undef
$apache_https_vhost = undef
}

class { 'pulpcore':
apache_http_vhost => $apache_http_vhost,
Expand Down
2 changes: 1 addition & 1 deletion manifests/pub_dir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

ensure_packages('katello-client-bootstrap')

if ($foreman_proxy_content::pulpcore or $foreman_proxy_content::pulp_master) {
if $foreman_proxy_content::shared_with_foreman_vhost {
include foreman::config::apache

foreman::config::apache::fragment { 'pub_dir':
Expand Down

0 comments on commit 5718a34

Please sign in to comment.