Ottomata has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/398863 )
Change subject: Add ssl_array and ssl_string entries to kafka_config
......................................................................
Add ssl_array and ssl_string entries to kafka_config
This makes it easier for kafka clients to choose if they communicate
with Kafka over SSL.
Change-Id: I3ed69794f7153760e1c54c23c79a2ec014e75a48
---
M modules/role/lib/puppet/parser/functions/kafka_config.rb
1 file changed, 16 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/63/398863/1
diff --git a/modules/role/lib/puppet/parser/functions/kafka_config.rb
b/modules/role/lib/puppet/parser/functions/kafka_config.rb
index 11bc44e..83e2570 100644
--- a/modules/role/lib/puppet/parser/functions/kafka_config.rb
+++ b/modules/role/lib/puppet/parser/functions/kafka_config.rb
@@ -67,17 +67,27 @@
# These are the zookeeper hosts for this kafka cluster.
zk_hosts = zk_clusters[zk_cluster_name]['hosts'].keys.sort
+ default_port = 9092
+ default_ssl_port = 9093
jmx_port = '9999'
+
config = {
'name' => cluster_name,
'brokers' => {
- 'hash' => brokers,
- 'array' => brokers.keys.sort,
- # list of comma-separated host:port broker pairs
- 'string' => brokers.map { |host, conf| "#{host}:#{conf['port'] ||
9092}" }.sort.join(','),
+ 'hash' => brokers,
+ # array of broker hostnames without port. TODO: change this to use
host:port?
+ 'array' => brokers.keys.sort,
+ # string list of comma-separated host:port broker
+ 'string' => brokers.map { |host, conf| "#{host}:#{conf['port'] ||
default_port}" }.sort.join(','),
+
+ # array host:ssl_port brokers
+ 'ssl_array' => brokers.map { |host, conf| "#{host}:#{conf['ssl_port']
|| default_ssl_port}" }.sort
+ # string list of comma-separated host:ssl_port brokers
+ 'ssl_string' => brokers.map { |host, conf| "#{host}:#{conf['ssl_port']
|| default_ssl_port}" }.sort.join(','),
+
# list of comma-separated host_9999 broker pairs used as graphite
wildcards
- 'graphite' => "{#{brokers.keys.map { |b| "#{b.tr '.',
'_'}_#{jmx_port}" }.sort.join(',')}}",
- 'size' => brokers.keys.size
+ 'graphite' => "{#{brokers.keys.map { |b| "#{b.tr '.',
'_'}_#{jmx_port}" }.sort.join(',')}}",
+ 'size' => brokers.keys.size
},
'jmx_port' => jmx_port,
'zookeeper' => {
--
To view, visit https://gerrit.wikimedia.org/r/398863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ed69794f7153760e1c54c23c79a2ec014e75a48
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits