elk: 6.5.1 -> 6.7.1
This commit is contained in:
parent
f3a5c0e671
commit
7062a073e8
7 changed files with 22 additions and 38 deletions
|
@ -2,6 +2,8 @@
|
|||
config ? {},
|
||||
pkgs ? import ../.. { inherit system config; },
|
||||
enableUnfree ? false
|
||||
# To run the test on the unfree ELK use the folllowing command:
|
||||
# NIXPKGS_ALLOW_UNFREE=1 nix-build nixos/tests/elk.nix -A ELK-6 --arg enableUnfree true
|
||||
}:
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
, makeWrapper
|
||||
, fetchzip
|
||||
, fetchurl
|
||||
, nodejs
|
||||
, nodejs-10_x
|
||||
, coreutils
|
||||
, which
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
nodejs = nodejs-10_x;
|
||||
inherit (builtins) elemAt;
|
||||
info = splitString "-" stdenv.hostPlatform.system;
|
||||
arch = elemAt info 0;
|
||||
|
@ -18,26 +19,14 @@ let
|
|||
shas =
|
||||
if enableUnfree
|
||||
then {
|
||||
"x86_64-linux" = "0lip4bj3jazv83gydw99dnp03cb0fd1p4z3lvpjbisgmqffbbg5v";
|
||||
"x86_64-darwin" = "0hjdnqagcwbjhpcfyr6w0zmy4sjnx4fyp79czb0vp7dig5arnwm3";
|
||||
"x86_64-linux" = "039ll00kvrp881cyybb04z90cw68j7p5cspgdxh0bky9lyi9qpwb";
|
||||
"x86_64-darwin" = "0qrakrihcjwn9dic77b0k9ja3zf6nbz534v76xid9gv20md5dds3";
|
||||
}
|
||||
else {
|
||||
"x86_64-linux" = "1jybn4q7pz61iijzl85d948szlacfcbldn2nhhsb6063xwvf30sa";
|
||||
"x86_64-darwin" = "1bl1h6hgp9l5cjq6pzj2x855wjaka8hbs0fn2c03lbzsc991dppr";
|
||||
"x86_64-linux" = "1v1fbmfkbnlx043z3yx02gaqqy63bj2ymvcby66n4qq0vlpahvwx";
|
||||
"x86_64-darwin" = "1y4q7a2b9arln94d6sj547qkv3258jlgcz9b342fh6khlbpfjb8c";
|
||||
};
|
||||
|
||||
# For the correct phantomjs version see:
|
||||
# https://github.com/elastic/kibana/blob/master/x-pack/plugins/reporting/server/browsers/phantom/paths.js
|
||||
phantomjs = rec {
|
||||
name = "phantomjs-${version}-linux-x86_64";
|
||||
version = "2.1.1";
|
||||
src = fetchzip {
|
||||
inherit name;
|
||||
url = "https://github.com/Medium/phantomjs/releases/download/v${version}/${name}.tar.bz2";
|
||||
sha256 = "0g2dqjzr2daz6rkd6shj6rrlw55z4167vqh7bxadl8jl6jk7zbfv";
|
||||
};
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "kibana-${optionalString (!enableUnfree) "oss-"}${version}";
|
||||
version = elk6Version;
|
||||
|
@ -48,7 +37,7 @@ in stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
patches = [
|
||||
# Kibana specifies it specifically needs nodejs 8.11.4 but nodejs in nixpkgs is at 8.12.0.
|
||||
# Kibana specifies it specifically needs nodejs 10.15.2 but nodejs in nixpkgs is at 10.15.3.
|
||||
# The <nixpkgs/nixos/tests/elk.nix> test succeeds with this newer version so lets just
|
||||
# disable the version check.
|
||||
./disable-nodejs-version-check.patch
|
||||
|
@ -63,13 +52,6 @@ in stdenv.mkDerivation rec {
|
|||
makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \
|
||||
--prefix PATH : "${stdenv.lib.makeBinPath [ nodejs coreutils which ]}"
|
||||
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
|
||||
'' +
|
||||
# phantomjs is needed in the unfree version. When phantomjs doesn't exist in
|
||||
# $out/libexec/kibana/data kibana will try to download and unpack it during
|
||||
# runtime which will fail because the nix store is read-only. So we make sure
|
||||
# it already exist in the nix store.
|
||||
optionalString enableUnfree ''
|
||||
ln -s ${phantomjs.src} $out/libexec/kibana/data/${phantomjs.name}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec {
|
|||
owner = "elastic";
|
||||
repo = "beats";
|
||||
rev = "v${version}";
|
||||
sha256 = "1qnrq9bhk7csgcxycb8c7975lq0p7cxw29i6sji777zv4hn7442m";
|
||||
sha256 = "0n1sjngc82b7wysw5aaiqvllq4c8rx2jj7khw4vrypc40f8ahjs5";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/elastic/beats";
|
||||
|
|
|
@ -19,20 +19,20 @@ stdenv.mkDerivation (rec {
|
|||
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
|
||||
sha256 =
|
||||
if enableUnfree
|
||||
then "096i8xiy7mfwlslym9mkjb2f5vqdcqhk65583526rcybqxc2zkqp"
|
||||
else "0j3q02c4rw8272w07hm64sk5ssmj4gj8s3qigsbrq5pgf8b03fvs";
|
||||
then "1qh6iz3qhw8zcvxfss5w3h89zarwvk6dp5bbbag7c30kh94gkqvv"
|
||||
else "13v8qpslanfn5w81qvbg0aqh510yfbl3x59kisvdkz9ifhjbcavi";
|
||||
};
|
||||
|
||||
patches = [ ./es-home-6.x.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bin/elasticsearch-env --replace \
|
||||
"ES_CLASSPATH=\"\$ES_HOME/lib/\*\"" \
|
||||
"ES_CLASSPATH=\"\$ES_HOME/lib/*\"" \
|
||||
"ES_CLASSPATH=\"$out/lib/*\""
|
||||
|
||||
substituteInPlace bin/elasticsearch-cli --replace \
|
||||
"ES_CLASSPATH=\"\$ES_CLASSPATH:\$ES_HOME/\$additional_classpath_directory/\*\"" \
|
||||
"ES_CLASSPATH=\"\$ES_CLASSPATH:$out/\$additional_classpath_directory/\*\""
|
||||
"ES_CLASSPATH=\"\$ES_CLASSPATH:\$ES_HOME/\$additional_classpath_directory/*\"" \
|
||||
"ES_CLASSPATH=\"\$ES_CLASSPATH:$out/\$additional_classpath_directory/*\""
|
||||
'';
|
||||
|
||||
buildInputs = [ makeWrapper jre_headless utillinux ]
|
||||
|
|
|
@ -27,7 +27,7 @@ in {
|
|||
version = "${elk6Version}";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vhyza/elasticsearch-analysis-lemmagen/releases/download/v${version}/${name}-plugin.zip";
|
||||
sha256 = "0299ldqwjn1gn44yyjiqjrxvs6mlclhzl1dbn6xlgg1a2lkaal4v";
|
||||
sha256 = "0mf8lpf40bjpzfj9lkhrg7c3xinzvg7aby3vd6h92g9i676xs8ri";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/vhyza/elasticsearch-analysis-lemmagen;
|
||||
|
@ -42,7 +42,7 @@ in {
|
|||
version = "${elk6Version}";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-${elk6Version}.zip";
|
||||
sha256 = "1mg9knbc4r21kaiqnmkd8nzf2i23w5zxqnxyz484q0l2jf4hlkq1";
|
||||
sha256 = "05z4vmi29fzfqzid7fdh6h6pjwgd1dz1mhhjgjz9plpvpzymjiln";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2;
|
||||
|
@ -54,10 +54,10 @@ in {
|
|||
search_guard = esPlugin rec {
|
||||
name = "elastic-search-guard-${version}";
|
||||
pluginName = "search-guard";
|
||||
version = "${elk6Version}-23.2";
|
||||
version = "${elk6Version}-24.3";
|
||||
src = fetchurl rec {
|
||||
url = "mirror://maven/com/floragunn/search-guard-6/${version}/search-guard-6-${version}.zip";
|
||||
sha256 = "05310wyxzhylxr0dfgzr10pb0pak30ry8r97g49n6iqj8dw3csnb";
|
||||
sha256 = "17gif45fbi4vj9qrzv075fkr7d2sp0naa5bjjj9gvfgqyl2flj7g";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/floragunncom/search-guard;
|
||||
|
|
|
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
|||
url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
|
||||
sha256 =
|
||||
if enableUnfree
|
||||
then "01mkb9fr63m3ilp4cbbjccid5m8yc7iqhnli12ynfabsf7302fdz"
|
||||
else "0r60183yyywabinsv9pkd8sx0wq68h740xi3172fypjfdcqs0g9c";
|
||||
then "18j2n6gnhfjmb6skhhrzs0d1zwa1aj9jv37rqvg4w3fimnm8p0sh"
|
||||
else "181x8y6izrh587a6d1qipgj8wk71v4fggypkzjkns4my00nki42y";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
|
|
@ -2549,7 +2549,7 @@ in
|
|||
|
||||
# The latest version used by elasticsearch, logstash, kibana and the the beats from elastic.
|
||||
elk5Version = "5.6.9";
|
||||
elk6Version = "6.5.1";
|
||||
elk6Version = "6.7.1";
|
||||
|
||||
elasticsearch5 = callPackage ../servers/search/elasticsearch/5.x.nix { };
|
||||
elasticsearch6 = callPackage ../servers/search/elasticsearch { };
|
||||
|
|
Loading…
Reference in a new issue