From 6645595e6e632e284263190919a10ef69e408bf4 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sat, 4 Mar 2023 16:44:06 +0000 Subject: [PATCH] Add few more s6 services --- s6/haproxy/APKBUILD | 7 +++++++ s6/haproxy/env/CFGFILE | 1 + s6/haproxy/rc/run | 8 ++++++++ s6/haproxy/rc/type | 1 + s6/prometheus/APKBUILD | 7 +++++++ s6/prometheus/env/CFGFILE | 1 + s6/prometheus/env/LISTEN_ADDR | 1 + s6/prometheus/env/STORAGE_PATH | 1 + s6/prometheus/env/STORAGE_RETENTION | 1 + s6/prometheus/rc/run | 11 +++++++++++ s6/prometheus/rc/type | 1 + 11 files changed, 40 insertions(+) create mode 100644 s6/haproxy/APKBUILD create mode 100644 s6/haproxy/env/CFGFILE create mode 100755 s6/haproxy/rc/run create mode 100644 s6/haproxy/rc/type create mode 100644 s6/prometheus/APKBUILD create mode 100644 s6/prometheus/env/CFGFILE create mode 100644 s6/prometheus/env/LISTEN_ADDR create mode 100644 s6/prometheus/env/STORAGE_PATH create mode 100644 s6/prometheus/env/STORAGE_RETENTION create mode 100755 s6/prometheus/rc/run create mode 100644 s6/prometheus/rc/type diff --git a/s6/haproxy/APKBUILD b/s6/haproxy/APKBUILD new file mode 100644 index 0000000..36feb2b --- /dev/null +++ b/s6/haproxy/APKBUILD @@ -0,0 +1,7 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes + +. ../APKBUILD-s6.template + +pkgver=2023.03.04.01 +pkgrel=0 diff --git a/s6/haproxy/env/CFGFILE b/s6/haproxy/env/CFGFILE new file mode 100644 index 0000000..f3e972d --- /dev/null +++ b/s6/haproxy/env/CFGFILE @@ -0,0 +1 @@ +/etc/redxen/haproxy/main.cfg diff --git a/s6/haproxy/rc/run b/s6/haproxy/rc/run new file mode 100755 index 0000000..335c748 --- /dev/null +++ b/s6/haproxy/rc/run @@ -0,0 +1,8 @@ +#!/bin/execlineb -P +s6-envdir -I /etc/s6/env/redxen.haproxy +importas -i CFGFILE CFGFILE + +s6-envdir -i /etc/s6/env/path +emptyenv -p + +haproxy -db -f $CFGFILE diff --git a/s6/haproxy/rc/type b/s6/haproxy/rc/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/s6/haproxy/rc/type @@ -0,0 +1 @@ +longrun diff --git a/s6/prometheus/APKBUILD b/s6/prometheus/APKBUILD new file mode 100644 index 0000000..36feb2b --- /dev/null +++ b/s6/prometheus/APKBUILD @@ -0,0 +1,7 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes + +. ../APKBUILD-s6.template + +pkgver=2023.03.04.01 +pkgrel=0 diff --git a/s6/prometheus/env/CFGFILE b/s6/prometheus/env/CFGFILE new file mode 100644 index 0000000..93ad626 --- /dev/null +++ b/s6/prometheus/env/CFGFILE @@ -0,0 +1 @@ +/etc/redxen/prometheus/config.yaml diff --git a/s6/prometheus/env/LISTEN_ADDR b/s6/prometheus/env/LISTEN_ADDR new file mode 100644 index 0000000..521840a --- /dev/null +++ b/s6/prometheus/env/LISTEN_ADDR @@ -0,0 +1 @@ +[::]:7554 diff --git a/s6/prometheus/env/STORAGE_PATH b/s6/prometheus/env/STORAGE_PATH new file mode 100644 index 0000000..37fa812 --- /dev/null +++ b/s6/prometheus/env/STORAGE_PATH @@ -0,0 +1 @@ +/var/lib/prometheus/data diff --git a/s6/prometheus/env/STORAGE_RETENTION b/s6/prometheus/env/STORAGE_RETENTION new file mode 100644 index 0000000..b8290e6 --- /dev/null +++ b/s6/prometheus/env/STORAGE_RETENTION @@ -0,0 +1 @@ +30d diff --git a/s6/prometheus/rc/run b/s6/prometheus/rc/run new file mode 100755 index 0000000..8d8925f --- /dev/null +++ b/s6/prometheus/rc/run @@ -0,0 +1,11 @@ +#!/bin/execlineb -P +s6-envdir -I /etc/s6/env/redxen.prometheus +importas -i CFGFILE CFGFILE +importas -i LISTEN_ADDR LISTEN_ADDR +importas -i STORAGE_PATH STORAGE_PATH +importas -i STORAGE_RETENTION STORAGE_RETENTION + +s6-envdir -i /etc/s6/env/path +emptyenv -p + +prometheus --web.listen-address=${LISTEN_ADDR} --config.file=${CFGFILE} --storage.tsdb.path=${STORAGE_PATH} --storage.tsdb.retention.time=${STORAGE_RETENTION} diff --git a/s6/prometheus/rc/type b/s6/prometheus/rc/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/s6/prometheus/rc/type @@ -0,0 +1 @@ +longrun