build: migrate to spud
This commit is contained in:
parent
db81aa2e77
commit
60881298a0
4 changed files with 30 additions and 32 deletions
|
@ -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.
|
||||
|
|
26
service.yml
Normal file
26
service.yml
Normal 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
|
29
start.sh
29
start.sh
|
@ -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
|
3
stop.sh
3
stop.sh
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
podman pod stop panopticon
|
Loading…
Reference in a new issue