Many scripts are used to start/stop and install/uninstall elasticsearch. These scripts share a lot of configuration properties like directory paths, max value for a setting, default user etc. Most of the values are identical but some of them are different depending of the platform (Debian-based or Redhat-based OS), depending of the way elasticsearch is started (shell script, systemd, sysv-init...) or the way it is installed (zip, rpm, deb...). Today the values are duplicated in multiple places, making it difficult to maintain the scripts or to update a value.
This pull request make this more uniform: values used in scripts must be defined in a common packaging.properties file. Each value can be overridden in another specific packaging.properties file for Debian or Redhat. All startup and installation scripts are filtered with the common then the custom packaging.properties files before being packaged as a zip/tar.gz/rpm/dpkf archive.
Break-out common functionality between elasticsearch.bat and service.bat
Relates #8237
(cherry picked from commit 87095e79534bcef97b2b275322c924bd96b34e3b)
When launching multiple nodes in MS Windows env, batch command window does not come by default with any title.
This patch add `Elasticsearch VERSION` as a title, where VERSION is the current elasticsearch version.
Same for `plugin.bat` and `service.bat`.
Closes#6336Closes#6752
We don't rely upon GC to cleanup mappedbytebuffers, we unmap them
explicitly on close in lucene. But the JDK has crazy loops with
explicit GCs in exceptional cases to try to force unmapping.
In general we don't want any of our code or library code calling
this method: so its banned in forbidden-apis as well.
* Clean up s/ElasticSearch/Elasticsearch on docs/*
* Clean up s/ElasticSearch/Elasticsearch on src/* bin/* & pom.xml
* Clean up s/ElasticSearch/Elasticsearch on NOTICE.txt and README.textile
Closes#4634
fix handling of non-empty JAVA_OPTS
remove usage of if/else that can be tripped by parenthesis in the variable
fixes#4127closes#4086
(cherry picked from commit fb44e9aef76026f2269f1fdc8832a44f8c76ec8f)
remove usage of if and () blocks as they clashed with user paths containing ()
postpone quotation of variables to prevent double escaping ("")
fix#3906
(cherry picked from commit 1cc095ec32a5b623f88c312f497ac5469887be97)
service.bat converts X(m(s|x)|ss) to MB/KB and uses dedicated arguments to the underlying JVM DLL
empty/unset JAVA_OPTS no longer trips commons daemon
fixes#3785
use service id for pid name
disable filtering on *.exe (caused corruption)
rename exe names and add more options to .bat
start/stop operations are now supported (and expected to be called) by service.bat
add more variables from the env to customize default behavior prior to installing the service
add manager option
fixes regarding batch flow
specify service id in description
minor readability improvement
include .exe only in ZIP archive
rename x64 service id to make it work out of the box
add elasticsearch as a service for Windows platforms
based on Apace Commons Daemon
supports both x64 and x86