From e61bcfc0a46a8846505e6f37dcba78a263e34732 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Thu, 16 Jan 2020 14:04:41 -0500 Subject: [PATCH] Refs #28695: Add Pulp 2 migration settings --- manifests/application.pp | 8 ++++++++ manifests/init.pp | 21 +++++++++++++++------ spec/classes/application_spec.rb | 9 +++++++++ templates/katello.yaml.erb | 4 ++++ 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/manifests/application.pp b/manifests/application.pp index d44110a5..f3942598 100644 --- a/manifests/application.pp +++ b/manifests/application.pp @@ -18,6 +18,12 @@ # @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, @@ -25,6 +31,8 @@ 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 diff --git a/manifests/init.pp b/manifests/init.pp index b85e81f1..ecdec143 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, @@ -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', @@ -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, } } diff --git a/spec/classes/application_spec.rb b/spec/classes/application_spec.rb index 54d02775..a52199d2 100644 --- a/spec/classes/application_spec.rb +++ b/spec/classes/application_spec.rb @@ -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', @@ -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', @@ -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', diff --git a/templates/katello.yaml.erb b/templates/katello.yaml.erb index 8d71c662..061b3b93 100644 --- a/templates/katello.yaml.erb +++ b/templates/katello.yaml.erb @@ -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 %>