Merge pull request #36456 from LumiGuide/elk-5.6.8_and_6.2.2

ELK 5.6.9 & 6.2.4 & fixes for elasticsearch6 and logstash6 not starting up
This commit is contained in:
adisbladis 2018-04-18 11:23:12 +08:00 committed by GitHub
commit a5ae3b5731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 17 deletions

View File

@ -32,8 +32,11 @@ let
(if es5 then (pkgs.writeTextDir "log4j2.properties" cfg.logging)
else (pkgs.writeTextDir "logging.yml" cfg.logging))
];
# Elasticsearch 5.x won't start when the scripts directory does not exist
postBuild = if es5 then "${pkgs.coreutils}/bin/mkdir -p $out/scripts" else "";
postBuild = concatStringsSep "\n" (concatLists [
# Elasticsearch 5.x won't start when the scripts directory does not exist
(optional es5 "${pkgs.coreutils}/bin/mkdir -p $out/scripts")
(optional es6 "ln -s ${cfg.package}/config/jvm.options $out/jvm.options")
]);
};
esPlugins = pkgs.buildEnv {

View File

@ -11,9 +11,9 @@ let
elasticArch = archOverrides."${arch}" or arch;
plat = elemAt info 1;
shas = {
"x86_64-linux" = "1a9n7s9r0klqvpyr5d3a410cchbsb0syx6cqwbhhnihqyw8dcx1i";
"i686-linux" = "0snnm5jwynvk6ahgl42yzl2jhld0ykn79rlcq9dsv2gpqnjb2mmv";
"x86_64-darwin" = "0qw3xkj3n3aja8s8n9r4hbr65jm9m6dgfjhhnrln434648rx7z4v";
"x86_64-linux" = "1rg4j5jm8mkscrwlbx5qk3qjnblyr8z9x5npvyi73zm0ism0gv4j";
"i686-linux" = "14swgx9sf23pns2pj30yyhd0p0rnykdimdrnj8rb0r1pqszw57qx";
"x86_64-darwin" = "10l13r47nx74xicnjgb56nvgvx2al1zx1p8f09pjldaa2gjlll2k";
};
in stdenv.mkDerivation rec {
name = "kibana-${version}";

View File

@ -7,8 +7,8 @@ let
arch = elemAt info 0;
plat = elemAt info 1;
shas = {
"x86_64-linux" = "0kgsafjn8wzrmiklfc8jg0h3cx25lhlkby8yz35wgpx4wbk3vfjx";
"x86_64-darwin" = "0i2kq9vyjv151kk7h3dl3hjrqqgxsg0qqxdqwjwlz9ja5axzlxhd";
"x86_64-linux" = "1br9nvwa3i5sfcbnrxp2x3dxxnsbs9iavz6zwgw0jlh5ngf5vysk";
"x86_64-darwin" = "1w4dck02i0rrl8m18kvy2zz02cb7bb9a2pdhkd1jfy1qz4ssnhii";
};
in stdenv.mkDerivation rec {
name = "kibana-${version}";

View File

@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec {
owner = "elastic";
repo = "beats";
rev = "v${version}";
sha256 = "0ri2l8pyl1fnx0zypliwprkk1wkaxz8ywkgz8h2f08v7h1zgq1m6";
sha256 = "00g90i58c6gnyzszsx7y75vn1350hrkzrsb50xx700jqg9ii8yin";
};
goPackagePath = "github.com/elastic/beats";

View File

@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec {
owner = "elastic";
repo = "beats";
rev = "v${version}";
sha256 = "05ay6hdc1jgi6b00bd998zc39ca8jhnk7i6m3mw70s0baqv1scik";
sha256 = "194z3j9zwlbc6j97iy1m1cl0xqks3ws2bjp2xrgy8cwpi7fclaw2";
};
goPackagePath = "github.com/elastic/beats";

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
sha256 = "0wjjvzjbdgdv9qznk1b8dx63zgs7s6jnrrbrnd5dn27lhymxiwpl";
sha256 = "0sm99m4m4mmigj6ll22kyaw7zkp1s2i0mhzx15fzidnybdnlifb4";
};
patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
sha256 = "03xwd8r0l0a29wl6wrp4bh7xr1b79q2rqfmsq3d5k35pv85sw3lw";
sha256 = "13hf00khq33yw6zv022vcrsf6vm43isx40x7ww8r1lqx3vmg3rli";
};
patches = [ ./es-home-6.x.patch ];
@ -27,8 +27,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/elasticsearch \
--prefix PATH : "${utillinux}/bin/" \
--set JAVA_HOME "${jre_headless}" \
--set ES_JVM_OPTIONS "$out/config/jvm.options"
--set JAVA_HOME "${jre_headless}"
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
'';

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
sha256 = "0cpim121ydxdjr251by9jw6pidh5b52jl5ldcm7gp015q49x1nl7";
sha256 = "0qcq4c4nysdscbjrikhw653xwbi4dwscynjzyndsp8l21vl81x7p";
};
dontBuild = true;

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
sha256 = "18680qpdvhr16dx66jfia1zrg52005sgdy9yhl7vdhm4gcr7pxwc";
sha256 = "07j3jjg5ik4gjgvcx15qqqas9p1m3815jml82a5r1ip9l6vc4h20";
};
dontBuild = true;
@ -22,6 +22,9 @@ stdenv.mkDerivation rec {
mkdir -p $out
cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out
patchShebangs $out/bin/logstash
patchShebangs $out/bin/logstash-plugin
wrapProgram $out/bin/logstash \
--set JAVA_HOME "${jre}"

View File

@ -2122,8 +2122,8 @@ with pkgs;
evemu = callPackage ../tools/system/evemu { };
# The latest version used by elasticsearch, logstash, kibana and the the beats from elastic.
elk5Version = "5.6.6";
elk6Version = "6.1.2";
elk5Version = "5.6.9";
elk6Version = "6.2.4";
elasticsearch = callPackage ../servers/search/elasticsearch { };
elasticsearch2 = callPackage ../servers/search/elasticsearch/2.x.nix { };