Minor cleanups
This commit is contained in:
parent
fe52d674e7
commit
279996ad25
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
export KAFKA_OPTS="${KAFKA_OPTS} ${JAVA_OPTS}"
|
||||||
|
echo KAFKA_OPTS=${KAFKA_OPTS}
|
||||||
|
|
||||||
if [ -w "${KAFKA_CONF_DIR}/server.properties" ]; then
|
if [ -w "${KAFKA_CONF_DIR}/server.properties" ]; then
|
||||||
umask 077
|
umask 077
|
||||||
TMPCONF=$(mktemp)
|
TMPCONF=$(mktemp)
|
||||||
|
|
|
@ -58,6 +58,7 @@ job "[[ .instance ]]-brokers" {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ template "common/task.wait_for" $c ]]
|
[[ template "common/task.wait_for" $c ]]
|
||||||
|
[[ template "common/task.metrics_proxy" $c ]]
|
||||||
|
|
||||||
task "kafka-broker" {
|
task "kafka-broker" {
|
||||||
driver = "[[ $c.nomad.driver ]]"
|
driver = "[[ $c.nomad.driver ]]"
|
||||||
|
@ -89,7 +90,7 @@ job "[[ .instance ]]-brokers" {
|
||||||
template {
|
template {
|
||||||
data = <<_EOT
|
data = <<_EOT
|
||||||
KAFKA_HEAP_OPTS=-Xmx[[ $c.resources.memory | mul 0.3 | math.Ceil ]]m -Xms[[ $c.resources.memory | mul 0.3 | math.Ceil ]]m
|
KAFKA_HEAP_OPTS=-Xmx[[ $c.resources.memory | mul 0.3 | math.Ceil ]]m -Xms[[ $c.resources.memory | mul 0.3 | math.Ceil ]]m
|
||||||
KAFKA_OPTS=-javaagent:/jmx_exporter/jmx_prometheus_javaagent.jar=127.0.0.1:9404:/opt/kafka/config/jmx_exporter.yml
|
KAFKA_OPTS=-Djava.io.tmpdir=/local/tmp -javaagent:/jmx_exporter/jmx_prometheus_javaagent.jar=127.0.0.1:9404:/opt/kafka/config/jmx_exporter.yml
|
||||||
[[- if ne $c.zookeeper.user "" ]] -Djava.security.auth.login.config=/secrets/jaas.conf[[- end ]]
|
[[- if ne $c.zookeeper.user "" ]] -Djava.security.auth.login.config=/secrets/jaas.conf[[- end ]]
|
||||||
_EOT
|
_EOT
|
||||||
destination = "secrets/.kafka.env"
|
destination = "secrets/.kafka.env"
|
||||||
|
|
|
@ -11,13 +11,14 @@ kafka:
|
||||||
broker:
|
broker:
|
||||||
count: 3
|
count: 3
|
||||||
version: 3.7.0
|
version: 3.7.0
|
||||||
image: '[[ .docker.repo ]]kafka-broker:[[ .kafka.broker.version ]]-3'
|
image: '[[ .docker.repo ]]kafka-broker:[[ .kafka.broker.version ]]-4'
|
||||||
env: {}
|
env: {}
|
||||||
resources:
|
resources:
|
||||||
cpu: 100
|
cpu: 100
|
||||||
memory: 1024
|
memory: 1024
|
||||||
prometheus:
|
prometheus:
|
||||||
enabled: '[[ .prometheus.available ]]'
|
enabled: '[[ .prometheus.available ]]'
|
||||||
|
metrics_url: http://127.0.0.1:9404/metrics
|
||||||
# static_client_port: 9092
|
# static_client_port: 9092
|
||||||
# static_broker_port: 9095
|
# static_broker_port: 9095
|
||||||
nomad:
|
nomad:
|
||||||
|
|
Loading…
Reference in New Issue