Skip to content

Commit

Permalink
Refs #28695: Add Pulp 2 migration settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Jan 17, 2020
1 parent 37104d7 commit a31a4ec
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
8 changes: 8 additions & 0 deletions manifests/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@
# @param proxy_password
# Proxy password for authentication
#
# @param use_pulp_2_for_file
# Configure Katello to use Pulp 2 for file content
#
# @param use_pulp_2_for_docker
# Configure Katello to use Pulp 2 for docker content
#
class katello::application (
Integer[0] $rest_client_timeout = 3600,
Optional[Enum['SSLv23', 'TLSv1', '']] $cdn_ssl_version = undef,
Optional[Stdlib::HTTPUrl] $proxy_host = undef,
Optional[Stdlib::Port] $proxy_port = undef,
Optional[String] $proxy_username = undef,
Optional[String] $proxy_password = undef,
Boolean $use_pulp_2_for_file = false,
Boolean $use_pulp_2_for_docker = false,
) {
include foreman
include certs
Expand Down
21 changes: 15 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
#
# $pulp_manage_db:: Boolean to install and configure the mongodb.
#
# $use_pulp_2_for_file:: Configures Katello to use Pulp 2 for file content
#
# $use_pulp_2_for_docker:: Configures Katello to use Pulp 2 for docker content
#
class katello (
Optional[String] $candlepin_oauth_key = undef,
Optional[String] $candlepin_oauth_secret = undef,
Expand All @@ -125,6 +129,9 @@
Boolean $enable_docker = true,
Boolean $enable_deb = true,

Boolean $use_pulp_2_for_file = false,
Boolean $use_pulp_2_for_docker = false,

Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export',

String $candlepin_db_host = 'localhost',
Expand Down Expand Up @@ -207,12 +214,14 @@
}

class { 'katello::application':
rest_client_timeout => $rest_client_timeout,
cdn_ssl_version => $cdn_ssl_version,
proxy_host => $proxy_url,
proxy_port => $proxy_port,
proxy_username => $proxy_username,
proxy_password => $proxy_password,
rest_client_timeout => $rest_client_timeout,
cdn_ssl_version => $cdn_ssl_version,
proxy_host => $proxy_url,
proxy_port => $proxy_port,
proxy_username => $proxy_username,
proxy_password => $proxy_password,
use_pulp_2_for_file => $use_pulp_2_for_file,
use_pulp_2_for_docker => $use_pulp_2_for_docker,
}

}
9 changes: 9 additions & 0 deletions spec/classes/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class { 'katello::params':
' :pulp:',
' :url: https://foo.example.com/pulp/api/v2/',
' :ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt',
' :use_pulp_2_for_content_type:',
' :docker: false',
' :file: false',
' :qpid:',
' :url: amqp:ssl:localhost:5671',
' :subscriptions_queue_address: katello_event_queue',
Expand Down Expand Up @@ -124,6 +127,9 @@ class { 'katello::params':
' :pulp:',
' :url: https://foo.example.com/pulp/api/v2/',
' :ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt',
' :use_pulp_2_for_content_type:',
' :docker: false',
' :file: false',
' :qpid:',
' :url: amqp:ssl:localhost:5671',
' :subscriptions_queue_address: katello_event_queue',
Expand Down Expand Up @@ -170,6 +176,9 @@ class {'katello::globals':
' :pulp:',
' :url: https://foo.example.com/pulp/api/v2/',
' :ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt',
' :use_pulp_2_for_content_type:',
' :docker: false',
' :file: false',
' :qpid:',
' :url: amqp:ssl:localhost:5671',
' :subscriptions_queue_address: katello_event_queue',
Expand Down
4 changes: 4 additions & 0 deletions templates/katello.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
:url: <%= @pulp_url %>
:ca_cert_file: <%= @pulp_ca_cert %>

:use_pulp_2_for_content_type:
:docker: <%= @use_pulp_2_for_docker %>
:file: <%= @use_pulp_2_for_file %>

:qpid:
:url: <%= @qpid_url %>
:subscriptions_queue_address: <%= @candlepin_event_queue %>
Expand Down

0 comments on commit a31a4ec

Please sign in to comment.