puppet-candlepin/manifests/init.pp @ fa8e07ff
39832902 | Eric D. Helms | # Install and Configure candlepin
|
|
37540211 | Eric D. Helms | #
|
|
39832902 | Eric D. Helms | # == Parameters:
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $oauth_key:: The oauth key for talking to the candlepin API;
|
|
# default 'candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $oauth_secret:: The oauth secret for talking to the candlepin API;
|
|
# default 'candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $manage_db:: Boolean indicating if a database should be installed and configured.
|
|
# Set false if database is hosted on dedicated server.
|
|||
# default true
|
|||
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $db_type:: The type of database Candlepin will be connecting too.
|
|
# options ['postgresql','mysql']
|
|||
# default postgresql
|
|||
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $db_host:: url of database server.
|
|
# default localhost
|
|||
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $db_port:: port the database listens on. Only needs to be provided if different
|
|
# from standard port of the :db_type.
|
|||
# ex. mysql will default to 3306 and postgresql will default to 5432.
|
|||
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $db_name:: The name of the Candlepin database;
|
|
# default 'candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $db_user:: The Candlepin database username;
|
|
# default 'candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $db_password:: The Candlepin database password;
|
|
# default 'candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $tomcat:: The system tomcat to use, tomcat6 on RHEL6 and tomcat on most Fedoras
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $crl_file:: The Certificate Revocation File for Candlepin
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $user_groups:: The user groups for the Candlepin tomcat user
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $log_dir:: Directory for Candlepin logs;
|
|
# default '/var/log/candlepin'
|
|||
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $deployment_url:: The root URL to deploy the Web and API URLs at
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $weburl:: The Candlepin Web URL which is configurable via the deployment_url
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $apiurl:: The Candlepin API URL which is configurable via the deployment_url
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $env_filtering_enabled:: If subscription filtering is done on a per environment basis
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $thumbslug_enabled:: If using Thumbslug; default 'false'
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $thumbslug_oauth_key:: The oauth key for talking to Thumbslug
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $thumbslug_oauth_secret:: The oauth secret for talking to Thumbslug
|
|
37540211 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $keystore_password:: Password for keystore being used with Tomcat
|
|
05d5a04e | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $ca_key:: CA key file to use
|
|
0002bda7 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $ca_cert:: CA certificate file to use
|
|
0002bda7 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $ca_key_password:: CA key password
|
|
0002bda7 | Eric D. Helms | #
|
|
fa8e07ff | Eric D. Helms | # $version:: Version of Candlepin to install
|
|
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $run_init:: Boolean indicating if the init api should be called on Candlepin
|
|
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $adapter_module:: Candlepin adapter implementations to inject into the java runtime
|
|
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $amq_enable:: Boolean indicating if amq should be enabled and configured
|
|
63fc49f5 | Dennis Crissman | #
|
|
fa8e07ff | Eric D. Helms | # $amqp_keystore:: Location of the amqp keystore to use
|
|
#
|
|||
# $amqp_keystore_password:: Password for the amqp keystore
|
|||
#
|
|||
# $amqp_truststore:: Location of the amqp truststore to use
|
|||
#
|
|||
# $amqp_truststore_password:: Password for the amqp trusture
|
|||
#
|
|||
# $consumer_system_name_pattern:: Regex that consistutes a valid consumer name
|
|||
#
|
|||
# $enable_hbm2ddl_validate:: Boolean that if true will perform a schema check to ensure compliance
|
|||
# with the models, otherwise false will disable this check. Disabling
|
|||
# this feature may be required if modifications are required to the schema.
|
|||
# default is true
|
|||
63fc49f5 | Dennis Crissman | #
|
|
37540211 | Eric D. Helms | class candlepin (
|
|
63fc49f5 | Dennis Crissman | $manage_db = $candlepin::params::manage_db,
|
|
$db_type = $candlepin::params::db_type,
|
|||
$db_host = $candlepin::params::db_host,
|
|||
$db_port = $candlepin::params::db_port,
|
|||
39832902 | Eric D. Helms | $db_name = $candlepin::params::db_name,
|
|
$db_user = $candlepin::params::db_user,
|
|||
$db_password = $candlepin::params::db_password,
|
|||
37540211 | Eric D. Helms | ||
$tomcat = $candlepin::params::tomcat,
|
|||
$crl_file = $candlepin::params::crl_file,
|
|||
$user_groups = $candlepin::params::user_groups,
|
|||
$log_dir = $candlepin::params::log_dir,
|
|||
$oauth_key = $candlepin::params::oauth_key,
|
|||
$oauth_secret = $candlepin::params::oauth_secret,
|
|||
$deployment_url = $candlepin::params::deployment_url,
|
|||
$env_filtering_enabled = $candlepin::params::env_filtering_enabled,
|
|||
$thumbslug_enabled = $candlepin::params::thumbslug_enabled,
|
|||
$thumbslug_oauth_key = $candlepin::params::thumbslug_oauth_key,
|
|||
05d5a04e | Eric D. Helms | $thumbslug_oauth_secret = $candlepin::params::thumbslug_oauth_secret,
|
|
fa8e07ff | Eric D. Helms | $keystore_password = $candlepin::params::keystore_password,
|
|
$amqp_keystore = $candlepin::params::amqp_keystore,
|
|||
$amqp_keystore_password = $candlepin::params::amqp_keystore_password,
|
|||
$amqp_truststore = $candlepin::params::amqp_truststore,
|
|||
$amqp_truststore_password = $candlepin::params::amqp_truststore_password,
|
|||
0002bda7 | Eric D. Helms | ||
$ca_key = $candlepin::params::ca_key,
|
|||
fa8e07ff | Eric D. Helms | $ca_cert = $candlepin::params::ca_cert,
|
|
cdb8a2f6 | Alex Wood | $ca_key_password = $candlepin::params::ca_key_password,
|
|
63fc49f5 | Dennis Crissman | $qpid_ssl_port = $candlepin::params::qpid_ssl_port,
|
|
37540211 | Eric D. Helms | ||
63fc49f5 | Dennis Crissman | $version = $candlepin::params::version,
|
|
$run_init = $candlepin::params::run_init,
|
|||
$adapter_module = $candlepin::params::adapter_module,
|
|||
$amq_enable = $candlepin::params::amq_enable,
|
|||
$enable_hbm2ddl_validate = $candlepin::params::enable_hbm2ddl_validate,
|
|||
fa8e07ff | Eric D. Helms | ||
$enable_basic_auth = $candlepin::params::enable_basic_auth,
|
|||
$enable_trusted_auth = $candlepin::params::enable_trusted_auth,
|
|||
$consumer_system_name_pattern = $candlepin::params::consumer_system_name_pattern,
|
|||
37540211 | Eric D. Helms | ) inherits candlepin::params {
|
|
fa8e07ff | Eric D. Helms | validate_bool($amq_enable)
|
|
if $amq_enable {
|
|||
validate_absolute_path($amqp_keystore)
|
|||
validate_absolute_path($amqp_truststore)
|
|||
validate_string($amqp_keystore_password)
|
|||
validate_string($amqp_truststore_password)
|
|||
}
|
|||
validate_absolute_path($ca_key)
|
|||
validate_absolute_path($ca_cert)
|
|||
37540211 | Eric D. Helms | $weburl = "https://${::fqdn}/${candlepin::deployment_url}/distributors?uuid="
|
|
$apiurl = "https://${::fqdn}/${candlepin::deployment_url}/api/distributors/"
|
|||
cdb8a2f6 | Alex Wood | $amqpurl = "tcp://${::fqdn}:${qpid_ssl_port}?ssl='true'&ssl_cert_alias='amqp-client'"
|
|
37540211 | Eric D. Helms | ||
63fc49f5 | Dennis Crissman | $candlepin_conf_file = '/etc/candlepin/candlepin.conf'
|
|
5b4dbfff | Eric D. Helms | class { '::candlepin::install': } ~>
|
|
class { '::candlepin::config': } ~>
|
|||
class { '::candlepin::database': } ~>
|
|||
class { '::candlepin::service': } ~>
|
|||
37540211 | Eric D. Helms | Class['candlepin']
|
|
832bafa6 | Eric D. Helms | }
|