From 50fffdd2465776871aaea7316fd1d129bd67c3b9 Mon Sep 17 00:00:00 2001 From: A1EF Date: Sat, 8 Jul 2023 13:17:12 +0300 Subject: [PATCH] Change `Environment` to `EnvironmentFile` in systemd unit file --- debian/Makefile | 2 +- debian/confluent-kafka-rest | 14 ++++++++++++++ debian/confluent-kafka-rest.service | 2 +- debian/confluent-kafka-rest.spec.in | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 debian/confluent-kafka-rest diff --git a/debian/Makefile b/debian/Makefile index 95ada0f749..02a94ba22b 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -142,7 +142,7 @@ RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz: rpm-build-area rm -rf $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) mkdir $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) cp -R $(DESTDIR)/* $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) - sed "s@##RPMVERSION##@$(RPM_VERSION)@g; s@##RPMRELEASE##@$(RPM_RELEASE_ID)@g" < debian/$(FULL_PACKAGE_TITLE).spec.in > $(FULL_PACKAGE_TITLE)-$(RPM_VERSION)/$(FULL_PACKAGE_TITLE).spec + sed "s@##RPMVERSION##@$(RPM_VERSION)@g; s@##RPMRELEASE##@$(RPM_RELEASE_ID)@g" < debian/$(FULL_PACKAGE_TITLE).spec.in > $(FULL_PACKAGE_TITLE)-$(RPM_VERSION)/$(FULL_PACKAGE_TITLE).spec rm -f $@ && tar -czf $@ $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) rm -rf $(FULL_PACKAGE_TITLE)-$(RPM_VERSION) diff --git a/debian/confluent-kafka-rest b/debian/confluent-kafka-rest new file mode 100644 index 0000000000..dc5b422e14 --- /dev/null +++ b/debian/confluent-kafka-rest @@ -0,0 +1,14 @@ +# JMX settings +#KAFKAREST_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false " + +# JVM performance options +#KAFKAREST_JVM_PERFORMANCE_OPTS="-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true" + +# Generic JVM settings you want to add +#KAFKAREST_OPTS="" + +# Memory options +#KAFKAREST_HEAP_OPTS="-Xmx256M" + +# Logging directory +LOG_DIR=/var/log/confluent/kafka-rest diff --git a/debian/confluent-kafka-rest.service b/debian/confluent-kafka-rest.service index f589b91d19..872d536e27 100644 --- a/debian/confluent-kafka-rest.service +++ b/debian/confluent-kafka-rest.service @@ -7,7 +7,7 @@ After=network.target confluent-kafka.target Type=simple User=cp-kafka-rest Group=confluent -Environment="LOG_DIR=/var/log/confluent/kafka-rest" +EnvironmentFile=-/etc/sysconfig/confluent-kafka-rest ExecStart=/usr/bin/kafka-rest-start /etc/kafka-rest/kafka-rest.properties LimitNOFILE=100000 TimeoutStopSec=180 diff --git a/debian/confluent-kafka-rest.spec.in b/debian/confluent-kafka-rest.spec.in index a0698a5bea..de11fb8f5b 100644 --- a/debian/confluent-kafka-rest.spec.in +++ b/debian/confluent-kafka-rest.spec.in @@ -92,6 +92,7 @@ fi /usr/share/doc/kafka-rest %config(noreplace) /etc/kafka-rest/* +%config(noreplace) /etc/sysconfig/confluent-kafka-rest %clean #used to cleanup things outside the build area and possibly inside.