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

Add Puppet 6 support #264

Merged
merged 2 commits into from
Dec 17, 2018
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
24 changes: 15 additions & 9 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
extlib: "https://github.com/puppet-community/puppet-extlib"
apache: "https://github.com/puppetlabs/puppetlabs-apache.git"
postgresql: "https://github.com/puppetlabs/puppetlabs-postgresql.git"
mongodb: "https://github.com/puppetlabs/puppetlabs-mongodb.git"
foreman: "https://github.com/theforeman/puppet-foreman.git"
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
certs: "https://github.com/theforeman/puppet-certs.git"
qpid: "https://github.com/theforeman/puppet-qpid.git"
candlepin: "https://github.com/theforeman/puppet-candlepin.git"
certs: "https://github.com/theforeman/puppet-certs.git"
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
cron_core:
repo: 'https://github.com/puppetlabs/puppetlabs-cron_core'
puppet_version: '>= 6.0.0'
extlib: "https://github.com/voxpupuli/puppet-extlib"
foreman: "https://github.com/theforeman/puppet-foreman.git"
mongodb: "https://github.com/voxpupuli/puppet-mongodb.git"
postgresql: "https://github.com/puppetlabs/puppetlabs-postgresql.git"
pulp: "https://github.com/theforeman/puppet-pulp.git"
squid3: "https://github.com/thias/puppet-squid3.git"
qpid: "https://github.com/theforeman/puppet-qpid.git"
squid3: "https://github.com/theforeman/puppet-squid3.git"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
systemd: "https://github.com/camptocamp/puppet-systemd.git"
yumrepo_core:
repo: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'
puppet_version: '>= 6.0.0'
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ matrix:
env: PUPPET_VERSION=4.9
- rvm: 2.4.1
env: PUPPET_VERSION=5.0
- rvm: 2.5.1
env: PUPPET_VERSION=6.0
bundler_args: --without system_tests development
sudo: false
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ gem 'rspec-puppet', '~> 2.3'
gem 'rspec-puppet-facts', '>= 1.7'
gem 'puppetlabs_spec_helper', '>= 2.1.1'
gem 'puppet-lint', '>= 2'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-classes_and_types_beginning_with_digits-check'
gem 'puppet-lint-empty_string-check'
gem 'puppet-lint-file_ensure-check'
Expand Down
76 changes: 38 additions & 38 deletions manifests/application.pp
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# Install and configure the katello application itself
class katello::application (
Array[String] $package_names = $::katello::package_names,
Boolean $enable_ostree = $::katello::enable_ostree,
Boolean $enable_yum = $::katello::enable_yum,
Boolean $enable_file = $::katello::enable_file,
Boolean $enable_puppet = $::katello::enable_puppet,
Boolean $enable_docker = $::katello::enable_docker,
Boolean $enable_deb = $::katello::enable_deb,
Array[String] $package_names = $katello::package_names,
Boolean $enable_ostree = $katello::enable_ostree,
Boolean $enable_yum = $katello::enable_yum,
Boolean $enable_file = $katello::enable_file,
Boolean $enable_puppet = $katello::enable_puppet,
Boolean $enable_docker = $katello::enable_docker,
Boolean $enable_deb = $katello::enable_deb,

Optional[Enum['SSLv23', 'TLSv1', '']] $cdn_ssl_version = $::katello::cdn_ssl_version,
String $deployment_url = $::katello::deployment_url,
String $post_sync_token = $::katello::post_sync_token,
Stdlib::Httpsurl $candlepin_url = $::katello::candlepin_url,
String $candlepin_oauth_key = $::katello::candlepin_oauth_key,
String $candlepin_oauth_secret = $::katello::candlepin_oauth_secret,
Stdlib::Httpsurl $pulp_url = $::katello::pulp_url,
Stdlib::Httpsurl $crane_url = $::katello::crane_url,
String $qpid_url = $::katello::qpid_url,
String $candlepin_event_queue = $::katello::candlepin_event_queue,
Optional[String] $proxy_host = $::katello::proxy_url,
Optional[Integer[0, 65535]] $proxy_port = $::katello::proxy_port,
Optional[String] $proxy_username = $::katello::proxy_username,
Optional[String] $proxy_password = $::katello::proxy_password,
Integer[0] $rest_client_timeout = $::katello::rest_client_timeout,
Optional[Enum['SSLv23', 'TLSv1', '']] $cdn_ssl_version = $katello::cdn_ssl_version,
String $deployment_url = $katello::deployment_url,
String $post_sync_token = $katello::post_sync_token,
Stdlib::Httpsurl $candlepin_url = $katello::candlepin_url,
String $candlepin_oauth_key = $katello::candlepin_oauth_key,
String $candlepin_oauth_secret = $katello::candlepin_oauth_secret,
Stdlib::Httpsurl $pulp_url = $katello::pulp_url,
Stdlib::Httpsurl $crane_url = $katello::crane_url,
String $qpid_url = $katello::qpid_url,
String $candlepin_event_queue = $katello::candlepin_event_queue,
Optional[String] $proxy_host = $katello::proxy_url,
Optional[Integer[0, 65535]] $proxy_port = $katello::proxy_port,
Optional[String] $proxy_username = $katello::proxy_username,
Optional[String] $proxy_password = $katello::proxy_password,
Integer[0] $rest_client_timeout = $katello::rest_client_timeout,
) {
include ::foreman
include ::certs
include ::certs::apache
include ::certs::foreman
include ::certs::pulp_client
include ::certs::qpid
include ::katello::qpid_client
include foreman
include certs
include certs::apache
include certs::foreman
include certs::pulp_client
include certs::qpid
include katello::qpid_client

$post_sync_url = "${::foreman::foreman_url}${deployment_url}/api/v2/repositories/sync_complete?token=${post_sync_token}"
$candlepin_ca_cert = $::certs::ca_cert
$pulp_ca_cert = $::certs::katello_server_ca_cert
$crane_ca_cert = $::certs::katello_server_ca_cert
$post_sync_url = "${foreman::foreman_url}${deployment_url}/api/v2/repositories/sync_complete?token=${post_sync_token}"
$candlepin_ca_cert = $certs::ca_cert
$pulp_ca_cert = $certs::katello_server_ca_cert
$crane_ca_cert = $certs::katello_server_ca_cert

foreman_config_entry { 'pulp_client_cert':
value => $::certs::pulp_client::client_cert,
value => $certs::pulp_client::client_cert,
ignore_missing => false,
require => [Class['certs::pulp_client'], Foreman::Rake['db:seed']],
}

foreman_config_entry { 'pulp_client_key':
value => $::certs::pulp_client::client_key,
value => $certs::pulp_client::client_key,
ignore_missing => false,
require => [Class['certs::pulp_client'], Foreman::Rake['db:seed']],
}
Expand All @@ -57,7 +57,7 @@
mode => '0644',
}

include ::foreman::plugin::tasks
include foreman::plugin::tasks

Class['certs', 'certs::ca', 'certs::apache'] ~> Class['apache::service']
Class['certs', 'certs::ca', 'certs::qpid'] ~> Class['foreman::plugin::tasks']
Expand All @@ -66,10 +66,10 @@
package { $package_names:
ensure => installed,
} ->
file { "${::foreman::plugin_config_dir}/katello.yaml":
file { "${foreman::plugin_config_dir}/katello.yaml":
ensure => file,
owner => 'root',
group => $::foreman::group,
group => $foreman::group,
mode => '0640',
content => template('katello/katello.yaml.erb'),
notify => [Class['foreman::service'], Foreman::Rake['db:seed'], Foreman::Rake['apipie:cache:index']],
Expand Down
52 changes: 26 additions & 26 deletions manifests/candlepin.pp
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Katello configuration for candlepin
class katello::candlepin (
Variant[Array[String], String] $user_groups = $::katello::user_groups,
String $oauth_key = $::katello::candlepin_oauth_key,
String $oauth_secret = $::katello::candlepin_oauth_secret,
String $db_host = $::katello::candlepin_db_host,
Optional[Integer[0, 65535]] $db_port = $::katello::candlepin_db_port,
String $db_name = $::katello::candlepin_db_name,
String $db_user = $::katello::candlepin_db_user,
String $db_password = $::katello::candlepin_db_password,
Boolean $db_ssl = $::katello::candlepin_db_ssl,
Boolean $db_ssl_verify = $::katello::candlepin_db_ssl_verify,
Boolean $manage_db = $::katello::candlepin_manage_db,
String $qpid_hostname = $::katello::qpid_hostname,
Variant[Array[String], String] $user_groups = $katello::user_groups,
String $oauth_key = $katello::candlepin_oauth_key,
String $oauth_secret = $katello::candlepin_oauth_secret,
String $db_host = $katello::candlepin_db_host,
Optional[Integer[0, 65535]] $db_port = $katello::candlepin_db_port,
String $db_name = $katello::candlepin_db_name,
String $db_user = $katello::candlepin_db_user,
String $db_password = $katello::candlepin_db_password,
Boolean $db_ssl = $katello::candlepin_db_ssl,
Boolean $db_ssl_verify = $katello::candlepin_db_ssl_verify,
Boolean $manage_db = $katello::candlepin_manage_db,
String $qpid_hostname = $katello::qpid_hostname,
) {
include ::certs
include ::certs::candlepin
include certs
include certs::candlepin

class { '::candlepin':
class { 'candlepin':
user_groups => $user_groups,
oauth_key => $oauth_key,
oauth_secret => $oauth_secret,
ca_key => $::certs::candlepin::ca_key,
ca_cert => $::certs::candlepin::ca_cert,
ca_key => $certs::candlepin::ca_key,
ca_cert => $certs::candlepin::ca_cert,
keystore_file => $certs::candlepin::keystore,
keystore_password => $::certs::candlepin::keystore_password,
truststore_password => $::certs::candlepin::keystore_password,
keystore_password => $certs::candlepin::keystore_password,
truststore_password => $certs::candlepin::keystore_password,
enable_basic_auth => false,
consumer_system_name_pattern => '.+',
adapter_module => 'org.candlepin.katello.KatelloModule',
amq_enable => true,
amqp_keystore_password => $::certs::candlepin::keystore_password,
amqp_truststore_password => $::certs::candlepin::keystore_password,
amqp_keystore => $::certs::candlepin::amqp_keystore,
amqp_truststore => $::certs::candlepin::amqp_truststore,
amqp_keystore_password => $certs::candlepin::keystore_password,
amqp_truststore_password => $certs::candlepin::keystore_password,
amqp_keystore => $certs::candlepin::amqp_keystore,
amqp_truststore => $certs::candlepin::amqp_truststore,
qpid_hostname => $qpid_hostname,
qpid_ssl_cert => $::certs::candlepin::client_cert,
qpid_ssl_key => $::certs::candlepin::client_key,
qpid_ssl_cert => $certs::candlepin::client_cert,
qpid_ssl_key => $certs::candlepin::client_key,
db_host => $db_host,
db_port => $db_port,
db_name => $db_name,
Expand All @@ -47,5 +47,5 @@
subscribe => Class['certs', 'certs::candlepin'],
}

contain ::candlepin
contain candlepin
}
114 changes: 57 additions & 57 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -124,74 +124,74 @@
# $pulp_manage_db:: Boolean to install and configure the mongodb.
#
class katello (
String $user = $::katello::params::user,
String $group = $::katello::params::group,
Variant[Array[String], String] $user_groups = $::katello::params::user_groups,
String $user = $katello::params::user,
String $group = $katello::params::group,
Variant[Array[String], String] $user_groups = $katello::params::user_groups,

String $candlepin_oauth_key = $::katello::params::candlepin_oauth_key,
String $candlepin_oauth_secret = $::katello::params::candlepin_oauth_secret,
String $candlepin_oauth_key = $katello::params::candlepin_oauth_key,
String $candlepin_oauth_secret = $katello::params::candlepin_oauth_secret,

String $post_sync_token = $::katello::params::post_sync_token,
Integer[0] $rest_client_timeout = $::katello::params::rest_client_timeout,
Integer[0, 1000] $qpid_wcache_page_size = $::katello::params::qpid_wcache_page_size,
String $qpid_interface = $::katello::params::qpid_interface,
String $qpid_hostname = $::katello::params::qpid_hostname,
Integer[1] $num_pulp_workers = $::katello::params::num_pulp_workers,
Integer[0] $pulp_worker_timeout = $::katello::params::pulp_worker_timeout,
Optional[Integer] $max_tasks_per_pulp_worker = $::katello::params::max_tasks_per_pulp_worker,
Optional[Stdlib::HTTPUrl] $proxy_url = $::katello::params::proxy_url,
Optional[Integer[0, 65535]] $proxy_port = $::katello::params::proxy_port,
Optional[String] $proxy_username = $::katello::params::proxy_username,
Optional[String] $proxy_password = $::katello::params::proxy_password,
Optional[String] $pulp_max_speed = $::katello::params::pulp_max_speed,
Optional[Enum['SSLv23', 'TLSv1']] $cdn_ssl_version = $::katello::params::cdn_ssl_version,
String $post_sync_token = $katello::params::post_sync_token,
Integer[0] $rest_client_timeout = $katello::params::rest_client_timeout,
Integer[0, 1000] $qpid_wcache_page_size = $katello::params::qpid_wcache_page_size,
String $qpid_interface = $katello::params::qpid_interface,
String $qpid_hostname = $katello::params::qpid_hostname,
Integer[1] $num_pulp_workers = $katello::params::num_pulp_workers,
Integer[0] $pulp_worker_timeout = $katello::params::pulp_worker_timeout,
Optional[Integer] $max_tasks_per_pulp_worker = $katello::params::max_tasks_per_pulp_worker,
Optional[Stdlib::HTTPUrl] $proxy_url = $katello::params::proxy_url,
Optional[Integer[0, 65535]] $proxy_port = $katello::params::proxy_port,
Optional[String] $proxy_username = $katello::params::proxy_username,
Optional[String] $proxy_password = $katello::params::proxy_password,
Optional[String] $pulp_max_speed = $katello::params::pulp_max_speed,
Optional[Enum['SSLv23', 'TLSv1']] $cdn_ssl_version = $katello::params::cdn_ssl_version,

Array[String] $package_names = $::katello::params::package_names,
Boolean $enable_ostree = $::katello::params::enable_ostree,
Boolean $enable_yum = $::katello::params::enable_yum,
Boolean $enable_file = $::katello::params::enable_file,
Boolean $enable_puppet = $::katello::params::enable_puppet,
Boolean $enable_docker = $::katello::params::enable_docker,
Boolean $enable_deb = $::katello::params::enable_deb,
Array[String] $package_names = $katello::params::package_names,
Boolean $enable_ostree = $katello::params::enable_ostree,
Boolean $enable_yum = $katello::params::enable_yum,
Boolean $enable_file = $katello::params::enable_file,
Boolean $enable_puppet = $katello::params::enable_puppet,
Boolean $enable_docker = $katello::params::enable_docker,
Boolean $enable_deb = $katello::params::enable_deb,


Stdlib::Absolutepath $repo_export_dir = $::katello::params::repo_export_dir,
Stdlib::Absolutepath $repo_export_dir = $katello::params::repo_export_dir,

Boolean $manage_repo = $::katello::params::manage_repo,
String $repo_version = $::katello::params::repo_version,
Boolean $repo_gpgcheck = $::katello::params::repo_gpgcheck,
Optional[String] $repo_gpgkey = $::katello::params::repo_gpgkey,
Boolean $manage_repo = $katello::params::manage_repo,
String $repo_version = $katello::params::repo_version,
Boolean $repo_gpgcheck = $katello::params::repo_gpgcheck,
Optional[String] $repo_gpgkey = $katello::params::repo_gpgkey,

String $candlepin_db_host = $::katello::params::candlepin_db_host,
Optional[Integer[0, 65535]] $candlepin_db_port = $::katello::params::candlepin_db_port,
String $candlepin_db_name = $::katello::params::candlepin_db_name,
String $candlepin_db_user = $::katello::params::candlepin_db_user,
String $candlepin_db_password = $::katello::params::candlepin_db_password,
Boolean $candlepin_db_ssl = $::katello::params::candlepin_db_ssl,
Boolean $candlepin_db_ssl_verify = $::katello::params::candlepin_db_ssl_verify,
Boolean $candlepin_manage_db = $::katello::params::candlepin_manage_db,
String $candlepin_db_host = $katello::params::candlepin_db_host,
Optional[Integer[0, 65535]] $candlepin_db_port = $katello::params::candlepin_db_port,
String $candlepin_db_name = $katello::params::candlepin_db_name,
String $candlepin_db_user = $katello::params::candlepin_db_user,
String $candlepin_db_password = $katello::params::candlepin_db_password,
Boolean $candlepin_db_ssl = $katello::params::candlepin_db_ssl,
Boolean $candlepin_db_ssl_verify = $katello::params::candlepin_db_ssl_verify,
Boolean $candlepin_manage_db = $katello::params::candlepin_manage_db,

String $pulp_db_name = $::katello::params::pulp_db_name,
String $pulp_db_seeds = $::katello::params::pulp_db_seeds,
Optional[String] $pulp_db_username = $::katello::params::pulp_db_username,
Optional[String] $pulp_db_password = $::katello::params::pulp_db_password,
Optional[String] $pulp_db_replica_set = $::katello::params::pulp_db_replica_set,
Boolean $pulp_db_ssl = $::katello::params::pulp_db_ssl,
Optional[Stdlib::Absolutepath] $pulp_db_ssl_keyfile = $::katello::params::pulp_db_ssl_keyfile,
Optional[Stdlib::Absolutepath] $pulp_db_ssl_certfile = $::katello::params::pulp_db_ssl_certfile,
Boolean $pulp_db_verify_ssl = $::katello::params::pulp_db_verify_ssl,
Stdlib::Absolutepath $pulp_db_ca_path = $::katello::params::pulp_db_ca_path,
Boolean $pulp_db_unsafe_autoretry = $::katello::params::pulp_db_unsafe_autoretry,
Optional[Enum['majority', 'all']] $pulp_db_write_concern = $::katello::params::pulp_db_write_concern,
Boolean $pulp_manage_db = $::katello::params::pulp_manage_db,
String $pulp_db_name = $katello::params::pulp_db_name,
String $pulp_db_seeds = $katello::params::pulp_db_seeds,
Optional[String] $pulp_db_username = $katello::params::pulp_db_username,
Optional[String] $pulp_db_password = $katello::params::pulp_db_password,
Optional[String] $pulp_db_replica_set = $katello::params::pulp_db_replica_set,
Boolean $pulp_db_ssl = $katello::params::pulp_db_ssl,
Optional[Stdlib::Absolutepath] $pulp_db_ssl_keyfile = $katello::params::pulp_db_ssl_keyfile,
Optional[Stdlib::Absolutepath] $pulp_db_ssl_certfile = $katello::params::pulp_db_ssl_certfile,
Boolean $pulp_db_verify_ssl = $katello::params::pulp_db_verify_ssl,
Stdlib::Absolutepath $pulp_db_ca_path = $katello::params::pulp_db_ca_path,
Boolean $pulp_db_unsafe_autoretry = $katello::params::pulp_db_unsafe_autoretry,
Optional[Enum['majority', 'all']] $pulp_db_write_concern = $katello::params::pulp_db_write_concern,
Boolean $pulp_manage_db = $katello::params::pulp_manage_db,
) inherits katello::params {

include ::katello::repo
include ::katello::candlepin
include ::katello::qpid
include ::katello::pulp
include katello::repo
include katello::candlepin
include katello::qpid
include katello::pulp
Class['katello::repo'] -> Class['katello::pulp']
include ::katello::application
include katello::application
Class['katello::repo'] -> Class['katello::application']
Class['katello::candlepin'] -> Class['katello::application']

Expand Down
Loading