]> git.openstreetmap.org Git - chef.git/commitdiff
Use java 8 for logstash
authorTom Hughes <tom@compton.nu>
Mon, 1 Oct 2018 18:26:00 +0000 (19:26 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 1 Oct 2018 18:26:00 +0000 (19:26 +0100)
cookbooks/logstash/recipes/default.rb
cookbooks/logstash/templates/default/logstash.default.erb [new file with mode: 0644]

index 620194df8973c596608c69d662cbfa697d6d292c..65b6035cbe261528d4811b34e28dc81bcce0f39c 100644 (file)
@@ -22,7 +22,7 @@ include_recipe "networking"
 keys = data_bag_item("logstash", "keys")
 
 package %w[
-  default-jre-headless
+  openjdk-8-jre-headless
   logstash
 ]
 
@@ -54,6 +54,14 @@ file "/etc/logrotate.d/logstash" do
   mode 0o644
 end
 
+template "/etc/default/logstash" do
+  source "logstash.default.erb"
+  user "root"
+  group "root"
+  mode 0o644
+  notifies :restart, "service[logstash]"
+end
+
 service "logstash" do
   action [:enable, :start]
   supports :status => true, :restart => true, :reload => true
diff --git a/cookbooks/logstash/templates/default/logstash.default.erb b/cookbooks/logstash/templates/default/logstash.default.erb
new file mode 100644 (file)
index 0000000..ce376af
--- /dev/null
@@ -0,0 +1,13 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
+LS_HOME="/usr/share/logstash"
+LS_SETTINGS_DIR="/etc/logstash"
+LS_PIDFILE="/var/run/logstash.pid"
+LS_USER="logstash"
+LS_GROUP="logstash"
+LS_GC_LOG_FILE="/var/log/logstash/gc.log"
+LS_OPEN_FILES="16384"
+LS_NICE="19"
+SERVICE_NAME="logstash"
+SERVICE_DESCRIPTION="logstash"