Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/karma-bin/files/, www-apps/karma-bin/
Date: Fri, 08 Feb 2019 22:58:48
Message-Id: 1549666710.bf49e1470410272837f8d5b11338bbbd93390f4f.williamh@gentoo
1 commit: bf49e1470410272837f8d5b11338bbbd93390f4f
2 Author: William Hubbs <william.hubbs <AT> sony <DOT> com>
3 AuthorDate: Fri Feb 8 22:57:06 2019 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 8 22:58:30 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf49e147
7
8 www-apps/karma-bin: Alert dashboard for the Prometheus Alertmanager
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.51, Repoman-2.3.12
12 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
13
14 www-apps/karma-bin/Manifest | 1 +
15 www-apps/karma-bin/files/karma-0.24.yaml | 55 ++++++++++++++++++++++++++++++++
16 www-apps/karma-bin/files/karma.initd | 12 +++++++
17 www-apps/karma-bin/karma-bin-0.24.ebuild | 39 ++++++++++++++++++++++
18 www-apps/karma-bin/metadata.xml | 8 +++++
19 5 files changed, 115 insertions(+)
20
21 diff --git a/www-apps/karma-bin/Manifest b/www-apps/karma-bin/Manifest
22 new file mode 100644
23 index 00000000000..6a8d567ae69
24 --- /dev/null
25 +++ b/www-apps/karma-bin/Manifest
26 @@ -0,0 +1 @@
27 +DIST karma-bin-0.24-amd64.tar.gz 11511588 BLAKE2B 4de38f4925e039ae28e160d2f541cb8b92388b42c68b3f00ca1a4aced635078a5f8bfabe63fe20dcb05a5a75188b2a866b627a26fd68d43de5f0c21a97a28160 SHA512 2864eac54be7f156f4b8feb144825615576e7f18f61f58d3e3834e9968a59a0373d0b156a0f00c5c019b922b251f8a7f35a41f139fbf42c27c562a74af33f14d
28
29 diff --git a/www-apps/karma-bin/files/karma-0.24.yaml b/www-apps/karma-bin/files/karma-0.24.yaml
30 new file mode 100644
31 index 00000000000..38b2dd3e3bf
32 --- /dev/null
33 +++ b/www-apps/karma-bin/files/karma-0.24.yaml
34 @@ -0,0 +1,55 @@
35 +alertmanager:
36 + interval: 60s
37 + servers:
38 + - name: local
39 + uri: http://localhost:9093
40 + timeout: 10s
41 + proxy: true
42 + headers:
43 + X-Auth-Test: some-token-or-other-string
44 + - name: client-auth
45 + uri: https://localhost:9093
46 + timeout: 10s
47 + tls:
48 + ca: /etc/ssl/certs/ca-bundle.crt
49 + cert: /etc/karma/client.pem
50 + key: /etc/karma/client.key
51 +annotations:
52 + default:
53 + hidden: false
54 + hidden:
55 + - help
56 + visible: []
57 +custom:
58 + css: /custom.css
59 + js: /custom.js
60 +debug: false
61 +filters:
62 + default:
63 + - "@receiver=by-cluster-service"
64 +labels:
65 + color:
66 + static:
67 + - job
68 + unique:
69 + - cluster
70 + - instance
71 + - "@receiver"
72 + keep: []
73 + strip: []
74 +listen:
75 + address: "0.0.0.0"
76 + port: 8080
77 + prefix: /
78 +log:
79 + config: false
80 + level: info
81 +jira:
82 + - regex: DEVOPS-[0-9]+
83 + uri: https://jira.example.com
84 +receivers:
85 + keep: []
86 + strip: []
87 +sentry:
88 + private: secret
89 + public: 123456789
90
91 diff --git a/www-apps/karma-bin/files/karma.initd b/www-apps/karma-bin/files/karma.initd
92 new file mode 100644
93 index 00000000000..08dbc3bd5c9
94 --- /dev/null
95 +++ b/www-apps/karma-bin/files/karma.initd
96 @@ -0,0 +1,12 @@
97 +#!/sbin/openrc-run
98 +# Copyright 2018-2019 Gentoo Authors
99 +# Distributed under the terms of the GNU General Public License v2
100 +
101 +command=/usr/bin/karma
102 +command_args="--config.file /etc/karma/karma.yaml ${command_args}"
103 +command_background=yes
104 +command_group=karma
105 +command_user=karma
106 +error_log=/var/log/karma/karma.log
107 +output_log=/var/log/karma/karma.log
108 +pidfile=/var/run/karma.pid
109
110 diff --git a/www-apps/karma-bin/karma-bin-0.24.ebuild b/www-apps/karma-bin/karma-bin-0.24.ebuild
111 new file mode 100644
112 index 00000000000..215180ca0df
113 --- /dev/null
114 +++ b/www-apps/karma-bin/karma-bin-0.24.ebuild
115 @@ -0,0 +1,39 @@
116 +# Copyright 2019 Gentoo Authors
117 +# Distributed under the terms of the GNU General Public License v2
118 +
119 +EAPI=7
120 +MY_PN=${PN%-bin}
121 +
122 +inherit user
123 +
124 +DESCRIPTION="Alerts dashboard for Prometheus Alertmanager"
125 +HOMEPAGE="https://github.com/prymitive/karma"
126 +SRC_URI="https://github.com/prymitive/${MY_PN}/releases/download/v${PV}/${MY_PN}-linux-amd64.tar.gz -> ${P}-amd64.tar.gz"
127 +
128 +LICENSE="Apache-2.0"
129 +SLOT="0"
130 +KEYWORDS="~amd64"
131 +
132 +QA_PREBUILT="usr/bin/*"
133 +S="${WORKDIR}"
134 +
135 +pkg_setup() {
136 + enewgroup ${MY_PN}
137 + enewuser ${MY_PN} -1 -1 -1 ${MY_PN}
138 +}
139 +
140 +src_install() {
141 + dobin karma-linux-amd64
142 + dosym karma-linux-amd64 /usr/bin/karma
143 + insinto /etc/${MY_PN}
144 + newins "${FILESDIR}"/${MY_PN}-${PV}.yaml ${MY_PN}.yaml
145 + newinitd "${FILESDIR}"/${MY_PN}.initd ${MY_PN}
146 +keepdir /var/log/${MY_PN}
147 +fowners ${MY_PN}:${MY_PN} /var/log/${MY_PN}
148 +}
149 +
150 +pkg_postinst() {
151 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
152 + elog "Please edit ${EROOT}/etc/karma/karma.yaml to match your system."
153 + fi
154 +}
155
156 diff --git a/www-apps/karma-bin/metadata.xml b/www-apps/karma-bin/metadata.xml
157 new file mode 100644
158 index 00000000000..c36c37139fa
159 --- /dev/null
160 +++ b/www-apps/karma-bin/metadata.xml
161 @@ -0,0 +1,8 @@
162 +<?xml version="1.0" encoding="UTF-8"?>
163 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
164 +<pkgmetadata>
165 + <maintainer type="person">
166 + <email>williamh@g.o</email>
167 + <name>William Hubbs</name>
168 + </maintainer>
169 +</pkgmetadata>