From e3e37b4c4bf5856a409ed1d134676345be20d855 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Thu, 9 Jul 2020 19:11:33 -0400 Subject: [PATCH] Fixes #30360: Drop Pulp 2 and Qpid --- manifests/application.pp | 21 +--- manifests/globals.pp | 18 +-- manifests/init.pp | 115 +----------------- manifests/params.pp | 7 -- manifests/pulp.pp | 183 ----------------------------- manifests/qpid.pp | 28 ----- spec/classes/application_spec.rb | 80 +------------ spec/classes/init_spec.rb | 2 - spec/classes/pulp_spec.rb | 99 ---------------- spec/classes/qpid_spec.rb | 30 ----- templates/katello.yaml.erb | 11 +- templates/pulp-apache-ssl.conf.erb | 23 ---- templates/pulp-apache.conf.erb | 20 ---- 13 files changed, 9 insertions(+), 628 deletions(-) delete mode 100644 manifests/pulp.pp delete mode 100644 manifests/qpid.pp delete mode 100644 spec/classes/pulp_spec.rb delete mode 100644 spec/classes/qpid_spec.rb delete mode 100644 templates/pulp-apache-ssl.conf.erb delete mode 100644 templates/pulp-apache.conf.erb diff --git a/manifests/application.pp b/manifests/application.pp index 255a426e..f4c11526 100644 --- a/manifests/application.pp +++ b/manifests/application.pp @@ -20,7 +20,6 @@ Boolean $use_pulp_2_for_file = false, Boolean $use_pulp_2_for_docker = false, Boolean $use_pulp_2_for_yum = false, - Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export', ) { include foreman include certs @@ -47,13 +46,9 @@ Class['certs', 'certs::ca', 'certs::apache'] ~> Class['apache::service'] # Used in katello.yaml.erb - $enable_ostree = $katello::params::enable_ostree $enable_yum = $katello::params::enable_yum $enable_file = $katello::params::enable_file - $enable_puppet = $katello::params::enable_puppet - $enable_docker = $katello::params::enable_docker - $enable_deb = $katello::params::enable_deb - $pulp_url = $katello::params::pulp_url + $enable_container = $katello::params::enable_container $pulp_ca_cert = $certs::katello_server_ca_cert # TODO: certs::apache::... $candlepin_url = $katello::params::candlepin_url $candlepin_oauth_key = $katello::params::candlepin_oauth_key @@ -61,8 +56,6 @@ $candlepin_ca_cert = $certs::ca_cert $candlepin_events_ssl_cert = $certs::candlepin::client_cert $candlepin_events_ssl_key = $certs::candlepin::client_key - $crane_url = $katello::params::crane_url - $crane_ca_cert = $certs::katello_server_ca_cert $postgresql_evr_package = $katello::params::postgresql_evr_package $manage_db = $foreman::db_manage @@ -89,16 +82,4 @@ queues => ['hosts_queue'], } } - - Anchor <| title == 'katello::pulp' |> -> - exec { "mkdir -p ${repo_export_dir}": - path => ['/bin', '/usr/bin'], - creates => $repo_export_dir, - } -> - file { $repo_export_dir: - ensure => directory, - owner => $foreman::user, - group => $foreman::group, - mode => '0755', - } } diff --git a/manifests/globals.pp b/manifests/globals.pp index ce74e5eb..3a834927 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -1,30 +1,18 @@ # @summary Katello Default Params # -# @param enable_ostree -# Enable ostree content plugin, this requires an ostree install -# # @param enable_yum # Enable rpm content plugin, including syncing of yum content # # @param enable_file # Enable generic file content management # -# @param enable_puppet -# Enable puppet content plugin -# -# @param enable_docker -# Enable docker content plugin -# -# @param enable_deb -# Enable debian content plugin +# @param enable_container +# Enable container content plugin # class katello::globals( - Boolean $enable_ostree = false, Boolean $enable_yum = true, Boolean $enable_file = true, - Boolean $enable_puppet = true, - Boolean $enable_docker = true, - Boolean $enable_deb = true, + Boolean $enable_container = true, ) { # OAUTH settings $candlepin_oauth_key = 'katello' diff --git a/manifests/init.pp b/manifests/init.pp index 4af93a51..d7a04e58 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,21 +4,11 @@ # # === Parameters: # -# $enable_ostree:: Enable ostree content plugin, this requires an ostree install -# # $enable_yum:: Enable rpm content plugin, including syncing of yum content # # $enable_file:: Enable generic file content management # -# $enable_puppet:: Enable puppet content plugin -# -# $enable_docker:: Enable docker content plugin -# -# $enable_deb:: Enable debian content plugin -# -# $pulp_max_speed:: The maximum download speed per second for a Pulp task, such as a sync. (e.g. "4 Kb" (Uses SI KB), 4MB, or 1GB" ) -# -# $repo_export_dir:: Directory to create for repository exports +# $enable_container:: Enable container content plugin # # === Advanced parameters: # @@ -28,12 +18,6 @@ # # $num_pulp_workers:: Number of pulp workers to use # -# $qpid_wcache_page_size:: The size (in KB) of the pages in the write page cache -# -# $qpid_interface:: The interface qpidd listens to. -# -# $qpid_hostname:: Hostname used to connect to qpidd. -# # $candlepin_db_host:: Host with Candlepin DB # # $candlepin_db_port:: Port accepting connections to Candlepin DB @@ -53,44 +37,6 @@ # # $rest_client_timeout:: Timeout for Katello rest API # -# $pulp_worker_timeout:: The amount of time (in seconds) before considering a worker as missing. If Pulp's -# mongo database has slow I/O, then setting a higher number may resolve issues where workers are -# going missing incorrectly. -# -# $pulp_db_name:: Name of the database to use -# -# $pulp_db_seeds:: Comma-separated list of hostname:port of database replica seed hosts -# -# $pulp_db_username:: The user name to use for authenticating to the MongoDB server -# -# $pulp_db_password:: The password to use for authenticating to the MongoDB server -# -# $pulp_db_replica_set:: The name of replica set configured in MongoDB, if one is in use -# -# $pulp_db_ssl:: Whether to connect to the database server using SSL. -# -# $pulp_db_ssl_keyfile:: A path to the private keyfile used to identify the local connection against mongod. If -# included with the certfile then only the ssl_certfile is needed. -# -# $pulp_db_ssl_certfile:: The certificate file used to identify the local connection against mongod. -# -# $pulp_db_verify_ssl:: Specifies whether a certificate is required from the other side of the connection, and -# whether it will be validated if provided. If it is true, then the ca_certs parameter -# must point to a file of CA certificates used to validate the connection. -# -# $pulp_db_ca_path:: The ca_certs file contains a set of concatenated "certification authority" certificates, -# which are used to validate certificates passed from the other end of the connection. -# -# $pulp_db_unsafe_autoretry:: If true, retry commands to the database if there is a connection error. -# Warning: if set to true, this setting can result in duplicate records. -# -# $pulp_db_write_concern:: Write concern of 'majority' or 'all'. When 'all' is specified, 'w' is set to number of -# seeds specified. For version of MongoDB < 2.6, replica_set must also be specified. -# Please note that 'all' will cause Pulp to halt if any of the replica set members is not -# available. 'majority' is used by default -# -# $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 @@ -102,26 +48,16 @@ Optional[String] $candlepin_oauth_secret = undef, Integer[0] $rest_client_timeout = 3600, - Integer[0, 1000] $qpid_wcache_page_size = 4, - String $qpid_interface = 'lo', - Stdlib::Host $qpid_hostname = 'localhost', Optional[Integer[1]] $num_pulp_workers = undef, - Integer[0] $pulp_worker_timeout = 60, - Optional[String] $pulp_max_speed = undef, - Boolean $enable_ostree = false, Boolean $enable_yum = true, Boolean $enable_file = true, - Boolean $enable_puppet = true, - Boolean $enable_docker = true, - Boolean $enable_deb = true, + Boolean $enable_container = true, Boolean $use_pulp_2_for_file = false, Boolean $use_pulp_2_for_docker = false, Boolean $use_pulp_2_for_yum = false, - Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export', - String $candlepin_db_host = 'localhost', Optional[Stdlib::Port] $candlepin_db_port = undef, String $candlepin_db_name = 'candlepin', @@ -130,20 +66,6 @@ Boolean $candlepin_db_ssl = false, Boolean $candlepin_db_ssl_verify = true, Boolean $candlepin_manage_db = true, - - String $pulp_db_name = 'pulp_database', - String $pulp_db_seeds = 'localhost:27017', - Optional[String] $pulp_db_username = undef, - Optional[String] $pulp_db_password = undef, - Optional[String] $pulp_db_replica_set = undef, - Boolean $pulp_db_ssl = false, - Optional[Stdlib::Absolutepath] $pulp_db_ssl_keyfile = undef, - Optional[Stdlib::Absolutepath] $pulp_db_ssl_certfile = undef, - Boolean $pulp_db_verify_ssl = true, - Stdlib::Absolutepath $pulp_db_ca_path = '/etc/pki/tls/certs/ca-bundle.crt', - Boolean $pulp_db_unsafe_autoretry = false, - Optional[Enum['majority', 'all']] $pulp_db_write_concern = undef, - Boolean $pulp_manage_db = true, ) { package { 'katello': @@ -151,18 +73,14 @@ } class { 'katello::globals': - enable_ostree => $enable_ostree, enable_yum => $enable_yum, enable_file => $enable_file, - enable_puppet => $enable_puppet, - enable_docker => $enable_docker, - enable_deb => $enable_deb, + enable_container => $enable_container, } class { 'katello::params': candlepin_oauth_key => $candlepin_oauth_key, candlepin_oauth_secret => $candlepin_oauth_secret, - qpid_hostname => $qpid_hostname, } class { 'katello::candlepin': @@ -181,32 +99,5 @@ use_pulp_2_for_file => $use_pulp_2_for_file, use_pulp_2_for_docker => $use_pulp_2_for_docker, use_pulp_2_for_yum => $use_pulp_2_for_yum, - repo_export_dir => $repo_export_dir, - } - - if $facts['os']['release']['major'] == '7' { - class { 'katello::qpid': - interface => $qpid_interface, - wcache_page_size => $qpid_wcache_page_size, - } - - class { 'katello::pulp': - yum_max_speed => $pulp_max_speed, - num_workers => $num_pulp_workers, - worker_timeout => $pulp_worker_timeout, - mongodb_name => $pulp_db_name, - mongodb_seeds => $pulp_db_seeds, - mongodb_username => $pulp_db_username, - mongodb_password => $pulp_db_password, - mongodb_replica_set => $pulp_db_replica_set, - mongodb_ssl => $pulp_db_ssl, - mongodb_ssl_keyfile => $pulp_db_ssl_keyfile, - mongodb_ssl_certfile => $pulp_db_ssl_certfile, - mongodb_verify_ssl => $pulp_db_verify_ssl, - mongodb_ca_path => $pulp_db_ca_path, - mongodb_unsafe_autoretry => $pulp_db_unsafe_autoretry, - mongodb_write_concern => $pulp_db_write_concern, - manage_mongodb => $pulp_manage_db, - } } } diff --git a/manifests/params.pp b/manifests/params.pp index 607d66a5..482b6942 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -14,10 +14,6 @@ # The URL to connect to Candlepin # @param pulp_url # The URL to connect to Pulp -# @param crane_url -# The URL to connect to Crane -# @param qpid_hostname -# QPID's hostname to connect # @param candlepin_oauth_key # The oauth key for Candlepin # @param candlepin_oauth_secret @@ -25,9 +21,6 @@ # @param postgresql_evr_package # The contextual package name for the PostgreSQL EVR extension class katello::params ( - Stdlib::HTTPSUrl $pulp_url = "https://${facts['networking']['fqdn']}/pulp/api/v2/", - Stdlib::HTTPSUrl $crane_url = "https://${facts['networking']['fqdn']}:5000", - Stdlib::Host $qpid_hostname = 'localhost', String[1] $candlepin_oauth_key = $katello::globals::candlepin_oauth_key, String[1] $candlepin_oauth_secret = $katello::globals::candlepin_oauth_secret, Stdlib::Host $candlepin_host = 'localhost', diff --git a/manifests/pulp.pp b/manifests/pulp.pp deleted file mode 100644 index cb47587b..00000000 --- a/manifests/pulp.pp +++ /dev/null @@ -1,183 +0,0 @@ -# Katello configuration for pulp -# -# @param mongodb_name -# Name of the database to use -# -# @param mongodb_seeds -# Comma-separated list of hostname:port of database replica seed hosts -# -# @param mongodb_username -# The user name to use for authenticating to the MongoDB server -# -# @param mongodb_password -# The password to use for authenticating to the MongoDB server -# -# @param mongodb_replica_set -# The name of replica set configured in MongoDB, if one is in use -# -# @param mongodb_ssl -# Whether to connect to the database server using SSL. -# -# @param mongodb_ssl_keyfile -# A path to the private keyfile used to identify the local connection against -# mongod. If included with the certfile then only the ssl_certfile is needed. -# -# @param mongodb_ssl_certfile -# The certificate file used to identify the local connection against mongod. -# -# @param mongodb_verify_ssl -# Specifies whether a certificate is required from the other side of the -# connection, and whether it will be validated if provided. If it is true, -# then the ca_certs parameter must point to a file of CA certificates used to -# validate the connection. -# -# @param mongodb_ca_path -# The ca_certs file contains a set of concatenated "certification authority" -# certificates, which are used to validate certificates passed from the other -# end of the connection. -# -# @param mongodb_unsafe_autoretry -# If true, retry commands to the database if there is a connection error. -# Warning: if set to true, this setting can result in duplicate records. -# -# @param mongodb_write_concern -# Write concern of 'majority' or 'all'. When 'all' is specified, 'w' is set -# to number of seeds specified. Please note that 'all' will cause Pulp to -# halt if any of the replica set members is not available. 'majority' is used -# by default -# -# @param manage_mongodb -# Boolean to install and configure the mongodb. -# -# @param num_workers -# The number of Pulp workers to use -# -# @param worker_timeout -# The amount of time (in seconds) before considering a worker as missing. If -# Pulp's mongo database has slow I/O, then setting a higher number may -# resolve issues where workers are going missing incorrectly. -# -# @param yum_max_speed -# The maximum download speed per second for a Pulp task, such as a sync. (e.g. "4 Kb" (Uses SI KB), 4MB, or 1GB" ) -# -# @param pub_dir_options -# The Apache options to use on the `/pub` resource -# -# @param manage_vhost_standalone -# Boolean to manage the Pulp vhost standalone. Otherwise the vhost is managed as part of Foreman -# -# @param https_cert -# The Apache public certificate for ssl -# -# @param https_key -# The Apache private key for ssl -# -# @param https_ca_cert -# The Apache CA certificate for client authentication -# -class katello::pulp ( - Optional[String] $yum_max_speed = undef, - Optional[Integer[1]] $num_workers = undef, - Integer[0] $worker_timeout = 60, - String $mongodb_name = 'pulp_database', - String $mongodb_seeds = 'localhost:27017', - Optional[String] $mongodb_username = undef, - Optional[String] $mongodb_password = undef, - Optional[String] $mongodb_replica_set = undef, - Boolean $mongodb_ssl = false, - Optional[Stdlib::Absolutepath] $mongodb_ssl_keyfile = undef, - Optional[Stdlib::Absolutepath] $mongodb_ssl_certfile = undef, - Boolean $mongodb_verify_ssl = true, - Stdlib::Absolutepath $mongodb_ca_path = '/etc/pki/tls/certs/ca-bundle.crt', - Boolean $mongodb_unsafe_autoretry = false, - Optional[Enum['majority', 'all']] $mongodb_write_concern = undef, - Boolean $manage_mongodb = true, - String $pub_dir_options = '+FollowSymLinks +Indexes', - Boolean $manage_vhost_standalone = false, - Optional[Stdlib::Absolutepath] $https_cert = undef, - Optional[Stdlib::Absolutepath] $https_key = undef, - Optional[Stdlib::Absolutepath] $https_ca_cert = undef, -) { - include katello::params - include certs - - class { 'certs::qpid_client': - require => Class['pulp::install'], - notify => Class['pulp::service'], - } - - include apache - - if $manage_vhost_standalone { - $server_name = undef - - concat::fragment { 'httpd_pub': - target => '05-pulp-http.conf', - content => template('katello/pulp-apache.conf.erb'), - } - - pulp::apache::fragment { 'httpd_ssl_pub': - ssl_content => template('katello/pulp-apache-ssl.conf.erb'), - } - } else { - # Deploy as a part of the foreman vhost - include foreman::config::apache - $server_name = $foreman::config::apache::servername - foreman::config::apache::fragment { 'pulp': - content => template('katello/pulp-apache.conf.erb'), - ssl_content => template('katello/pulp-apache-ssl.conf.erb'), - } - } - - Anchor <| title == 'katello::repo' |> -> # lint:ignore:anchor_resource - class { 'pulp': - server_name => $server_name, - messaging_url => "ssl://${katello::params::qpid_hostname}:5671", - messaging_ca_cert => $certs::qpid_client::qpid_client_ca_cert, - messaging_client_cert => $certs::qpid_client::qpid_client_cert, - messaging_transport => 'qpid', - messaging_auth_enabled => false, - broker_url => "qpid://${katello::params::qpid_hostname}:5671", - broker_use_ssl => true, - yum_max_speed => $yum_max_speed, - manage_broker => false, - manage_httpd => $manage_vhost_standalone, - https_cert => $https_cert, - https_key => $https_key, - https_ca_cert => $https_ca_cert, - manage_plugins_httpd => true, - manage_squid => true, - enable_rpm => $katello::params::enable_yum, - enable_iso => $katello::params::enable_file, - enable_deb => $katello::params::enable_deb, - enable_puppet => $katello::params::enable_puppet, - enable_docker => $katello::params::enable_docker, - enable_ostree => $katello::params::enable_ostree, - num_workers => $num_workers, - enable_parent_node => false, - repo_auth => true, - puppet_wsgi_processes => 1, - enable_katello => true, - subscribe => Class['certs'], - worker_timeout => $worker_timeout, - db_name => $mongodb_name, - db_seeds => $mongodb_seeds, - db_username => $mongodb_username, - db_password => $mongodb_password, - db_replica_set => $mongodb_replica_set, - db_ssl => $mongodb_ssl, - db_ssl_keyfile => $mongodb_ssl_keyfile, - db_ssl_certfile => $mongodb_ssl_certfile, - db_verify_ssl => $mongodb_verify_ssl, - db_ca_path => $mongodb_ca_path, - db_unsafe_autoretry => $mongodb_unsafe_autoretry, - db_write_concern => $mongodb_write_concern, - manage_db => $manage_mongodb, - } - - contain pulp - - anchor { 'katello::pulp': # lint:ignore:anchor_resource - require => Class['pulp'], - } -} diff --git a/manifests/qpid.pp b/manifests/qpid.pp deleted file mode 100644 index 319869fb..00000000 --- a/manifests/qpid.pp +++ /dev/null @@ -1,28 +0,0 @@ -# @summary Katello qpid Config -# -# @param interface -# The interface to listen on -# -# @param wcache_page_size -# The size (in KB) of the pages in the write page cache -# -class katello::qpid ( - String $interface = 'lo', - Integer[0, 5000] $wcache_page_size = 4, -) { - include certs - include certs::qpid - - class { 'qpid': - ssl => true, - ssl_cert_db => $certs::qpid::nss_db_dir, - ssl_cert_password_file => $certs::qpid::nss_db_password_file, - ssl_cert_name => $certs::qpid::nss_cert_name, - acl_content => file('katello/qpid_acls.acl'), - interface => $interface, - wcache_page_size => $wcache_page_size, - subscribe => Class['certs', 'certs::qpid'], - } - - contain qpid -} diff --git a/spec/classes/application_spec.rb b/spec/classes/application_spec.rb index 8986b411..a8693c1c 100644 --- a/spec/classes/application_spec.rb +++ b/spec/classes/application_spec.rb @@ -65,12 +65,9 @@ class { 'katello::params': ':katello:', ' :rest_client_timeout: 3600', ' :content_types:', - ' :yum: true', ' :file: true', - ' :deb: true', - ' :puppet: true', + ' :yum: true', ' :docker: true', - ' :ostree: false', ' :candlepin:', ' :url: https://localhost:8443/candlepin', ' :oauth_key: "katello"', @@ -81,27 +78,14 @@ class { 'katello::params': ' :ssl_key_file: /etc/pki/katello/private/java-client.key', ' :ssl_ca_file: /etc/pki/katello/certs/katello-default-ca.crt', ' :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', ' :yum: false', ' :katello_applicability: true', - ' :container_image_registry:', - ' :crane_url: https://foo.example.com:5000', - ' :crane_ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt' ]) end - - it do - is_expected.to create_file('/var/lib/pulp/katello-export') - .with_ensure('directory') - .with_owner('foreman') - .with_group('foreman') - .with_mode('0755') - .that_requires('Exec[mkdir -p /var/lib/pulp/katello-export]') - end end context 'with repo present' do @@ -130,59 +114,9 @@ class { 'katello::params': ':katello:', ' :rest_client_timeout: 4000', ' :content_types:', - ' :yum: true', ' :file: true', - ' :deb: true', - ' :puppet: true', - ' :docker: true', - ' :ostree: false', - ' :candlepin:', - ' :url: https://localhost:8443/candlepin', - ' :oauth_key: "katello"', - ' :oauth_secret: "candlepin-secret"', - ' :ca_cert_file: /etc/pki/katello/certs/katello-default-ca.crt', - ' :candlepin_events:', - ' :ssl_cert_file: /etc/pki/katello/certs/java-client.crt', - ' :ssl_key_file: /etc/pki/katello/private/java-client.key', - ' :ssl_ca_file: /etc/pki/katello/certs/katello-default-ca.crt', - ' :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', - ' :yum: false', - ' :katello_applicability: true', - ' :container_image_registry:', - ' :crane_url: https://foo.example.com:5000', - ' :crane_ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt', - ]) - end - end - - context 'with inherited parameters' do - let :pre_condition do - <<-EOS - class {'katello::globals': - enable_ostree => true, - } - #{super()} - EOS - end - - it { is_expected.to compile.with_all_deps } - - it 'should generate correct katello.yaml' do - verify_exact_contents(catalogue, '/etc/foreman/plugins/katello.yaml', [ - ':katello:', - ' :rest_client_timeout: 3600', - ' :content_types:', ' :yum: true', - ' :file: true', - ' :deb: true', - ' :puppet: true', ' :docker: true', - ' :ostree: true', ' :candlepin:', ' :url: https://localhost:8443/candlepin', ' :oauth_key: "katello"', @@ -193,16 +127,12 @@ class {'katello::globals': ' :ssl_key_file: /etc/pki/katello/private/java-client.key', ' :ssl_ca_file: /etc/pki/katello/certs/katello-default-ca.crt', ' :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', ' :yum: false', ' :katello_applicability: true', - ' :container_image_registry:', - ' :crane_url: https://foo.example.com:5000', - ' :crane_ca_cert_file: /etc/pki/katello/certs/katello-server-ca.crt' ]) end end @@ -218,14 +148,6 @@ class {'katello::globals': it { is_expected.to create_package('rubygem-katello').that_requires('Anchor[katello::candlepin]') } end end - - context 'with pulp' do - # post condition because things are compile order dependent - let(:post_condition) { 'include katello::pulp' } - - it { is_expected.to compile.with_all_deps } - it { is_expected.to create_exec('mkdir -p /var/lib/pulp/katello-export').that_requires(['Anchor[katello::pulp]']) } - end end end end diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index f0a8465e..60b25e3b 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -10,8 +10,6 @@ it { is_expected.to contain_class('katello::application') } if facts[:operatingsystemmajrelease] == '7' - it { is_expected.to contain_class('katello::pulp') } - it { is_expected.to contain_class('katello::qpid') } it { is_expected.to contain_package('tfm-rubygem-katello').that_requires('Class[candlepin]') } else it { is_expected.to contain_package('rubygem-katello').that_requires('Class[candlepin]') } diff --git a/spec/classes/pulp_spec.rb b/spec/classes/pulp_spec.rb deleted file mode 100644 index b4ec21d2..00000000 --- a/spec/classes/pulp_spec.rb +++ /dev/null @@ -1,99 +0,0 @@ -require 'spec_helper' - -describe 'katello::pulp' do - on_supported_os.each do |os, facts| - context "on #{os}" do - let(:facts) { facts.merge(processorcount: 1) } - - if facts[:operatingsystemmajrelease] == '7' - context 'with default parameters' do - context 'minimal set' do - it { is_expected.to compile.with_all_deps } - it { is_expected.to contain_class('certs') } - # pulp-server creates the pulp group which qpid_client uses - it { is_expected.to contain_class('certs::qpid_client').that_requires('Package[pulp-server]').that_notifies('Service[pulp_workers]') } - - it do - is_expected.to create_class('pulp') - .with_messaging_url('ssl://localhost:5671') - .with_messaging_ca_cert('/etc/pki/pulp/qpid/ca.crt') - .with_messaging_client_cert('/etc/pki/pulp/qpid/client.crt') - .with_messaging_transport('qpid') - .with_messaging_auth_enabled(false) - .with_broker_url('qpid://localhost:5671') - .with_broker_use_ssl(true) - .with_yum_max_speed(nil) - .with_manage_broker(false) - .with_manage_httpd(false) - .with_manage_plugins_httpd(true) - .with_manage_squid(true) - .with_enable_rpm(true) - .with_enable_iso(true) - .with_enable_puppet(true) - .with_enable_docker(true) - .with_enable_ostree(false) - .with_num_workers(1) - .with_enable_parent_node(false) - .with_repo_auth(true) - .with_puppet_wsgi_processes(1) - .with_enable_katello(true) - .with_manage_db(true) - .with_db_name('pulp_database') - .with_db_seeds('localhost:27017') - .with_db_ssl(false) - end - - it do - is_expected.to create_foreman__config__apache__fragment('pulp') - .with_content(%r{^$}) - .with_ssl_content(%r{^$}) - end - - it { is_expected.to create_anchor('katello::pulp').that_requires('Class[pulp]') } - - context 'with repo present' do - let(:pre_condition) { 'include katello::repo' } - - it 'is expected to set up requirements' do - is_expected.to compile.with_all_deps - is_expected.to contain_anchor('katello::repo') - is_expected.to create_class('pulp').that_requires(['Anchor[katello::repo]', 'Yumrepo[katello]']) - end - end - end - - context 'with database parameters' do - let :params do - { - mongodb_name: 'pulp_db', - mongodb_username: 'pulp_user', - mongodb_password: 'pulp_pw', - mongodb_seeds: '192.168.1.1:27017', - } - end - - it do - is_expected.to compile.with_all_deps - is_expected.to create_class('pulp') - .with_db_name('pulp_db') - .with_db_username('pulp_user') - .with_db_password('pulp_pw') - .with_db_seeds('192.168.1.1:27017') - end - - context 'with manage_httpd => true' do - let :params do - super().merge({ 'manage_vhost_standalone' => true, }) - end - - it do - is_expected.to create_class('pulp') - .with_manage_httpd(true) - end - end - end - end - end - end - end -end diff --git a/spec/classes/qpid_spec.rb b/spec/classes/qpid_spec.rb deleted file mode 100644 index 01cf52f0..00000000 --- a/spec/classes/qpid_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe 'katello::qpid' do - on_supported_os.each do |os, facts| - context "on #{os}" do - let(:facts) { facts } - - if facts[:operatingsystemmajrelease] == '7' - context 'with default parameters' do - it { is_expected.to compile.with_all_deps } - it { is_expected.to contain_class('certs::qpid').that_notifies(['Service[qpidd]', 'Class[qpid]']) } - it { is_expected.to create_class('qpid').with_wcache_page_size(4).with_interface('lo') } - end - - context 'with overridden parameters' do - let :params do - { - wcache_page_size: 8, - } - end - - it 'should pass the variable' do - is_expected.to compile.with_all_deps - is_expected.to create_class('qpid').with_wcache_page_size(8) - end - end - end - end - end -end diff --git a/templates/katello.yaml.erb b/templates/katello.yaml.erb index 1a3b77f7..d520e0de 100644 --- a/templates/katello.yaml.erb +++ b/templates/katello.yaml.erb @@ -7,10 +7,7 @@ :content_types: :file: <%= @enable_file %> :yum: <%= @enable_yum %> - :deb: <%= @enable_deb %> - :puppet: <%= @enable_puppet %> - :docker: <%= @enable_docker %> - :ostree: <%= @enable_ostree %> + :docker: <%= @enable_container %> :candlepin: :url: <%= @candlepin_url %> @@ -24,7 +21,6 @@ :ssl_ca_file: <%= @candlepin_ca_cert %> :pulp: - :url: <%= @pulp_url %> :ca_cert_file: <%= @pulp_ca_cert %> :use_pulp_2_for_content_type: @@ -33,8 +29,3 @@ :yum: <%= @use_pulp_2_for_yum %> :katello_applicability: <%= !@use_pulp_2_for_yum %> - - # Internal configuration for communication from server to pulp crane service. - :container_image_registry: - :crane_url: <%= @crane_url %> - :crane_ca_cert_file: <%= @crane_ca_cert %> diff --git a/templates/pulp-apache-ssl.conf.erb b/templates/pulp-apache-ssl.conf.erb deleted file mode 100644 index 11e79255..00000000 --- a/templates/pulp-apache-ssl.conf.erb +++ /dev/null @@ -1,23 +0,0 @@ -### File managed with puppet ### - - - SSLUsername SSL_CLIENT_S_DN_CN - - -Alias /pub /var/www/html/pub - - - PassengerEnabled off - - Options <%= @pub_dir_options %> - - -#support cert auth for registry url - - RequestHeader set SSL_CLIENT_I_DN "%{SSL_CLIENT_I_DN}s" - RequestHeader set SSL_CLIENT_VERIFY "%{SSL_CLIENT_VERIFY}s" - RequestHeader set SSL_SERVER_S_DN_OU "%{SSL_SERVER_S_DN_OU}s" - RequestHeader set SSL_CLIENT_S_DN "%{SSL_CLIENT_S_DN}s" - RequestHeader set SSL_CLIENT_S_DN_X509 "%{SSL_CLIENT_S_DN_X509}s" - - diff --git a/templates/pulp-apache.conf.erb b/templates/pulp-apache.conf.erb deleted file mode 100644 index dcff8de1..00000000 --- a/templates/pulp-apache.conf.erb +++ /dev/null @@ -1,20 +0,0 @@ -### File managed with puppet ### - -Alias /pub /var/www/html/pub - - - - PassengerEnabled off - - Options <%= @pub_dir_options %> - Require all granted - - -Include <%= scope['apache::confd_dir'] %>/pulp-vhosts80/*.conf - - - - PassengerEnabled off - - Options +FollowSymLinks +Indexes -