Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #28695: Add Pulp 2 migration settings #313

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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