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

Fixes #30360: Drop Pulp 2 and Qpid #356

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 1 addition & 20 deletions manifests/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Comment on lines 20 to 22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be dropped as well if there's no Pulp 2.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree they ought to be dropped, just waiting for confirmation from @jlsherrill that they have been dropped code-wise inside Katello.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep +1 safe to drop

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also drop the docs for this one

) {
include foreman
include certs
Expand All @@ -47,22 +46,16 @@
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
$candlepin_oauth_secret = $katello::params::candlepin_oauth_secret
$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

Expand All @@ -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',
}
}
18 changes: 3 additions & 15 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
115 changes: 3 additions & 112 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -130,39 +66,21 @@
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':
ensure => installed,
}

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':
Expand All @@ -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,
}
}
}
7 changes: 0 additions & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@
# 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
# The oauth secret for Candlepin
# @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',
Expand Down
Loading