summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD32
-rw-r--r--elasticsearch.install5
-rw-r--r--elasticsearch.service66
-rw-r--r--sysctl.conf1
-rw-r--r--users.conf1
6 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..45f139afdce0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = elasticsearch-bin
+ pkgdesc = Log analyzer. search, store and analyze logs
+ pkgver = 8.3.2
+ pkgrel = 0
+ url = https://elastic.co
+ install = elasticsearch.install
+ arch = x86_64
+ license = ELv2
+ source = elasticsearch.service
+ source = sysctl.conf
+ source = users.conf
+ sha256sums = 9e1f68ff275ef2b5f2b93d2823efc5cc9643da696fcbe09a3ea7520ada35ffba
+ sha256sums = b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c
+ sha256sums = fc9683349457f56bcd044cd8e711bc8efd43d32f9547d5b21a66650c6dfbed73
+ source_x86_64 = https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.2-linux-x86_64.tar.gz
+ sha256sums_x86_64 = 98f1b43dafed26e862a436ec57a6c6d88acbec792bea4ba7a6a81dab98051d20
+
+pkgname = elasticsearch-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..026b92d81c74
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: thorko contact@thorko.de
+pkgname=elasticsearch-bin
+pkgver=8.3.2
+pkgrel=0
+pkgdesc="Log analyzer. search, store and analyze logs"
+arch=('x86_64')
+url='https://elastic.co'
+license=('ELv2')
+source_x86_64=("https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${pkgver}-linux-x86_64.tar.gz")
+sha256sums_x86_64=('98f1b43dafed26e862a436ec57a6c6d88acbec792bea4ba7a6a81dab98051d20')
+
+install=elasticsearch.install
+
+source=(
+ "elasticsearch.service"
+ "sysctl.conf"
+ "users.conf"
+)
+
+sha256sums=(
+ '9e1f68ff275ef2b5f2b93d2823efc5cc9643da696fcbe09a3ea7520ada35ffba'
+ 'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
+ 'fc9683349457f56bcd044cd8e711bc8efd43d32f9547d5b21a66650c6dfbed73'
+)
+
+package() {
+ mkdir -p "${pkgdir}/opt"
+ cp -R "${srcdir}/elasticsearch-${pkgver}" "${pkgdir}/opt/elasticsearch"
+ install -Dm0644 "elasticsearch.service" "${pkgdir}/etc/systemd/system/elasticsearch.service"
+ install -Dm0644 "sysctl.conf" "${pkgdir}/usr/lib/sysctl.d/elasticsearch.conf"
+ install -Dm0644 "users.conf" "${pkgdir}/usr/lib/sysusers.d/elasticsearch.conf"
+}
diff --git a/elasticsearch.install b/elasticsearch.install
new file mode 100644
index 000000000000..ba096f4b43b3
--- /dev/null
+++ b/elasticsearch.install
@@ -0,0 +1,5 @@
+post_remove() {
+ /usr/bin/userdel elasticsearch
+ /usr/bin/groupdel elasticsearch
+ rm -rf /var/lib/elasticsearch
+}
diff --git a/elasticsearch.service b/elasticsearch.service
new file mode 100644
index 000000000000..d15fff03901d
--- /dev/null
+++ b/elasticsearch.service
@@ -0,0 +1,66 @@
+[Unit]
+Description=Elasticsearch
+Documentation=http://www.elastic.co
+Wants=elasticsearch-keystore.service
+Wants=network-online.target
+After=elasticsearch-keystore.service
+After=network-online.target
+
+[Service]
+Type=notify
+RuntimeDirectory=elasticsearch
+PrivateTmp=true
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+Environment=ES_SD_NOTIFY=true
+EnvironmentFile=-/etc/default/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid
+
+# StandardOutput is configured to redirect to journalctl since
+# some error messages may be logged in standard output before
+# elasticsearch logging system is initialized. Elasticsearch
+# stores its logs in /var/log/elasticsearch and does not use
+# journalctl by default. If you also want to enable journalctl
+# logging, you can simply remove the "quiet" option from ExecStart.
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65535
+
+# Specifies the maximum number of processes
+LimitNPROC=4096
+
+# Specifies the maximum size of virtual memory
+LimitAS=infinity
+
+# Specifies the maximum file size
+LimitFSIZE=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Send the signal only to the JVM rather than its control group
+KillMode=process
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sysctl.conf b/sysctl.conf
new file mode 100644
index 000000000000..32da2c91cf27
--- /dev/null
+++ b/sysctl.conf
@@ -0,0 +1 @@
+vm.max_map_count=262144 \ No newline at end of file
diff --git a/users.conf b/users.conf
new file mode 100644
index 000000000000..51ff7f9a7e15
--- /dev/null
+++ b/users.conf
@@ -0,0 +1 @@
+u elasticsearch - "Elasticsearch user" /var/lib/elasticsearch