From 639a7a65caeec41ffa462ebf7f9dfe2917efbc41 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Thu, 15 May 2025 19:45:31 +1000 Subject: [PATCH] feat: manage mon loopback0 - add frrouting - set all ceph nodes to use ospf + loopback0 + networkd - fix ceph repos for mons --- .../nodes/ausyd1nxvm2040.main.unkin.net.yaml | 2 + .../nodes/ausyd1nxvm2041.main.unkin.net.yaml | 2 + .../nodes/ausyd1nxvm2042.main.unkin.net.yaml | 2 + .../nodes/ausyd1nxvm2043.main.unkin.net.yaml | 2 + .../nodes/ausyd1nxvm2044.main.unkin.net.yaml | 2 + hieradata/roles/ceph.yaml | 47 ++++++++++++++++++- hieradata/roles/ceph/mon.yaml | 0 7 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 hieradata/nodes/ausyd1nxvm2040.main.unkin.net.yaml create mode 100644 hieradata/nodes/ausyd1nxvm2041.main.unkin.net.yaml create mode 100644 hieradata/nodes/ausyd1nxvm2042.main.unkin.net.yaml create mode 100644 hieradata/nodes/ausyd1nxvm2043.main.unkin.net.yaml create mode 100644 hieradata/nodes/ausyd1nxvm2044.main.unkin.net.yaml create mode 100644 hieradata/roles/ceph/mon.yaml diff --git a/hieradata/nodes/ausyd1nxvm2040.main.unkin.net.yaml b/hieradata/nodes/ausyd1nxvm2040.main.unkin.net.yaml new file mode 100644 index 0000000..3060aaf --- /dev/null +++ b/hieradata/nodes/ausyd1nxvm2040.main.unkin.net.yaml @@ -0,0 +1,2 @@ +--- +networking_loopback0_ip: 198.18.23.40 # ceph-public loopback diff --git a/hieradata/nodes/ausyd1nxvm2041.main.unkin.net.yaml b/hieradata/nodes/ausyd1nxvm2041.main.unkin.net.yaml new file mode 100644 index 0000000..a97bdfd --- /dev/null +++ b/hieradata/nodes/ausyd1nxvm2041.main.unkin.net.yaml @@ -0,0 +1,2 @@ +--- +networking_loopback0_ip: 198.18.23.41 # ceph-public loopback diff --git a/hieradata/nodes/ausyd1nxvm2042.main.unkin.net.yaml b/hieradata/nodes/ausyd1nxvm2042.main.unkin.net.yaml new file mode 100644 index 0000000..2e9c4ff --- /dev/null +++ b/hieradata/nodes/ausyd1nxvm2042.main.unkin.net.yaml @@ -0,0 +1,2 @@ +--- +networking_loopback0_ip: 198.18.23.42 # ceph-public loopback diff --git a/hieradata/nodes/ausyd1nxvm2043.main.unkin.net.yaml b/hieradata/nodes/ausyd1nxvm2043.main.unkin.net.yaml new file mode 100644 index 0000000..e058d7e --- /dev/null +++ b/hieradata/nodes/ausyd1nxvm2043.main.unkin.net.yaml @@ -0,0 +1,2 @@ +--- +networking_loopback0_ip: 198.18.23.43 # ceph-public loopback diff --git a/hieradata/nodes/ausyd1nxvm2044.main.unkin.net.yaml b/hieradata/nodes/ausyd1nxvm2044.main.unkin.net.yaml new file mode 100644 index 0000000..5d95d34 --- /dev/null +++ b/hieradata/nodes/ausyd1nxvm2044.main.unkin.net.yaml @@ -0,0 +1,2 @@ +--- +networking_loopback0_ip: 198.18.23.44 # ceph-public loopback diff --git a/hieradata/roles/ceph.yaml b/hieradata/roles/ceph.yaml index 80faebf..cf89fc5 100644 --- a/hieradata/roles/ceph.yaml +++ b/hieradata/roles/ceph.yaml @@ -1,17 +1,60 @@ --- +hiera_include: + - frrouting + +# networking +systemd::manage_networkd: true +systemd::manage_all_network_files: true +networking::interfaces: + eth0: + type: physical + forwarding: true + dhcp: true + loopback0: + type: dummy + ipaddress: "%{hiera('networking_loopback0_ip')}" # ceph public network + netmask: 255.255.255.255 + mtu: 1500 + +# frrouting +frrouting::ospfd_router_id: "%{facts.networking.ip}" +frrouting::ospfd_redistribute: + - connected +frrouting::ospfd_interfaces: + eth0: + area: 0.0.0.0 + loopback0: + area: 0.0.0.0 +frrouting::daemons: + ospfd: true + # additional repos profiles::yum::global::repos: - - ceph: + ceph: name: ceph descr: ceph repository target: /etc/yum.repos.d/ceph.repo baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/%{facts.os.architecture} gpgkey: https://download.ceph.com/keys/release.asc mirrorlist: absent - - ceph-noarch: + ceph-noarch: name: ceph-noarch descr: ceph-noarch repository target: /etc/yum.repos.d/ceph-noarch.repo baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/noarch gpgkey: https://download.ceph.com/keys/release.asc mirrorlist: absent + frr-extras: + name: frr-extras + descr: frr-extras repository + target: /etc/yum.repos.d/frr-extras.repo + baseurl: https://packagerepo.service.consul/frr/el9/extras-daily/%{facts.os.architecture}/os + gpgkey: https://packagerepo.service.consul/frr/el9/extras-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR + mirrorlist: absent + frr-stable: + name: frr-stable + descr: frr-stable repository + target: /etc/yum.repos.d/frr-stable.repo + baseurl: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os + gpgkey: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR + mirrorlist: absent diff --git a/hieradata/roles/ceph/mon.yaml b/hieradata/roles/ceph/mon.yaml new file mode 100644 index 0000000..e69de29 -- 2.47.3