Skip to content

Commit b8cddcc

Browse files
committed
(merken) Provision Cluster
1 parent 58df327 commit b8cddcc

File tree

3 files changed

+201
-0
lines changed

3 files changed

+201
-0
lines changed

hieradata/cluster/merken.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
clustershell::groupmembers:
3+
merken: {group: "merken", member: "merken[01-04]"}
4+
tuned::active_profile: "latency-performance"
5+
nm::conf:
6+
device:
7+
keep-configuration: "no"
8+
allowed-connections: "except:origin:nm-initrd-generator"
9+
10+
nm::connections:
11+
enp65s0f0:
12+
content:
13+
connection:
14+
id: "enp65s0f0"
15+
uuid: "3e516a55-fffc-44ab-828c-5ca7b17c7bbf"
16+
type: "ethernet"
17+
interface-name: "enp65s0f0"
18+
master: "bond0"
19+
slave-type: "bond"
20+
ethernet: {}
21+
ipv4:
22+
method: "disabled"
23+
ipv6:
24+
method: "disabled"
25+
enp65s0f1:
26+
content:
27+
connection:
28+
id: "enp65s0f1"
29+
uuid: "28ac7f8a5-48e2-4d1b-b17c-103d4ab4c951"
30+
type: "ethernet"
31+
interface-name: "enp65s0f1"
32+
master: "bond0"
33+
slave-type: "bond"
34+
ethernet: {}
35+
ipv4:
36+
method: "disabled"
37+
ipv6:
38+
method: "disabled"
39+
bond0:
40+
content:
41+
connection:
42+
id: "bond0"
43+
uuid: "b9c03f5b-adab-4857-8f73-0f7599656a62"
44+
type: "bond"
45+
interface-name: "bond0"
46+
ethernet:
47+
cloned-mac-address: "%{facts.networking.interfaces.enp65s0f0.mac}"
48+
bond:
49+
mode: "802.3ad"
50+
miimon: "100"
51+
xmit_hash_policy: "layer3+4"
52+
ipv4:
53+
method: "disabled"
54+
ipv6:
55+
method: "disabled"
56+
bond0.1131:
57+
content:
58+
connection:
59+
id: "bond0.1131"
60+
uuid: "4f98595d-f363-40f1-b4c1-5a87f63d0f4a"
61+
type: "vlan"
62+
interface-name: "bond0.1131"
63+
master: "br1131"
64+
slave-type: "bridge"
65+
ethernet: {}
66+
vlan:
67+
flags: "1"
68+
id: "1131"
69+
parent: "bond0"
70+
bridge-port: {}
71+
br1131:
72+
content:
73+
connection:
74+
id: "br1131"
75+
uuid: "b5c7a6ef-b449-4729-b944-ec45c40b40cc"
76+
type: "bridge"
77+
interface-name: "br1131"
78+
ethernet: {}
79+
bridge:
80+
stp: "false"
81+
ipv4:
82+
method: "auto"
83+
ipv6:
84+
method: "disabled"
85+
proxy: {}
86+
enp12s0f4u1u2c2:
87+
content:
88+
connection:
89+
id: "enp12s0f4u1u2c2"
90+
type: "ethernet"
91+
autoconnect: "false"
92+
interface-name: "enp12s0f4u1u2c2"
93+
ethernet: {}
94+
ipv4:
95+
method: "disabled"
96+
ipv6:
97+
method: "disabled"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
classes:
3+
- "profile::core::sysctl::rp_filter"
4+
profile::core::sysctl::rp_filter::enable: false
5+
rke2::config:
6+
node-label:
7+
- "role=storage-node"
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe 'merken01.ls.lsst.org', :sitepp do
6+
on_supported_os.each do |os, os_facts|
7+
next unless os =~ %r{almalinux-9-x86_64}
8+
9+
context "on #{os}" do
10+
let(:facts) do
11+
lsst_override_facts(os_facts,
12+
is_virtual: false,
13+
virtual: 'physical',
14+
dmi: {
15+
'product' => {
16+
'name' => 'AS -1115HS-TNR',
17+
},
18+
})
19+
end
20+
let(:node_params) do
21+
{
22+
role: 'rke2server',
23+
site: 'cp',
24+
cluster: 'merken',
25+
variant: '1115s',
26+
}
27+
end
28+
29+
it { is_expected.to compile.with_all_deps }
30+
31+
include_examples 'baremetal'
32+
include_context 'with nm interface'
33+
include_examples 'ceph cluster'
34+
include_examples 'docker', docker_version: '25.0.3'
35+
36+
it do
37+
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
38+
end
39+
40+
it do
41+
is_expected.to contain_class('clustershell').with(
42+
groupmembers: {
43+
'merken' => {
44+
'group' => 'merken',
45+
'member' => 'merken[01-04]',
46+
},
47+
}
48+
)
49+
end
50+
51+
it do
52+
is_expected.to contain_class('rke2').with(
53+
node_type: 'server',
54+
release_series: '1.32',
55+
version: '1.32.2~rke2r1'
56+
)
57+
end
58+
59+
it { is_expected.to have_nm__connection_resource_count(5) }
60+
61+
%w[
62+
enp12s0f4u1u2c2
63+
enp65s0f0
64+
].each do |i|
65+
context "with #{i}" do
66+
let(:interface) { i }
67+
68+
it_behaves_like 'nm disabled interface'
69+
end
70+
end
71+
72+
context 'with enp65s0f1' do
73+
let(:interface) { 'enp65s0f1' }
74+
75+
it_behaves_like 'nm enabled interface'
76+
it_behaves_like 'nm dhcp interface'
77+
it_behaves_like 'nm ethernet interface'
78+
end
79+
80+
context 'with enp65s0f0.2130' do
81+
let(:interface) { 'enp65s0f0.2130' }
82+
83+
it_behaves_like 'nm enabled interface'
84+
it_behaves_like 'nm vlan interface', id: 2130, parent: 'enp65s0f0'
85+
it_behaves_like 'nm bridge slave interface', master: 'br2130'
86+
end
87+
88+
context 'with br2130' do
89+
let(:interface) { 'br2130' }
90+
91+
it_behaves_like 'nm enabled interface'
92+
it_behaves_like 'nm no-ip interface'
93+
it_behaves_like 'nm bridge interface'
94+
end
95+
end # on os
96+
end # on_supported_os
97+
end

0 commit comments

Comments
 (0)