elasticsearch/distribution/packages
Ryan Ernst b9c504b892
Replace most shell script logic with Java (#85758)
Elasticsearch provides several command line tools, as well as the main script to start elasticsearch. While most of the logic is abstracted away for cli tools, the main elasticsearch script has hundreds of lines of platform specific shell code. That code is difficult to maintain because it uses many special shell features which then must also exist in other platforms (ie windows batch files). Additionally, the logic in these scripts are not easy to test, we must be on the actual platform and test with a full installation of Elasticsearch, which is relatively slow (compared to most in process tests).

This commit replaces logic of the main server script, as well as the windows service management script, with Java. The new entrypoints use the CliToolLauncher. The server cli figures out all the jvm options and such necessary, then launches the real server process. If run in the foreground, the launcher will stay alive for the lifetime of Elasticsearch; the streams are effectively inherited so all output from Elasticsearch still goes to the console. If daemonizing, the launcher waits around until Elasticsearch is "ready" (this means the Node startup completed), then detaches and exits.

Co-authored-by: William Brafford <william.brafford@elastic.co>
2022-05-19 08:29:08 -07:00
..
aarch64-deb Introduce aarch64 packaging (#53914) 2020-03-21 18:03:20 -04:00
aarch64-rpm Introduce aarch64 packaging (#53914) 2020-03-21 18:03:20 -04:00
deb Build: Consolidate archives and packages configuration (#28760) 2018-02-21 17:46:40 -08:00
rpm Build: Consolidate archives and packages configuration (#28760) 2018-02-21 17:46:40 -08:00
src Replace most shell script logic with Java (#85758) 2022-05-19 08:29:08 -07:00
build.gradle Update nebula plugins improving configuration cache support (#85316) 2022-03-24 13:55:54 +01:00