summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Feuls2019-02-12 12:47:42 +0100
committerCarsten Feuls2019-02-12 12:48:31 +0100
commit7c3f3244da081c307cb26ce782359e1ad6f6dcba (patch)
treedf9c675487989974d2aa8d217fc7fe788e6a83b9
parente02a2870662521b17c5336757a1d92b1e900fe84 (diff)
downloadaur-7c3f3244da081c307cb26ce782359e1ad6f6dcba.tar.gz
Changed Thanos Configuration and add Thanos User
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD22
-rw-r--r--thanos6
-rw-r--r--thanos.conf2
-rw-r--r--thanos.service4
-rw-r--r--thanos.sysuser1
7 files changed, 30 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8724b93a3886..109e587837ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
# Generated by mksrcinfo v8
-# Thu Feb 7 14:24:38 UTC 2019
+# Tue Feb 12 11:46:32 UTC 2019
pkgbase = prometheus-thanos
pkgdesc = Highly available Prometheus setup with long term storage capabilities. (binary, not built from source)
pkgver = 0.2.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/improbable-eng/thanos
arch = x86_64
license = Apache
backup = etc/conf.d/thanos
source_x86_64 = thanos.service
- source_x86_64 = thanos
+ source_x86_64 = thanos.conf
+ source_x86_64 = thanos.sysuser
source_x86_64 = https://github.com/improbable-eng/thanos/releases/download/v0.2.1/thanos-0.2.1.linux-amd64.tar.gz
- sha256sums_x86_64 = f94f769c2af513e8dac3bfdb07e290e68f770e0b68778326206d49793a98b3ee
- sha256sums_x86_64 = 55e509a5022df1b3af5316e862f048d4815dbba6589d0227e9c8ffdf4f2adfdc
+ sha256sums_x86_64 = 7b6debc5049486431cc70d6628099c01e8b29079400871eb89dc7938cdd7daf3
+ sha256sums_x86_64 = e0d582d721b99920a22153aac2361e300a3ec0cb05e92ecd9ee77c65b73d300a
+ sha256sums_x86_64 = b4655816e604a742a15bc008c876674dd9972578d36f25a07c20c5dee39f7dc0
sha256sums_x86_64 = 5feb8488b81e7869abfd3fa92f92a033f68c627cb8a591f1bcc338fee39833b1
pkgname = prometheus-thanos
diff --git a/.gitignore b/.gitignore
index ac0c1b801919..53be7b49c4d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@
!.SRCINFO
!thanos
!thanos.service
+!thanos.sysuser
+!thanos.conf
diff --git a/PKGBUILD b/PKGBUILD
index 91fbf4637b4f..52abbf711db9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=thanos
pkgname=prometheus-$_pkgname
pkgver=0.2.1
-pkgrel=2
+pkgrel=3
pkgdesc="Highly available Prometheus setup with long term storage capabilities. (binary, not built from source)"
arch=("x86_64")
url="https://github.com/improbable-eng/thanos"
@@ -13,10 +13,12 @@ makedepends=()
backup=("etc/conf.d/thanos")
source_x86_64=("thanos.service"
- "thanos"
+ "thanos.conf"
+ "thanos.sysuser"
"https://github.com/improbable-eng/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver.linux-amd64.tar.gz")
-sha256sums_x86_64=('f94f769c2af513e8dac3bfdb07e290e68f770e0b68778326206d49793a98b3ee'
- '55e509a5022df1b3af5316e862f048d4815dbba6589d0227e9c8ffdf4f2adfdc'
+sha256sums_x86_64=('7b6debc5049486431cc70d6628099c01e8b29079400871eb89dc7938cdd7daf3'
+ 'e0d582d721b99920a22153aac2361e300a3ec0cb05e92ecd9ee77c65b73d300a'
+ 'b4655816e604a742a15bc008c876674dd9972578d36f25a07c20c5dee39f7dc0'
'5feb8488b81e7869abfd3fa92f92a033f68c627cb8a591f1bcc338fee39833b1')
package() {
@@ -26,8 +28,16 @@ package() {
install -D -m0755 thanos "${pkgdir}/usr/bin/thanos"
# Install SystemD Service File
- install -D -m0644 "${srcdir}/thanos.service" "${pkgdir}/usr/lib/systemd/system/thanos.service"
+ install -D -m0644 "${srcdir}/thanos.service" "${pkgdir}/usr/lib/systemd/system/thanos@.service"
+ install -D -m0644 "${srcdir}/thanos.sysuser" "${pkgdir}/usr/lib/sysuser.d/thanos.conf"
+
+ install -d -m0644 "${pkgdir}/etc/thanos/"
+
# Install thanos config
- install -D -m644 "${srcdir}/thanos" "${pkgdir}/etc/conf.d/thanos"
+ install -D -m644 "${srcdir}/thanos.conf" "${pkgdir}/etc/thanos/sidecar.conf"
+ install -D -m644 "${srcdir}/thanos.conf" "${pkgdir}/etc/thanos/store.conf"
+ install -D -m644 "${srcdir}/thanos.conf" "${pkgdir}/etc/thanos/query.conf"
+ install -D -m644 "${srcdir}/thanos.conf" "${pkgdir}/etc/thanos/rule.conf"
+ install -D -m644 "${srcdir}/thanos.conf" "${pkgdir}/etc/thanos/compact.conf"
}
diff --git a/thanos b/thanos
deleted file mode 100644
index 7bf1d3590092..000000000000
--- a/thanos
+++ /dev/null
@@ -1,6 +0,0 @@
-CLUSTER_ARGS="--cluster.address=0.0.0.0:10900 --cluster.network-type=lan"
-
-# Run sidecar on the Prometheus Query Server
-#THANOS_ARGS="sidecar --tsdb.path=/var/lib/prometheus/data"
-# Run Query on the Grafana Node
-#THANOS_ARGS="query"
diff --git a/thanos.conf b/thanos.conf
new file mode 100644
index 000000000000..31cd09e0a3ed
--- /dev/null
+++ b/thanos.conf
@@ -0,0 +1,2 @@
+#CLUSTER_ARGS="--cluster.address=0.0.0.0:10900 --cluster.network-type=lan"
+#THANOS_ARGS="--tsdb.path=/var/lib/prometheus/data"
diff --git a/thanos.service b/thanos.service
index c8616b769e14..8b04d83225b7 100644
--- a/thanos.service
+++ b/thanos.service
@@ -7,8 +7,8 @@ After=network-online.target
User=thanos
Group=thanos
Restart=on-failure
-EnvironmentFile=-/etc/conf.d/thanos
-ExecStart=/usr/bin/thanos $THANOS_ARGS $CLUSTER_ARGS
+EnvironmentFile=-/etc/thanos/%i.conf
+ExecStart=/usr/bin/thanos $i $THANOS_ARGS $CLUSTER_ARGS
ExecReload=/bin/kill -HUP $MAINPID
NoNewPrivileges=true
ProtectHome=true
diff --git a/thanos.sysuser b/thanos.sysuser
new file mode 100644
index 000000000000..eaa9cab25dac
--- /dev/null
+++ b/thanos.sysuser
@@ -0,0 +1 @@
+u thanos - "Prometheus Thanos user"