Puppet Class: puppet::server
- Defined in:
- manifests/server.pp
Overview
- $custom_trusted_oid_mapping
-
A hash of custom trusted oid mappings. Example: { 1.3.6.1.4.1.34380.1.2.1.1 => { shortname => ‘myshortname’ } }
- $admin_api_whitelist
-
The whitelist of clients that can query the puppet-admin-api endpoint Defaults to [ ‘127.0.0.1’, ‘::1’, $::ipaddress ]
- $ca_auth_required
-
Whether client certificates are needed to access the puppet-admin api Defaults to true
- $ca_client_self_delete
-
Adds a rule to auth.conf, that allows a client to self delete its own certificate Defaults to false
- $use_legacy_auth_conf
-
Should the puppetserver use the legacy puppet auth.conf? Defaults to false (the puppetserver will use its own conf.d/auth.conf)
- $check_for_updates
-
Should the puppetserver phone home to check for available updates?
- $environment_class_cache_enabled
-
Enable environment class cache in conjunction with the use of the environment_classes API.
- $allow_header_cert_info
-
Allow client authentication over HTTP Headers Defaults to false, is also activated by the $http setting
- $puppetserver_jruby9k
-
For Puppetserver 5, use JRuby 9k? Defaults to false
- $puppetserver_metrics
-
Enable metrics (Puppetserver 5.x only) and JRuby profiling? Defaults to true on Puppetserver 5.x and to false on Puppetserver 2.x
- $metrics_jmx_enable
-
Enable or disable JMX metrics reporter. Defaults to true
- $metrics_graphite_enable
-
Enable or disable Graphite metrics reporter. Defaults to false
- $metrics_graphite_host
-
Graphite server host. Defaults to “127.0.0.1”
- $metrics_graphite_port
-
Graphite server port. Defaults to 2003
- $metrics_server_id
-
A server id that will be used as part of the namespace for metrics produced Defaults to $fqdn
- $metrics_graphite_interval
-
How often to send metrics to graphite (in seconds) Defaults to 5
- $metrics_allowed
-
Specify metrics to allow in addition to those in the default list Defaults to undef
- $puppetserver_experimental
-
For Puppetserver 5, enable the /puppet/experimental route? Defaults to true
- $puppetserver_trusted_agents
-
Certificate names of agents that are allowed to fetch all catalogs. Defaults to empty array
- $ca_allow_sans
-
Allow CA to sign certificate requests that have Subject Alternative Names Defaults to false
- $ca_allow_auth_extensions
-
Allow CA to sign certificate requests that have authorization extensions Defaults to false
- $ca_enable_infra_crl
-
Enable the separate CRL for Puppet infrastructure nodes Defaults to false
- $acceptor_threads
-
This sets the number of threads that the webserver will dedicate to accepting socket connections for unencrypted HTTP traffic. If not provided, the webserver defaults to the number of virtual cores on the host divided by 8, with a minimum of 1 and maximum of 4.
- $selector_threads
-
This sets the number of selectors that the webserver will dedicate to processing events on connected sockets for unencrypted HTTPS traffic. If not provided, the webserver defaults to the minimum of: virtual cores on the host divided by 2 or max-threads divided by 16, with a minimum of 1.
- $max_threads
-
This sets the maximum number of threads assigned to responding to HTTP and/or HTTPS requests for a single webserver, effectively changing how many concurrent requests can be made at one time. If not provided, the webserver defaults to 200.
- $ssl_acceptor_threads
-
This sets the number of threads that the webserver will dedicate to accepting socket connections for encrypted HTTPS traffic. If not provided, defaults to the number of virtual cores on the host divided by 8, with a minimum of 1 and maximum of 4.
- $ssl_selector_threads
-
This sets the number of selectors that the webserver will dedicate to processing events on connected sockets for encrypted HTTPS traffic. Defaults to the number of virtual cores on the host divided by 2, with a minimum of 1 and maximum of 4. The number of selector threads actually used by Jetty is twice the number of selectors requested. For example, if a value of 3 is specified for the ssl-selector-threads setting, Jetty will actually use 6 selector threads.
- $versioned_code_id
-
The path to an executable script that Puppet Server invokes to generate a code_id
- $versioned_code_content
-
Contains the path to an executable script that Puppet Server invokes when an agent makes a static_file_content API request for the contents of a file resource that has a source attribute with a puppet:/// URI value.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'manifests/server.pp', line 335
class puppet::server(
Variant[Boolean, Stdlib::Absolutepath] $autosign = $puppet::autosign,
Array[String] $autosign_entries = $puppet::autosign_entries,
Pattern[/^[0-9]{3,4}$/] $autosign_mode = $puppet::autosign_mode,
Optional[String] $autosign_content = $puppet::autosign_content,
Optional[String] $autosign_source = $puppet::autosign_source,
String $hiera_config = $puppet::hiera_config,
Array[String] $admin_api_whitelist = $puppet::server_admin_api_whitelist,
Boolean $manage_user = $puppet::server_manage_user,
String $user = $puppet::server_user,
String $group = $puppet::server_group,
String $dir = $puppet::server_dir,
Stdlib::Absolutepath $codedir = $puppet::codedir,
Integer $port = $puppet::server_port,
String $ip = $puppet::server_ip,
Boolean $ca = $puppet::server_ca,
Optional[String] $ca_crl_filepath = $puppet::ca_crl_filepath,
Boolean $ca_crl_sync = $puppet::server_ca_crl_sync,
Optional[Boolean] $crl_enable = $puppet::server_crl_enable,
Boolean $ca_auth_required = $puppet::server_ca_auth_required,
Boolean $ca_client_self_delete = $puppet::server_ca_client_self_delete,
Array[String] $ca_client_whitelist = $puppet::server_ca_client_whitelist,
Optional[Puppet::Custom_trusted_oid_mapping] $custom_trusted_oid_mapping = $puppet::server_custom_trusted_oid_mapping,
Boolean $http = $puppet::server_http,
Integer $http_port = $puppet::server_http_port,
String $reports = $puppet::server_reports,
Stdlib::Absolutepath $puppetserver_vardir = $puppet::server_puppetserver_vardir,
Optional[Stdlib::Absolutepath] $puppetserver_rundir = $puppet::server_puppetserver_rundir,
Optional[Stdlib::Absolutepath] $puppetserver_logdir = $puppet::server_puppetserver_logdir,
Stdlib::Absolutepath $puppetserver_dir = $puppet::server_puppetserver_dir,
Optional[Pattern[/^[\d]\.[\d]+\.[\d]+$/]] $puppetserver_version = $puppet::server_puppetserver_version,
Variant[Undef, String[0], Stdlib::Absolutepath] $external_nodes = $puppet::server_external_nodes,
Optional[Stdlib::Absolutepath] $trusted_external_command = $puppet::server_trusted_external_command,
Array[String] $cipher_suites = $puppet::server_cipher_suites,
Optional[String] $config_version = $puppet::server_config_version,
Integer[0] $connect_timeout = $puppet::server_connect_timeout,
Integer[0] $web_idle_timeout = $puppet::server_web_idle_timeout,
Boolean $git_repo = $puppet::server_git_repo,
Boolean $default_manifest = $puppet::server_default_manifest,
Stdlib::Absolutepath $default_manifest_path = $puppet::server_default_manifest_path,
String $default_manifest_content = $puppet::server_default_manifest_content,
String $environments_owner = $puppet::server_environments_owner,
Optional[String] $environments_group = $puppet::server_environments_group,
Pattern[/^[0-9]{3,4}$/] $environments_mode = $puppet::server_environments_mode,
Stdlib::Absolutepath $envs_dir = $puppet::server_envs_dir,
Optional[Stdlib::Absolutepath] $envs_target = $puppet::server_envs_target,
Variant[Undef, String[0], Array[Stdlib::Absolutepath]] $common_modules_path = $puppet::server_common_modules_path,
Pattern[/^[0-9]{3,4}$/] $git_repo_mode = $puppet::server_git_repo_mode,
Stdlib::Absolutepath $git_repo_path = $puppet::server_git_repo_path,
String $git_repo_group = $puppet::server_git_repo_group,
String $git_repo_user = $puppet::server_git_repo_user,
Hash[String, String] $git_branch_map = $puppet::server_git_branch_map,
Integer[0] $idle_timeout = $puppet::server_idle_timeout,
String $post_hook_content = $puppet::server_post_hook_content,
String $post_hook_name = $puppet::server_post_hook_name,
Boolean $storeconfigs = $puppet::server_storeconfigs,
Array[Stdlib::Absolutepath] $ruby_load_paths = $puppet::server_ruby_load_paths,
Stdlib::Absolutepath $ssl_dir = $puppet::server_ssl_dir,
Boolean $ssl_dir_manage = $puppet::server_ssl_dir_manage,
Boolean $ssl_key_manage = $puppet::server_ssl_key_manage,
Array[String] $ssl_protocols = $puppet::server_ssl_protocols,
Optional[Stdlib::Absolutepath] $ssl_chain_filepath = $puppet::server_ssl_chain_filepath,
Optional[Variant[String, Array[String]]] $package = $puppet::server_package,
Optional[String] $version = $puppet::server_version,
String $certname = $puppet::server_certname,
Integer[0] $request_timeout = $puppet::server_request_timeout,
Boolean $strict_variables = $puppet::server_strict_variables,
Hash[String, Data] $additional_settings = $puppet::server_additional_settings,
Boolean $foreman = $puppet::server_foreman,
Stdlib::HTTPUrl $foreman_url = $puppet::server_foreman_url,
Optional[Stdlib::Absolutepath] $foreman_ssl_ca = $puppet::server_foreman_ssl_ca,
Optional[Stdlib::Absolutepath] $foreman_ssl_cert = $puppet::server_foreman_ssl_cert,
Optional[Stdlib::Absolutepath] $foreman_ssl_key = $puppet::server_foreman_ssl_key,
Boolean $server_foreman_facts = $puppet::server_foreman_facts,
Optional[Stdlib::Absolutepath] $puppet_basedir = $puppet::server_puppet_basedir,
Enum['current', 'future'] $parser = $puppet::server_parser,
Variant[Undef, Enum['unlimited'], Pattern[/^\d+[smhdy]?$/]] $environment_timeout = $puppet::server_environment_timeout,
String $jvm_java_bin = $puppet::server_jvm_java_bin,
String $jvm_config = $puppet::server_jvm_config,
Pattern[/^[0-9]+[kKmMgG]$/] $jvm_min_heap_size = $puppet::server_jvm_min_heap_size,
Pattern[/^[0-9]+[kKmMgG]$/] $jvm_max_heap_size = $puppet::server_jvm_max_heap_size,
Optional[Variant[String,Array[String]]] $jvm_extra_args = $puppet::server_jvm_extra_args,
Optional[String] $jvm_cli_args = $puppet::server_jvm_cli_args,
Optional[Stdlib::Absolutepath] $jruby_gem_home = $puppet::server_jruby_gem_home,
Integer[1] $max_active_instances = $puppet::server_max_active_instances,
Integer[0] $max_requests_per_instance = $puppet::server_max_requests_per_instance,
Integer[0] $max_queued_requests = $puppet::server_max_queued_requests,
Integer[0] $max_retry_delay = $puppet::server_max_retry_delay,
Boolean $multithreaded = $puppet::server_multithreaded,
Boolean $use_legacy_auth_conf = $puppet::server_use_legacy_auth_conf,
Boolean $check_for_updates = $puppet::server_check_for_updates,
Boolean $environment_class_cache_enabled = $puppet::server_environment_class_cache_enabled,
Boolean $allow_header_cert_info = $puppet::server_allow_header_cert_info,
Boolean $puppetserver_jruby9k = $puppet::server_puppetserver_jruby9k,
Optional[Boolean] $puppetserver_metrics = $puppet::server_puppetserver_metrics,
Boolean $metrics_jmx_enable = $puppet::server_metrics_jmx_enable,
Boolean $metrics_graphite_enable = $puppet::server_metrics_graphite_enable,
String $metrics_graphite_host = $puppet::server_metrics_graphite_host,
Integer $metrics_graphite_port = $puppet::server_metrics_graphite_port,
String $metrics_server_id = $puppet::server_metrics_server_id,
Integer $metrics_graphite_interval = $puppet::server_metrics_graphite_interval,
Variant[Undef, Array] $metrics_allowed = $puppet::server_metrics_allowed,
Boolean $puppetserver_experimental = $puppet::server_puppetserver_experimental,
Array[String] $puppetserver_trusted_agents = $puppet::server_puppetserver_trusted_agents,
Optional[Enum['off', 'jit', 'force']] $compile_mode = $puppet::server_compile_mode,
Optional[Integer[1]] $selector_threads = $puppet::server_selector_threads,
Optional[Integer[1]] $acceptor_threads = $puppet::server_acceptor_threads,
Optional[Integer[1]] $ssl_selector_threads = $puppet::server_ssl_selector_threads,
Optional[Integer[1]] $ssl_acceptor_threads = $puppet::server_ssl_acceptor_threads,
Optional[Integer[1]] $max_threads = $puppet::server_max_threads,
Boolean $ca_allow_sans = $puppet::server_ca_allow_sans,
Boolean $ca_allow_auth_extensions = $puppet::server_ca_allow_auth_extensions,
Boolean $ca_enable_infra_crl = $puppet::server_ca_enable_infra_crl,
Optional[Integer[1]] $max_open_files = $puppet::server_max_open_files,
Optional[Stdlib::Absolutepath] $versioned_code_id = $puppet::server_versioned_code_id,
Optional[Stdlib::Absolutepath] $versioned_code_content = $puppet::server_versioned_code_content,
) {
if $ca {
$ssl_ca_cert = "${ssl_dir}/ca/ca_crt.pem"
$ssl_ca_crl = "${ssl_dir}/ca/ca_crl.pem"
$ssl_chain = $ssl_chain_filepath
$crl_enable_real = pick($crl_enable, true)
} else {
$ssl_ca_cert = "${ssl_dir}/certs/ca.pem"
$ssl_ca_crl = pick($ca_crl_filepath, "${ssl_dir}/crl.pem")
$ssl_chain = false
$crl_enable_real = pick($crl_enable, false)
}
$ssl_cert = "${ssl_dir}/certs/${certname}.pem"
$ssl_cert_key = "${ssl_dir}/private_keys/${certname}.pem"
if $config_version == undef {
if $git_repo {
$config_version_cmd = "git --git-dir ${envs_dir}/\$environment/.git describe --all --long"
} else {
$config_version_cmd = undef
}
} else {
$config_version_cmd = $config_version
}
# For Puppetserver, certain configuration parameters are version specific. We
# assume a particular version here.
if $puppetserver_version {
$real_puppetserver_version = $puppetserver_version
} elsif versioncmp($::puppetversion, '6.0.0') >= 0 {
$real_puppetserver_version = '6.0.0'
} else {
$real_puppetserver_version = '5.3.6'
}
# Prefer the user setting,otherwise disable for Puppetserver 2.x, enabled for 5.x
$real_puppetserver_metrics = pick($puppetserver_metrics, true)
if $jvm_extra_args {
$real_jvm_extra_args = $jvm_extra_args
} else {
$real_jvm_extra_args = '-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger'
}
contain puppet::server::install
contain puppet::server::config
contain puppet::server::service
Class['puppet::server::install'] ~> Class['puppet::server::config']
Class['puppet::config', 'puppet::server::config'] ~> Class['puppet::server::service']
}
|