diff options
author | Eric Liu | 2019-03-26 21:53:32 -0400 |
---|---|---|
committer | Eric Liu | 2019-03-26 21:53:32 -0400 |
commit | 4afb297016b45f12a40bbfe9e3916e324cfb18d4 (patch) | |
tree | 2a1639697212b0af808cef45cfd998b736c547e9 | |
download | aur-4afb297016b45f12a40bbfe9e3916e324cfb18d4.tar.gz |
initial commit for ELK with xpack
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | kibana.service | 15 | ||||
-rw-r--r-- | tmpfile.conf | 5 | ||||
-rw-r--r-- | user.conf | 1 |
5 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d0a2bd8ad938 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = kibana-xpack + pkgdesc = Browser based analytics and search dashboard for Elasticsearch + pkgver = 6.6.2 + pkgrel = 1 + url = https://www.elastic.co/products/kibana + arch = any + license = Apache + depends = nodejs + optdepends = elasticsearch + provides = kibana + conflicts = kibana + options = !strip + options = emptydirs + backup = etc/kibana/kibana.yml + source = https://artifacts.elastic.co/downloads/kibana/kibana-6.6.2-linux-x86_64.tar.gz + source = kibana.service + source = tmpfile.conf + source = user.conf + sha512sums = 9cc392c5f3de3b340a15903b2f0472405e6a6ea209a9b101a9d573aa304774c516f617b7a2c64f2a9523d74f5f3c847e16f6d7c81cc65d8b17bbed268bbb7065 + sha512sums = 3216c2864cf184cea0883677a05bf83cf396fda52dbd3d9a187de22f0c45d13db58f8fb4dc926694ba7d7a24000cf6d5f6218805f74fb5d729fc85c643ca8f2f + sha512sums = afed49c164561f3c658a6d2423519adcf4d5293c416cd93fa5c9d12421416c1e9cb4287e832009049cfd014b365dc1cd93d9cf879117c701cce4caad3b772a8e + sha512sums = 9085884430c656cc68b855c3d6740e5fd0854a8785930341b29e15e201deacc1870d8223255d9ebe096cb111319bea9bf4faa03d0760d5819976ebf912221c7d + +pkgname = kibana-xpack + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ecbdd02e01ff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Eric Liu <eric@hnws.me> +# Official repo maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Official repo maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# Official repo Contributor: Spider.007 <archlinux AT spider007 DOT net> + +pkgname=kibana-xpack +relpkgname=kibana +pkgver=6.6.2 +pkgrel=1 +pkgdesc='Browser based analytics and search dashboard for Elasticsearch' +url='https://www.elastic.co/products/kibana' +arch=('any') +license=('Apache') +depends=('nodejs') +optdepends=('elasticsearch') +provides=('kibana') +conflicts=('kibana') +backup=('etc/kibana/kibana.yml') +options=('!strip' 'emptydirs') +source=(https://artifacts.elastic.co/downloads/$relpkgname/$relpkgname-${pkgver}-linux-x86_64.tar.gz + kibana.service + tmpfile.conf + user.conf) +sha512sums=('9cc392c5f3de3b340a15903b2f0472405e6a6ea209a9b101a9d573aa304774c516f617b7a2c64f2a9523d74f5f3c847e16f6d7c81cc65d8b17bbed268bbb7065' + '3216c2864cf184cea0883677a05bf83cf396fda52dbd3d9a187de22f0c45d13db58f8fb4dc926694ba7d7a24000cf6d5f6218805f74fb5d729fc85c643ca8f2f' + 'afed49c164561f3c658a6d2423519adcf4d5293c416cd93fa5c9d12421416c1e9cb4287e832009049cfd014b365dc1cd93d9cf879117c701cce4caad3b772a8e' + '9085884430c656cc68b855c3d6740e5fd0854a8785930341b29e15e201deacc1870d8223255d9ebe096cb111319bea9bf4faa03d0760d5819976ebf912221c7d') + +prepare() { + cd $relpkgname-${pkgver}-linux-x86_64 + + # remove nodejs strict version requirements + sed "s@^require('./node_version_validator');@// \0@" -i src/setup_node_env/index.js + + # set default quiet mode for systemd, cli option forces specified values + sed -r 's|#(logging.quiet:) false|\1 true|' -i config/kibana.yml +} + +package() { + cd $relpkgname-${pkgver}-linux-x86_64 + + install -dm 755 "${pkgdir}/usr/share/kibana" + cp -a * "${pkgdir}/usr/share/kibana" + + install -dm 750 "${pkgdir}/etc/kibana" + install -Dm 640 config/kibana.yml -t "${pkgdir}/etc/kibana" + install -Dm 644 "${srcdir}/kibana.service" -t "${pkgdir}/usr/lib/systemd/system" + install -Dm 644 "${srcdir}/user.conf" "${pkgdir}/usr/lib/sysusers.d/kibana.conf" + install -Dm 644 "${srcdir}/tmpfile.conf" "${pkgdir}/usr/lib/tmpfiles.d/kibana.conf" + + rm -r "${pkgdir}/usr/share/kibana/node" + find "${pkgdir}/usr/share/kibana/node_modules" -type d -empty -delete +} + +# vim: ts=2 sw=2 et: diff --git a/kibana.service b/kibana.service new file mode 100644 index 000000000000..59fec9ed1302 --- /dev/null +++ b/kibana.service @@ -0,0 +1,15 @@ +[Unit] +Description=Kibana - dashboard for Elasticsearch +After=network.target elasticsearch.service + +[Service] +User=kibana +Group=kibana +Environment="NODE_ENV=production" +ExecStart=/usr/bin/node --max-old-space-size=512 /usr/share/kibana/src/cli --config=/etc/kibana/kibana.yml +PrivateTmp=true +NoNewPrivileges=true +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/tmpfile.conf b/tmpfile.conf new file mode 100644 index 000000000000..4f05d14ddd2f --- /dev/null +++ b/tmpfile.conf @@ -0,0 +1,5 @@ +d /etc/kibana 0750 kibana kibana - +Z /etc/kibana/kibana.yml 0640 kibana kibana - +d /usr/share/kibana 0755 kibana kibana - +Z /usr/share/kibana/optimize - kibana kibana - +Z /usr/share/kibana/data - kibana kibana - diff --git a/user.conf b/user.conf new file mode 100644 index 000000000000..4abe821ffe2d --- /dev/null +++ b/user.conf @@ -0,0 +1 @@ +u kibana 206 "Kibana user" /usr/share/kibana |