summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-04-04 17:34:15 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-04-04 17:34:15 +0200
commitd387f917c5979298f08fb57799bc6e04790406e1 (patch)
tree223552ad7da0b531c808e6d755d81e6b5f764739
parentport elevate/liquidtruth role to new storage volume roles (diff)
port elevate/emc-stats role to new storage volume roles
-rw-r--r--dan/emc-master.yml1
-rw-r--r--inventory/host_vars/emc-master.yml9
-rw-r--r--inventory/host_vars/lw-master.yml9
-rw-r--r--roles/elevate/emc-stats/tasks/main.yml28
-rw-r--r--spreadspace/lw-master.yml1
5 files changed, 21 insertions, 27 deletions
diff --git a/dan/emc-master.yml b/dan/emc-master.yml
index eafb5697..03ca70cf 100644
--- a/dan/emc-master.yml
+++ b/dan/emc-master.yml
@@ -6,4 +6,5 @@
- role: core/base
- role: core/sshd
- role: core/zsh
+ - role: storage/lvm/groups
- role: elevate/emc-stats
diff --git a/inventory/host_vars/emc-master.yml b/inventory/host_vars/emc-master.yml
index f2e62131..1b4021c8 100644
--- a/inventory/host_vars/emc-master.yml
+++ b/inventory/host_vars/emc-master.yml
@@ -49,8 +49,13 @@ kubelet_storage:
fs: ext4
-emc_stats_lvm:
- pvs: /dev/sdb
+lvm_groups:
+ streamstats:
+ pvs:
+ - /dev/sdb
+
+emc_stats_storage:
+ type: lvm
vg: streamstats
lv: stats
size: 42G
diff --git a/inventory/host_vars/lw-master.yml b/inventory/host_vars/lw-master.yml
index f2e62131..1b4021c8 100644
--- a/inventory/host_vars/lw-master.yml
+++ b/inventory/host_vars/lw-master.yml
@@ -49,8 +49,13 @@ kubelet_storage:
fs: ext4
-emc_stats_lvm:
- pvs: /dev/sdb
+lvm_groups:
+ streamstats:
+ pvs:
+ - /dev/sdb
+
+emc_stats_storage:
+ type: lvm
vg: streamstats
lv: stats
size: 42G
diff --git a/roles/elevate/emc-stats/tasks/main.yml b/roles/elevate/emc-stats/tasks/main.yml
index e656c7f7..ae5542f3 100644
--- a/roles/elevate/emc-stats/tasks/main.yml
+++ b/roles/elevate/emc-stats/tasks/main.yml
@@ -1,27 +1,9 @@
---
-- name: create volume group
- when: emc_stats_lvm.pvs is defined
- lvg:
- vg: "{{ emc_stats_lvm.vg }}"
- pvs: "{{ emc_stats_lvm.pvs }}"
-
-- name: create logical volume
- lvol:
- vg: "{{ emc_stats_lvm.vg }}"
- lv: "{{ emc_stats_lvm.lv }}"
- size: "{{ emc_stats_lvm.size }}"
-
-- name: create filesystem
- filesystem:
- fstype: "{{ emc_stats_lvm.fs }}"
- dev: "/dev/mapper/{{ emc_stats_lvm.vg | replace('-', '--') }}-{{ emc_stats_lvm.lv | replace('-', '--') }}"
-
-- name: mount filesytem
- mount:
- src: "/dev/mapper/{{ emc_stats_lvm.vg | replace('-', '--') }}-{{ emc_stats_lvm.lv | replace('-', '--') }}"
- path: /srv/stats
- fstype: "{{ emc_stats_lvm.fs }}"
- state: mounted
+- name: prepare storage volume for /srv/stats
+ vars:
+ storage_volume: "{{ emc_stats_storage | combine({'dest': '/srv/stats'}) }}"
+ include_role:
+ name: "storage/{{ emc_stats_storage.type }}/volume"
# needed for elasticsearch
- name: increase vm.max_map_count
diff --git a/spreadspace/lw-master.yml b/spreadspace/lw-master.yml
index 99be1c2b..c4a5df65 100644
--- a/spreadspace/lw-master.yml
+++ b/spreadspace/lw-master.yml
@@ -6,4 +6,5 @@
- role: core/base
- role: core/sshd
- role: core/zsh
+ - role: storage/lvm/groups
- role: elevate/emc-stats