summaryrefslogtreecommitdiff
path: root/inventory
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-08-19 01:29:36 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-08-19 01:29:36 +0200
commitf399928637cc2f12bf7cb06a4ea107bc0a88e5db (patch)
tree320bef2c5f0a60caf1c3fd05bac9f06ce1c7708c /inventory
parentadd hacky workaround for zfs-mount-generator bug (diff)
add host ch-prometheus
Diffstat (limited to 'inventory')
-rw-r--r--inventory/group_vars/chaos-at-home/network.yml5
-rw-r--r--inventory/group_vars/vmhost-ch-prometheus/main.yml26
-rw-r--r--inventory/host_vars/ch-prometheus.yml56
-rw-r--r--inventory/host_vars/ch-sw1.yml20
-rw-r--r--inventory/hosts.ini10
5 files changed, 112 insertions, 5 deletions
diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml
index ba22bcc3..b21074ff 100644
--- a/inventory/group_vars/chaos-at-home/network.yml
+++ b/inventory/group_vars/chaos-at-home/network.yml
@@ -14,8 +14,9 @@ network_zones:
ch-equinox-ws: 1
ch-oulu: 2
ch-oulu-vm1: 3
+ ch-mc: 10
ch-auth: 88
- ch-prometheus: 99
+ ch-prometheus: 200
ch-prometheus-old: 250
ch-gw-lan: 254
wifi:
@@ -57,7 +58,7 @@ network_zones:
offsets:
ch-equinox-ws: 1
ch-jump: 22
- ch-prometheus: 99
+ ch-prometheus: 100 # IPMI
ch-sw0: 200
ch-sw1: 201
ch-ap0: 220
diff --git a/inventory/group_vars/vmhost-ch-prometheus/main.yml b/inventory/group_vars/vmhost-ch-prometheus/main.yml
new file mode 100644
index 00000000..e97ee1f8
--- /dev/null
+++ b/inventory/group_vars/vmhost-ch-prometheus/main.yml
@@ -0,0 +1,26 @@
+---
+__vmhost_bridge_interface_zones__:
+ bond0: "{{ network_zones | list | difference(['lan']) }}"
+
+__vmhost_bridge_interface_zones_yaml__: |
+ {% for interface in (__vmhost_bridge_interface_zones__.keys() | sort) %}
+ {% for zone in __vmhost_bridge_interface_zones__[interface] %}
+ {{ zone }}:
+ interfaces:
+ - {{ interface }}.{{ network_zones[zone].vlan }}
+ {% endfor %}
+ {% endfor %}
+ lan:
+ interfaces:
+ - enp1s0
+
+vm_host:
+ name: ch-prometheus
+ network:
+ bridges: "{{ __vmhost_bridge_interface_zones_yaml__ | from_yaml }}"
+ zfs:
+ default:
+ pool: nvme
+ name: vm
+ properties:
+ compression: lz4
diff --git a/inventory/host_vars/ch-prometheus.yml b/inventory/host_vars/ch-prometheus.yml
new file mode 100644
index 00000000..de31cd83
--- /dev/null
+++ b/inventory/host_vars/ch-prometheus.yml
@@ -0,0 +1,56 @@
+---
+install_interface: enp1s0
+
+install:
+ efi: true
+ disks:
+ primary: software-raid
+ raid:
+ level: 1
+ members:
+ - /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_512GB_S5JYNC0N310327Y
+ - /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_512GB_S5JYNC0N310329Z
+ system_lvm:
+ size: 20G
+
+network:
+ nameservers:
+ - 9.9.9.9
+ domain: "{{ host_domain }}"
+ primary: &_network_primary_
+ name: br-lan
+ address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
+ gateway: "{{ network_zones.lan.gateway }}"
+ interfaces:
+ - *_network_primary_
+ bonds:
+ - name: bond0
+ mode: 802.3ad
+ slaves:
+ - enp35s0
+ - enp36s0
+ options:
+ miimon: 100
+ vlans:
+ bond0: "{{ __vmhost_bridge_interface_zones__['bond0'] | map('extract', network_zones) | map(attribute='vlan') | list }}"
+
+apt_repo_components:
+ - main
+ - contrib
+ - non-free ## for microcode updates
+
+
+zfs_arc_size:
+ min: "{{ 2 * 1024 * 1024 * 1024 }}"
+ max: "{{ 8 * 1024 * 1024 * 1024 }}"
+
+zfs_zpools:
+ nvme:
+ mountpoint: /srv/nvme
+ create_vdevs: mirror /dev/nvme0n1p4 /dev/nvme1n1p4
+
+zfs_sanoid_modules:
+ nvme/vm:
+ use_template: production
+ recursive: yes
+ process_children_only: yes
diff --git a/inventory/host_vars/ch-sw1.yml b/inventory/host_vars/ch-sw1.yml
index 1df69954..bd6fe7f1 100644
--- a/inventory/host_vars/ch-sw1.yml
+++ b/inventory/host_vars/ch-sw1.yml
@@ -5,12 +5,26 @@ switch_interfaces_yaml: |
switchport_mode: trunk
- spec: Te1/0/2
- description: "prometheus"
+ description: "prom (oldnew)"
switchport_mode: trunk
- - spec: range Te1/0/3-4
+ - spec: Te1/0/3
+ description: "RFU"
+ vlan: {{ network_zones.lan.vlan }}
+
+ - spec: Te1/0/4
+ description: "prometheus"
vlan: {{ network_zones.lan.vlan }}
- - spec: range Gi1/0/5-16
+
+ - spec: range Gi1/0/5-6
+ channel_group: 1
+ - spec: port-channel 1
+ description: "prometheus"
+ switchport_mode: general
+ tagged_only: yes
+ allowed_vlans_tagged: {{ network_zones | list | difference(['lan']) | map('extract', network_zones) | map(attribute='vlan') | list }}
+
+ - spec: range Gi1/0/7-16
vlan: {{ network_zones.lan.vlan }}
- spec: range Gi1/0/17-22
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index c718da7e..686c4736 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -15,6 +15,7 @@ env_group=chaos-at-home
[chaos-at-home]
ch-equinox-ws host_name=equinox-ws
+ch-prometheus host_name=prometheus
ch-atlas host_name=atlas
ch-pan host_name=pan
ch-keyserver host_name=keyserver
@@ -255,6 +256,13 @@ ch-gnocchi
[vmhost-ch-gnocchi:children]
vmhost-ch-gnocchi-guests
+[vmhost-ch-prometheus-guests]
+ch-dummy
+[vmhost-ch-prometheus]
+ch-prometheus
+[vmhost-ch-prometheus:children]
+vmhost-ch-prometheus-guests
+
[vmhost-ch-atlas-guests]
ch-testvm
ele-mur
@@ -295,6 +303,7 @@ vmhost-sk-tomnext-guests
[kvmhosts]
ch-gnocchi
+ch-prometheus
ch-atlas
ch-oulu
sk-2019vm
@@ -302,6 +311,7 @@ sk-tomnext
[kvmguests:children]
vmhost-ch-gnocchi-guests
+vmhost-ch-prometheus-guests
vmhost-ch-atlas-guests
vmhost-ch-oulu-guests
vmhost-sk-2019vm-guests