Import x-pack 6.2.4, extensions pack for Elastic Stack
ok sthen@, sebastia@
This commit is contained in:
parent
0c5e5ff6d1
commit
a4b9224c72
41
sysutils/x-pack/Makefile
Normal file
41
sysutils/x-pack/Makefile
Normal file
@ -0,0 +1,41 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2018/05/17 11:08:38 pvk Exp $
|
||||
|
||||
COMMENT = extensions for Elastic Stack
|
||||
|
||||
DISTNAME = x-pack-6.2.4
|
||||
CATEGORIES = sysutils
|
||||
|
||||
HOMEPAGE = https://www.elastic.co/products/x-pack
|
||||
|
||||
MAINTAINER = Pavel Korovin <pvk@openbsd.org>
|
||||
|
||||
# Elastic license
|
||||
# https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE.txt
|
||||
PERMIT_PACKAGE_CDROM = Elastic license
|
||||
PERMIT_PACKAGE_FTP = Elastic license
|
||||
PERMIT_DISTFILES_FTP = Elastic license
|
||||
|
||||
MASTER_SITES = https://artifacts.elastic.co/downloads/packs/x-pack/
|
||||
EXTRACT_SUFX = .zip
|
||||
|
||||
BUILD_DEPENDS = archivers/zip
|
||||
NO_TEST = Yes
|
||||
|
||||
PKG_ARCH = *
|
||||
WRKDIST = ${WRKDIR}
|
||||
|
||||
do-build:
|
||||
rm ${WRKSRC}/elasticsearch/{core,security,watcher}/bin/*.bat
|
||||
rm -r ${WRKSRC}/elasticsearch/ml/platform/*
|
||||
rm ${WRKSRC}/kibana/x-pack/index.js.orig
|
||||
rm -r ${WRKSRC}/kibana/x-pack/plugins/reporting/{.chromium,.phantom}
|
||||
sed -i 's,#!/bin/bash,#!/usr/bin/env bash,' \
|
||||
${WRKSRC}/elasticsearch/{core,security,watcher}/bin/*
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/x-pack/
|
||||
@cd ${WRKSRC} && zip --move -qr \
|
||||
${PREFIX}/share/x-pack/${DISTNAME}${EXTRACT_SUFX} \
|
||||
elasticsearch kibana logstash
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/x-pack/distinfo
Normal file
2
sysutils/x-pack/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (x-pack-6.2.4.zip) = HPv8LNK1WHFTDDZB9lproJHh8geXolUZ8a3i+lwkxrY=
|
||||
SIZE (x-pack-6.2.4.zip) = 309419696
|
21
sysutils/x-pack/patches/patch-kibana_x-pack_index_js
Normal file
21
sysutils/x-pack/patches/patch-kibana_x-pack_index_js
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-kibana_x-pack_index_js,v 1.1.1.1 2018/05/17 11:08:38 pvk Exp $
|
||||
|
||||
Index: kibana/x-pack/index.js
|
||||
--- kibana/x-pack/index.js.orig
|
||||
+++ kibana/x-pack/index.js
|
||||
@@ -1,7 +1,6 @@
|
||||
import { xpackMain } from './plugins/xpack_main';
|
||||
import { graph } from './plugins/graph';
|
||||
import { monitoring } from './plugins/monitoring';
|
||||
-import { reporting } from './plugins/reporting';
|
||||
import { security } from './plugins/security';
|
||||
import { searchprofiler } from './plugins/searchprofiler';
|
||||
import { ml } from './plugins/ml';
|
||||
@@ -19,7 +18,6 @@ module.exports = function (kibana) {
|
||||
xpackMain(kibana),
|
||||
graph(kibana),
|
||||
monitoring(kibana),
|
||||
- reporting(kibana),
|
||||
security(kibana),
|
||||
searchprofiler(kibana),
|
||||
ml(kibana),
|
4
sysutils/x-pack/pkg/DESCR
Normal file
4
sysutils/x-pack/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
X-Pack is an Elastic Stack extension that bundles security, alerting,
|
||||
monitoring, reporting, and graph capabilities into one easy-to-install package.
|
||||
While the X-Pack components are designed to work together seamlessly,
|
||||
you can easily enable or disable the features you want to use.
|
4
sysutils/x-pack/pkg/PLIST
Normal file
4
sysutils/x-pack/pkg/PLIST
Normal file
@ -0,0 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/05/17 11:08:38 pvk Exp $
|
||||
share/doc/pkg-readmes/${FULLPKGNAME}
|
||||
share/x-pack/
|
||||
share/x-pack/x-pack-6.2.4.zip
|
87
sysutils/x-pack/pkg/README
Normal file
87
sysutils/x-pack/pkg/README
Normal file
@ -0,0 +1,87 @@
|
||||
$OpenBSD: README,v 1.1.1.1 2018/05/17 11:08:38 pvk Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running Elastic X-Pack on OpenBSD
|
||||
+-----------------------------------------------------------------------
|
||||
|
||||
${FULLPKGNAME} is a repack of the official Elastic X-Pack distribution
|
||||
with some workarounds required to make it work on OpenBSD:
|
||||
|
||||
- Fixed shell path in bash scripts
|
||||
- Disabled Kibana reporting plugin due to node.js version incompatibility
|
||||
|
||||
Useless content such as Windows *.bat scripts and platform-specific binaries
|
||||
for Chrome, Phantomjs and ML-related files was removed.
|
||||
|
||||
Limitations
|
||||
===========
|
||||
1. Elastic products are not supported on OpenBSD, leaving X-Pack usable for
|
||||
either testing (with 30-days trial license) or for setups with features
|
||||
provided by free basic license (annual, renewable via e-mail registration).
|
||||
Support matrix: https://www.elastic.co/support/matrix#matrix_os
|
||||
Subscription types: https://www.elastic.co/subscriptions
|
||||
2. Machine learning and reporting features are not available for OpenBSD.
|
||||
|
||||
X-Pack Installation for Elasticsearch
|
||||
=====================================
|
||||
X-Pack plugin installation script requires ${SYSCONFDIR}/elasticsearch
|
||||
folder to be owned by user who installs X-Pack, i.e. _elasticsearch.
|
||||
|
||||
In OpenBSD, ${SYSCONFDIR}/elasticsearch is owned by root._elasticsearch.
|
||||
To avoid errors, change ${SYSCONFDIR}/elasticsearch owner to _elasticsearch
|
||||
before X-Pack installation and change it back to root after:
|
||||
|
||||
# rcctl stop elasticsearch
|
||||
# chown _elasticsearch ${SYSCONFDIR}/elasticsearch
|
||||
# doas -u _elasticsearch \
|
||||
${LOCALBASE}/elasticsearch/bin/elasticsearch-plugin install \
|
||||
file://${TRUEPREFIX}/share/x-pack/${FULLPKGNAME}.zip
|
||||
# chown root ${SYSCONFDIR}/elasticsearch
|
||||
|
||||
Machine learning features are not available for OpenBSD, so after X-Pack plugin
|
||||
installation, uncomment the following line in ${SYSCONFDIR}/elasticsearch/elasticsearch.yml:
|
||||
|
||||
#xpack.ml.enabled: false
|
||||
|
||||
Start elasticsearch and generate default passwords:
|
||||
|
||||
# rcctl start elasticsearch
|
||||
# doas -u _elasticsearch \
|
||||
${TRUEPREFIX}/elasticsearch/bin/x-pack/setup-passwords auto
|
||||
|
||||
Note the passwords for elastic and kibana users.
|
||||
|
||||
X-Pack Installation for Kibana
|
||||
==============================
|
||||
Stop Kibana and install X-Pack:
|
||||
|
||||
# rcctl stop kibana
|
||||
# doas -u _kibana \
|
||||
${LOCALBASE}/kibana/bin/kibana-plugin install \
|
||||
file://${TRUEPREFIX}/share/x-pack/${FULLPKGNAME}.zip
|
||||
|
||||
Add credentials generated in step 2 to ${SYSCONFDIR}/kibana/kibana.yml:
|
||||
|
||||
elasticsearch.username: "kibana"
|
||||
elasticsearch.password: "<pwd>"
|
||||
|
||||
Start Kibana:
|
||||
|
||||
# rcctl start kibana
|
||||
|
||||
Log in as the built-in elastic user with the auto-generated password
|
||||
from step 2.
|
||||
|
||||
X-Pack Installation for Logstash
|
||||
================================
|
||||
Stop Logstash and install X-Pack:
|
||||
|
||||
# rcctl stop logstash
|
||||
# doas -u _logstash \
|
||||
${LOCALBASE}/logstash/bin/logstash-plugin install \
|
||||
file://${TRUEPREFIX}/share/x-pack/${FULLPKGNAME}.zip
|
||||
|
||||
Add credentials generated in step 2 to ${SYSCONFDIR}/logstash/logstash.yml:
|
||||
|
||||
xpack.monitoring.elasticsearch.username: logstash_system
|
||||
xpack.monitoring.elasticsearch.password: <pwd>
|
Loading…
x
Reference in New Issue
Block a user