Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/kafka/broker.pp
Show All 20 Lines | $zookeeper_server_string = join( | ||||
',' | ',' | ||||
) | ) | ||||
$zookeeper_connect_string = "${zookeeper_server_string}${zookeeper_chroot}" | $zookeeper_connect_string = "${zookeeper_server_string}${zookeeper_chroot}" | ||||
$broker_config = $kafka_cluster_config['brokers'][$::swh_hostname['internal_fqdn']] | $broker_config = $kafka_cluster_config['brokers'][$::swh_hostname['internal_fqdn']] | ||||
$broker_id = $broker_config['id'] | $broker_id = $broker_config['id'] | ||||
$internal_hostname = $swh_hostname['internal_fqdn'] | |||||
$public_hostname = pick($broker_config['public_hostname'], $internal_hostname.regsubst('\.internal', '')) | |||||
$kafka_config = $base_kafka_config + { | $kafka_config = $base_kafka_config + { | ||||
'zookeeper.connect' => $zookeeper_connect_string, | 'zookeeper.connect' => $zookeeper_connect_string, | ||||
'broker.id' => $broker_id, | 'broker.id' => $broker_id, | ||||
} | } | ||||
$heap_opts = $kafka_cluster_config['broker::heap_opts'] | $heap_opts = $kafka_cluster_config['broker::heap_opts'] | ||||
$kafka_logdirs = lookup('kafka::logdirs', Array) | $kafka_logdirs = lookup('kafka::logdirs', Array) | ||||
Show All 22 Lines | java_ks {'kafka:broker': | ||||
certificate => $cert_paths['fullchain'], | certificate => $cert_paths['fullchain'], | ||||
private_key => $cert_paths['privkey'], | private_key => $cert_paths['privkey'], | ||||
name => $trusted['certname'], | name => $trusted['certname'], | ||||
target => $ks_location, | target => $ks_location, | ||||
password => $ks_password, | password => $ks_password, | ||||
trustcacerts => true, | trustcacerts => true, | ||||
} | } | ||||
$internal_hostname = $swh_hostname['internal_fqdn'] | |||||
$public_hostname = $internal_hostname.regsubst('\.internal', '') | |||||
$plaintext_port = $kafka_cluster_config['plaintext_port'] | $plaintext_port = $kafka_cluster_config['plaintext_port'] | ||||
$internal_tls_port = $kafka_cluster_config['internal_tls_port'] | $internal_tls_port = $kafka_cluster_config['internal_tls_port'] | ||||
$public_tls_port = $kafka_cluster_config['public_tls_port'] | $public_tls_port = $kafka_cluster_config['public_tls_port'] | ||||
$kafka_tls_config = { | $kafka_tls_config = { | ||||
'ssl.keystore.location' => $ks_location, | 'ssl.keystore.location' => $ks_location, | ||||
'ssl.keystore.password' => $ks_password, | 'ssl.keystore.password' => $ks_password, | ||||
'listeners' => join([ | 'listeners' => join([ | ||||
Show All 25 Lines | file {$jaas_config: | ||||
content => template('profile/kafka/kafka_broker_jaas.conf.erb'), | content => template('profile/kafka/kafka_broker_jaas.conf.erb'), | ||||
notify => Service['kafka'], | notify => Service['kafka'], | ||||
} | } | ||||
$jaas_cli_opts = ["-Djava.security.auth.login.config=${jaas_config}"] | $jaas_cli_opts = ["-Djava.security.auth.login.config=${jaas_config}"] | ||||
} else { | } else { | ||||
$kafka_tls_config = { | $kafka_tls_config = { | ||||
'listeners' => "PLAINTEXT://${swh_hostname['internal_fqdn']}:${kafka_cluster_config['plaintext_port']}", | 'listeners' => "PLAINTEXT://${internal_hostname}:${kafka_cluster_config['plaintext_port']}", | ||||
} | } | ||||
$jaas_cli_opts = [] | $jaas_cli_opts = [] | ||||
} | } | ||||
include ::profile::prometheus::jmx | include ::profile::prometheus::jmx | ||||
$exporter = $::profile::prometheus::jmx::jar_path | $exporter = $::profile::prometheus::jmx::jar_path | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |