summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2019-02-08 16:57:06 -0600
committerWilliam Hubbs <williamh@gentoo.org>2019-02-08 16:58:30 -0600
commitbf49e1470410272837f8d5b11338bbbd93390f4f (patch)
tree62506da06a22c7e0138e74536cd74b16666e892f /www-apps
parentdev-vcs/git-lfs: Drop old (diff)
downloadgentoo-bf49e1470410272837f8d5b11338bbbd93390f4f.tar.gz
gentoo-bf49e1470410272837f8d5b11338bbbd93390f4f.tar.bz2
gentoo-bf49e1470410272837f8d5b11338bbbd93390f4f.zip
www-apps/karma-bin: Alert dashboard for the Prometheus Alertmanager
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/karma-bin/Manifest1
-rw-r--r--www-apps/karma-bin/files/karma-0.24.yaml55
-rw-r--r--www-apps/karma-bin/files/karma.initd12
-rw-r--r--www-apps/karma-bin/karma-bin-0.24.ebuild39
-rw-r--r--www-apps/karma-bin/metadata.xml8
5 files changed, 115 insertions, 0 deletions
diff --git a/www-apps/karma-bin/Manifest b/www-apps/karma-bin/Manifest
new file mode 100644
index 000000000000..6a8d567ae699
--- /dev/null
+++ b/www-apps/karma-bin/Manifest
@@ -0,0 +1 @@
+DIST karma-bin-0.24-amd64.tar.gz 11511588 BLAKE2B 4de38f4925e039ae28e160d2f541cb8b92388b42c68b3f00ca1a4aced635078a5f8bfabe63fe20dcb05a5a75188b2a866b627a26fd68d43de5f0c21a97a28160 SHA512 2864eac54be7f156f4b8feb144825615576e7f18f61f58d3e3834e9968a59a0373d0b156a0f00c5c019b922b251f8a7f35a41f139fbf42c27c562a74af33f14d
diff --git a/www-apps/karma-bin/files/karma-0.24.yaml b/www-apps/karma-bin/files/karma-0.24.yaml
new file mode 100644
index 000000000000..38b2dd3e3bf0
--- /dev/null
+++ b/www-apps/karma-bin/files/karma-0.24.yaml
@@ -0,0 +1,55 @@
+alertmanager:
+ interval: 60s
+ servers:
+ - name: local
+ uri: http://localhost:9093
+ timeout: 10s
+ proxy: true
+ headers:
+ X-Auth-Test: some-token-or-other-string
+ - name: client-auth
+ uri: https://localhost:9093
+ timeout: 10s
+ tls:
+ ca: /etc/ssl/certs/ca-bundle.crt
+ cert: /etc/karma/client.pem
+ key: /etc/karma/client.key
+annotations:
+ default:
+ hidden: false
+ hidden:
+ - help
+ visible: []
+custom:
+ css: /custom.css
+ js: /custom.js
+debug: false
+filters:
+ default:
+ - "@receiver=by-cluster-service"
+labels:
+ color:
+ static:
+ - job
+ unique:
+ - cluster
+ - instance
+ - "@receiver"
+ keep: []
+ strip: []
+listen:
+ address: "0.0.0.0"
+ port: 8080
+ prefix: /
+log:
+ config: false
+ level: info
+jira:
+ - regex: DEVOPS-[0-9]+
+ uri: https://jira.example.com
+receivers:
+ keep: []
+ strip: []
+sentry:
+ private: secret
+ public: 123456789
diff --git a/www-apps/karma-bin/files/karma.initd b/www-apps/karma-bin/files/karma.initd
new file mode 100644
index 000000000000..08dbc3bd5c96
--- /dev/null
+++ b/www-apps/karma-bin/files/karma.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 2018-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/karma
+command_args="--config.file /etc/karma/karma.yaml ${command_args}"
+command_background=yes
+command_group=karma
+command_user=karma
+error_log=/var/log/karma/karma.log
+output_log=/var/log/karma/karma.log
+pidfile=/var/run/karma.pid
diff --git a/www-apps/karma-bin/karma-bin-0.24.ebuild b/www-apps/karma-bin/karma-bin-0.24.ebuild
new file mode 100644
index 000000000000..215180ca0dfa
--- /dev/null
+++ b/www-apps/karma-bin/karma-bin-0.24.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+MY_PN=${PN%-bin}
+
+inherit user
+
+DESCRIPTION="Alerts dashboard for Prometheus Alertmanager"
+HOMEPAGE="https://github.com/prymitive/karma"
+SRC_URI="https://github.com/prymitive/${MY_PN}/releases/download/v${PV}/${MY_PN}-linux-amd64.tar.gz -> ${P}-amd64.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+QA_PREBUILT="usr/bin/*"
+S="${WORKDIR}"
+
+pkg_setup() {
+ enewgroup ${MY_PN}
+ enewuser ${MY_PN} -1 -1 -1 ${MY_PN}
+}
+
+src_install() {
+ dobin karma-linux-amd64
+ dosym karma-linux-amd64 /usr/bin/karma
+ insinto /etc/${MY_PN}
+ newins "${FILESDIR}"/${MY_PN}-${PV}.yaml ${MY_PN}.yaml
+ newinitd "${FILESDIR}"/${MY_PN}.initd ${MY_PN}
+keepdir /var/log/${MY_PN}
+fowners ${MY_PN}:${MY_PN} /var/log/${MY_PN}
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "Please edit ${EROOT}/etc/karma/karma.yaml to match your system."
+ fi
+}
diff --git a/www-apps/karma-bin/metadata.xml b/www-apps/karma-bin/metadata.xml
new file mode 100644
index 000000000000..c36c37139fad
--- /dev/null
+++ b/www-apps/karma-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+</pkgmetadata>