build: migrate to spud

This commit is contained in:
Marc 2024-06-03 00:01:20 -04:00
parent db81aa2e77
commit 60881298a0
Signed by: marc
GPG key ID: 048E042F22B5DC79
4 changed files with 30 additions and 32 deletions

View file

@ -4,6 +4,10 @@
Monitoring and observability stack. Monitoring and observability stack.
## Maintaining
Using [spud](https://forge.karnov.club/spadinastan/spud), just `spud start ./service.yml`!
## Onboarding databases ## Onboarding databases
Add the following to the pod in which the database runs. Add the following to the pod in which the database runs.

26
service.yml Normal file
View file

@ -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

View file

@ -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

View file

@ -1,3 +0,0 @@
#!/bin/bash
podman pod stop panopticon