summaryrefslogtreecommitdiff
path: root/app-misc/elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/elasticsearch')
-rw-r--r--app-misc/elasticsearch/Manifest6
-rw-r--r--app-misc/elasticsearch/elasticsearch-6.3.1-r1.ebuild (renamed from app-misc/elasticsearch/elasticsearch-6.3.1.ebuild)9
-rwxr-xr-xapp-misc/elasticsearch/files/elasticsearch-systemd-pre-exec5
-rw-r--r--app-misc/elasticsearch/files/elasticsearch.service.351
-rw-r--r--app-misc/elasticsearch/files/elasticsearch.service.conf6
5 files changed, 73 insertions, 4 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index a03390cef4b7..7dfb9b720e98 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,4 +1,4 @@
-AUX elasticsearch-systemd-pre-exec 221 BLAKE2B 22176ca536032f7a7e3724a85100ed3ab5e15a7acacdacf185d733ff272d65712c9166f1d3123cd09a6e3de9a65a29340e0ca7ebb246d359a4d843eddd0ea25b SHA512 1dc41303da367122779759fc1967540357a21aac6df4f5d8761d36dc643673df660b47e5c1b595ecf9316265fe7684ddcb5290df8369379c1bdbc8c933726644
+AUX elasticsearch-systemd-pre-exec 369 BLAKE2B 18fae13aa27931cfc3952309ab76847790f4f785d14efa93bb24cfa66b3b0fc655c19a17d5a7a1b431b6c037cf3596a04eed8f650cf51beb1917560e8817bd2d SHA512 fae1d6e4e52df7d0d3111d6d6bbddf12182de931d461669d8784b524e5671ad40fb645dc6a6cf3de0de08f032c0327da8b25d7cbc4c4a49e3e3a7a791c6cfcdd
AUX elasticsearch.conf.2 2070 BLAKE2B b620bc7bddfb57c0d1c409c8af919c85fd28df79fe3329a770c7e5a46e7a6898b9b7f6b0340a19af6e5536856620aa5981e3df0c0c1fa50dd57a204d752ce248 SHA512 e10d7699046e7db71d822154be6e21785906977d991cae6709a4fd0439c262915ddbf5499b8dd501da86985644f402b96c92fa5d83feb9d0684d3eec766164f9
AUX elasticsearch.conf.3 2196 BLAKE2B e711aa58eca0df5857fa48a4dc21f5dd144977f3cd0209a58c15868531a108175ecdd21ddc18e1daf1e83c0bbd26da7c00b260698b3ef87c938b6d18928df733 SHA512 36a98d788cff404ccfe0fdff7bbe358750df8db9e5a5f419991b90e257e97331ec93c5f9a84bed57099dd239abb572ef450a191582e7145d8d7517c242707e49
AUX elasticsearch.init.2 1830 BLAKE2B 57dea653c636c7ccb40fa6ab777f0713b245bf9d344b39de23aaaad753c229196cb81acd01c4ac1c9ae29c166b1dbfa38e829d60172106dbc384aeb6e21a544e SHA512 babc54a225f1ea5c98a6c2e0a680635a5af30305a869e35db65f5f6ddeb00577b3011f83b3190567646b7d67a314710c83212a233dc31a0fb78691eb1358b96a
@@ -6,6 +6,8 @@ AUX elasticsearch.init.3 1873 BLAKE2B 58c1fa6be05b4fc28ee0b65bb5f95522b5dee4fed7
AUX elasticsearch.init.4 2018 BLAKE2B 5cce066d530afb57e4bc55026d68f57ab41419c6967145efa621051159efdeb5f12e5cbf97d50048d7b7266cc3d2c41e2957c212623cc9139d4b8558dda42864 SHA512 648bb8cf6a5223920db6685be68e439a6854a3d7532ecf6f2fcfaabfc95a5cb768982e7168063926b40eabb0e3a8d4e0a3b4a30213b2a8cbe59eafbeae5cb7c6
AUX elasticsearch.service 1718 BLAKE2B 1d3df50f9b521a897f6f57c411265ce3d5da849c23a6d5274959739531ec1f1373f59adb9d0ac94318eefbe90cf10218b67aa47530bdd162ed306354fb9cf2db SHA512 98530c01f41a2d98254033a1a292075abc6086e0608062dfbe28385e4f57da390a9c43521bfce72193c2b710e58e590f08f514257b8150140dbb9ade40ef5470
AUX elasticsearch.service.2 1544 BLAKE2B bb66a0e945df66f84937804461ed51216f8bc4585dbdfbd5e834aad0632cc7fbf1005322509183705b62fdfe0f0d105bcc238810056ec066102d8ea84dbb1020 SHA512 33dc3efc736501d6e04ab1aa1b13a4d5f5cb235f7d9ff9674715dd47afdf1e8da8db0a4b82ce46c8c6b71d8258917e8943613eff8a0371a82b5d2e490acefd77
+AUX elasticsearch.service.3 1527 BLAKE2B 7f7bee9019de2814cdce1e4a66932a0a2a915cddce2d5d2bfde2263bf088001ba1dff9bbbc8eaafb4e1d9012176fbeb4964dcd6f25f6e49935bdda90cec52f6d SHA512 adcc3147ce8d52f64fa21e7cb377ba88d4ea32254eaea03c68d45296bac46d7ff084b93469ca9dbabe013bf8bd183a96a219117b68fb91648b595206b60cebbc
+AUX elasticsearch.service.conf 235 BLAKE2B 23ada111be21dff12323edbe981883cb1ed275b6c7a9f55e77fdcec1919d374818683403a2a7a7c2c2839db2b8afcd66f7667d5080ecb52cade853a400f972a6 SHA512 b300dbc1b3c341ebbcac68385c651133427f342dc0351501b47730b392cc176b7b8dc53877affc6ab384d2834d246a3d0c63b6015dddf2c90d4bcf41cee9968c
AUX elasticsearch.sysctl.d 24 BLAKE2B 4012fbdbc98a8b28df11aed33cb82c113790c44721eae1d69e19c595bfbf329618b9cb67be9528f1994c546233cffd31b20eee39edc142bc86f7a7cf5e08903e SHA512 9f3d8238edff6704bea06b6535ee8915f4a3c9bdc8389d9d4943bcfa49161b61f9a1ca49dbcc415580438f4396fbc3d58eef301554f9426287606a755ada715c
AUX elasticsearch.tmpfiles.d 56 BLAKE2B 0c28c612fadfdd86321df797527399fa5073a7350de95ec2b32dfbe51cbf52fe5dcf68ebd4e3fba6cccba1cf252a16dee3b701c4c6692121745c41665cf3c972 SHA512 5cc722abcaae68afffde96e38b2c9572faf898178d3c291c945fe49fbf977e319322b99fb6fb5bf49cfb04e86f071dde0db621849288f712a56571b13af9a11a
DIST elasticsearch-5.6.10.tar.gz 33796721 BLAKE2B 4e9d1d910a70acf32ca63cec811b711f692f3cf32dcec084a07f92d281eed07c067740bb5c5447055a6d0b6126e55a635edcd08c105dc59985db72bcd031a8a5 SHA512 17bd5710cfc3efa455428a79c74e63aacc9b9481d59a0b0df07ad4e4c25ef32dd41b3dbbde464a2801363b6d428a23eb52cc935640ce86bbc4d8a01dca8a1585
@@ -13,5 +15,5 @@ DIST elasticsearch-6.2.4.tar.gz 29056810 BLAKE2B 121be27ac1db4fa6bbe285161b3f2b2
DIST elasticsearch-oss-6.3.1.tar.gz 29417012 BLAKE2B 356665cde2f12ae5813d95302398f5fced07c53d25e6e1dc7ad41c8dc8ad42cd3d5bd4ffa6cab24af8088c29800f6ec59a483710272b756af2f76b5967d4b932 SHA512 3df0f7f35e150198f7ff660cf4d90fbd1c2ca587287c6340d427f968711b6390123bfafd09a744c9bdf328d57423bcb75f6e4701ce14a7257388611abea62545
EBUILD elasticsearch-5.6.10.ebuild 1689 BLAKE2B 7520b1676de4ded7fbb3691cca543c3a5c6de99cfa1ffff09e40ba55991d086f7004c372387e932213bbf5dbab42952266f4da9cbaf051c1795089c420949dbf SHA512 36d5128d2779abddd535e0918bbe4569c3d1414dbfc43e57fc037ca3056aabf73dbfd43b58811c5a4d0bc3d0e3edbf093ca458add2b90b87b62cb22416552fb0
EBUILD elasticsearch-6.2.4.ebuild 1747 BLAKE2B 2e8ad76bb75a927499cb73a89ede57629db4426ee267a0721e65e8893cdff2799830f7cd136b7e82185effdac60ab8f0d9314edc0179fe2261066514f3c60519 SHA512 e7be527f28b482278376316dd3d6bc969e4d70a8d95a067ac1932f5be0dcffaaaa47064e463bb043665725f73d9605cd150128660ed923de7094f3eeb8af5a3c
-EBUILD elasticsearch-6.3.1.ebuild 1758 BLAKE2B a4105ef73d07a7f8c5796b8457fdf417ad1dd30f8ff4444eaa064e8a36501c56379eaae07725be98b66776ad9777a66e0844ae625cc1f486d547d49ab13acfbd SHA512 c05e0e1fb1d05178001948a8be071326cac3e7b1e75afdfa22512e498d97603eb6ab6d4b1fcc791388e69170f93bcd493bc41eaf6d8108c50da50f85c371a38c
+EBUILD elasticsearch-6.3.1-r1.ebuild 2106 BLAKE2B fab4c1d557642ef3cb4728e297a5e95e0752272a19180d5febb7d2a4b5a3174533840d37e9aaa43cb931f278ff25e93d8dcdc200b03c2bbcc94b7e61608def1b SHA512 315019c24210c3f28f3e8359c5a2cabc2f3efa005ebf3e812b0539ad1a4b6af81ffa47d79ec7a76b26766f65babbd944d55556004b8f4d95c2027d4179c5a2e2
MISC metadata.xml 493 BLAKE2B 8149c45c1eb86d156ec0a32f016e8eed79d8e8fb7b6f0294ad606eebe9c63208e3d450796cdfc123fb7b2b2bcd10ff0cf23f2b6d2a99c177cb1e795965984892 SHA512 ce03769abc314d3bf561ff5820a8c8582196e9e6755e1e695dcf1224afbc04b609fdec7a1499d2d7a3aa0a350ad9fea94e0e3b46eff7c3c6150a524edd28d399
diff --git a/app-misc/elasticsearch/elasticsearch-6.3.1.ebuild b/app-misc/elasticsearch/elasticsearch-6.3.1-r1.ebuild
index f3e63754b4a0..1a6bec30a73a 100644
--- a/app-misc/elasticsearch/elasticsearch-6.3.1.ebuild
+++ b/app-misc/elasticsearch/elasticsearch-6.3.1-r1.ebuild
@@ -55,8 +55,9 @@ src_install() {
newconfd "${FILESDIR}/${PN}.conf.3" ${PN}
newinitd "${FILESDIR}/${PN}.init.4" ${PN}
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
- systemd_newunit "${FILESDIR}"/${PN}.service.2 ${PN}.service
+ systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
}
pkg_postinst() {
@@ -66,7 +67,11 @@ pkg_postinst() {
elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
elog
elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
- elog "from /etc/elasticsearch into the configuration directory of the instance:"
+ elog "from /etc/${PN} into the configuration directory of the instance:"
elog "/etc/${PN}/instance"
elog
+ ewarn "Please make sure you have proper permissions on /etc/${PN}"
+ ewarn "prior to keystore generation or you may experience startup fails."
+ ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+ ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
}
diff --git a/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec b/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec
index a51d639bf7d4..30f773638d37 100755
--- a/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec
+++ b/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec
@@ -5,3 +5,8 @@ if [ ! -z "$CONF_FILE" ]; then
echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
exit 1
fi
+
+# fails to start without keystore
+if [ ! -f "${ES_PATH_CONF}/elasticsearch.keystore" ]; then
+ "${ES_HOME}/bin/elasticsearch-keystore" create
+fi
diff --git a/app-misc/elasticsearch/files/elasticsearch.service.3 b/app-misc/elasticsearch/files/elasticsearch.service.3
new file mode 100644
index 000000000000..69d3550e7d98
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service.3
@@ -0,0 +1,51 @@
+[Unit]
+Description=Elasticsearch
+Documentation=https://www.elastic.co
+Wants=network.target
+After=network.target
+
+[Service]
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
+Environment=DATA_DIR=/var/lib/elasticsearch
+Environment=LOG_DIR=/var/log/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
+ -p ${PID_DIR}/elasticsearch.pid \
+ -Epath.logs=${LOG_DIR} \
+ -Epath.data=${DATA_DIR}
+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65536
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch
+#LimitMEMLOCK=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# 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/app-misc/elasticsearch/files/elasticsearch.service.conf b/app-misc/elasticsearch/files/elasticsearch.service.conf
new file mode 100644
index 000000000000..489f8c42c04d
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service.conf
@@ -0,0 +1,6 @@
+[Service]
+Environment="ES_HOME=/usr/share/elasticsearch"
+Environment="ES_PATH_CONF=/etc/elasticsearch"
+Environment="DATA_DIR=/var/lib/elasticsearch"
+Environment="LOG_DIR=/var/log/elasticsearch"
+Environment="PID_DIR=/run/elasticsearch"