DEV-546: prometheus data via LVM

feature/DEV-655
Görz, Friedrich 3 years ago
parent 142d5a0103
commit f5c4f731f0

@ -0,0 +1,5 @@
---
prometheus_lvm_hcloudvol_size: 30
prometheus_lvm_hcloudvol_count: 2
prometheus_tsdb_rentention_time: '90d'

@ -1,4 +1,9 @@
---
prometheus_lvm_hcloudvol_size: 30
prometheus_lvm_hcloudvol_count: 1
prometheus_lvm_hcloudvol_mountpath: '/prometheus_datadir'
prometheus_datadir: "{{ prometheus_lvm_hcloudvol_mountpath }}"
# https://github.com/prometheus/prometheus
prometheus_image_name: "prom/prometheus"

@ -4,6 +4,15 @@
### update_config
### update_deployment
- name: "Create/Resize LVM for datadir"
include_role:
name: lvm_with_hetzner_volumes
vars:
lvm_with_hetzner_volumes__volprefix: prometheus_datadir
lvm_with_hetzner_volumes__volsize: "{{ prometheus_lvm_hcloudvol_size }}"
lvm_with_hetzner_volumes__volcount: "{{ prometheus_lvm_hcloudvol_count }}"
lvm_with_hetzner_volumes__mountpath: "{{ prometheus_lvm_hcloudvol_mountpath }}"
- name: "Setup DNS configuration for <{{ inventory_hostname }}>"
include_role:
name: sma_digitalocean

@ -21,9 +21,6 @@ prometheus_docker: {
},
],
volumes: [
{
name: "{{ prometheus_id }}-data"
},
{
name: "{{ alertmanager_id }}-data"
},
@ -56,7 +53,7 @@ prometheus_docker: {
],
volumes: [
'"./config/prometheus/:/etc/prometheus/:ro"',
'"{{ prometheus_id }}-data:/prometheus"',
'"{{ prometheus_datadir + "/" +"_data" | default(prometheus_id + "-data") }}:/prometheus"',
],
networks: [
'"back-tier"',

Loading…
Cancel
Save