From 60881298a09fc006decec9a04390e8192ed7facc Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Mon, 3 Jun 2024 00:01:20 -0400 Subject: [PATCH] build: migrate to spud --- README.md | 4 ++++ service.yml | 26 ++++++++++++++++++++++++++ start.sh | 29 ----------------------------- stop.sh | 3 --- 4 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 service.yml delete mode 100755 start.sh delete mode 100755 stop.sh diff --git a/README.md b/README.md index 0b08050..ba41767 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Monitoring and observability stack. +## Maintaining + +Using [spud](https://forge.karnov.club/spadinastan/spud), just `spud start ./service.yml`! + ## Onboarding databases Add the following to the pod in which the database runs. diff --git a/service.yml b/service.yml new file mode 100644 index 0000000..593a062 --- /dev/null +++ b/service.yml @@ -0,0 +1,26 @@ +name: panopticon +volumes: + - name: grafana-storage + - name: prometheus-storage +ports: + - host: 3100 + container: 3000 + - host: 9090 + container: 9090 +containers: + - name: grafana + image: grafana/grafana + volumes: + - name: grafana-storage + container: /var/lib/grafana + - name: prometheus + image: prom/prometheus + volumes: + - name: prometheus-storage + container: /prometheus + - host: ./prometheus.yml + container: /etc/prometheus/prometheus.yml + extra-args: + - --storage.tsdb.retention.time=60d + - --storage.tsdb.path=/prometheus + - --config.file=/etc/prometheus/prometheus.yml diff --git a/start.sh b/start.sh deleted file mode 100755 index a3ac30d..0000000 --- a/start.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -podman pod create \ - -p 3100:3000 \ - -p 9090:9090 \ - --replace \ - panopticon - -podman volume create panopticon_grafana-storage -podman volume create panopticon_prometheus-storage - -podman run -d \ - --name=grafana \ - --replace \ - --pod panopticon \ - -v panopticon_grafana-storage:/var/lib/grafana \ - grafana/grafana - -podman run \ - --name prometheus \ - -d \ - --replace \ - --pod panopticon \ - -v panopticon_prometheus-storage:/prometheus \ - -v ./prometheus.yml:/etc/prometheus/prometheus.yml \ - prom/prometheus \ - --storage.tsdb.retention.time=60d \ - --storage.tsdb.path=/prometheus \ - --config.file=/etc/prometheus/prometheus.yml diff --git a/stop.sh b/stop.sh deleted file mode 100755 index a74e78d..0000000 --- a/stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman pod stop panopticon