Skip to content

Commit 2ddc9a1

Browse files
authored
Merge pull request #1897 from lsst-it/IT-6036/antu-rke2
(cluster/antu) convert rke1 -> rke2
2 parents 349c337 + 07a4d34 commit 2ddc9a1

File tree

5 files changed

+160
-26
lines changed

5 files changed

+160
-26
lines changed

hieradata/cluster/antu.yaml

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,91 @@ clustershell::groupmembers:
44
group: "antu"
55
member: "antu[01-04]"
66
tuned::active_profile: "latency-performance"
7+
nm::conf:
8+
device:
9+
keep-configuration: "no"
10+
allowed-connections: "except:origin:nm-initrd-generator"
711
nm::connections:
8-
enp65s0f0.2130:
12+
enp12s0f4u1u2c2: # bmc
913
content:
1014
connection:
11-
id: "enp65s0f0.2130"
12-
uuid: "e74daaad-4d73-4015-bb26-83c460ddf572"
15+
id: "enp12s0f4u1u2c2"
16+
uuid: "f330f829-20cc-b829-67b0-18086a5fe6fa"
17+
type: "ethernet"
18+
autoconnect: "false"
19+
interface-name: "enp12s0f4u1u2c2"
20+
ethernet: {}
21+
ipv4:
22+
method: "disabled"
23+
ipv6:
24+
method: "disabled"
25+
enp65s0f0: # bdc-b04-lf02
26+
content:
27+
connection:
28+
id: "enp65s0f0"
29+
uuid: "de9904c8-9577-1a17-36b1-34b94132f06a"
30+
type: "ethernet"
31+
interface-name: "enp65s0f0"
32+
master: "bond0"
33+
slave-type: "bond"
34+
ethernet: {}
35+
enp65s0f1: # bdc-b04-lf01
36+
content:
37+
connection:
38+
id: "enp65s0f1"
39+
uuid: "688bf5bf-d649-34b4-15eb-b07c50ac43f8"
40+
type: "ethernet"
41+
interface-name: "enp65s0f1"
42+
master: "bond0"
43+
slave-type: "bond"
44+
ethernet: {}
45+
bond0:
46+
content:
47+
connection:
48+
id: "bond0"
49+
uuid: "3c5900d8-49af-4364-8f4d-9fb8f8c9d089"
50+
type: "bond"
51+
interface-name: "bond0"
52+
ethernet:
53+
cloned-mac-address: "%{facts.networking.interfaces.enp1s0f0np0.mac}"
54+
bond:
55+
miimon: "100"
56+
mode: "802.3ad"
57+
xmit_hash_policy: "layer3+4"
58+
ipv4:
59+
method: "disabled"
60+
ipv6:
61+
method: "disabled"
62+
proxy: {}
63+
bond0.2130:
64+
content:
65+
connection:
66+
id: "bond0.2130"
67+
uuid: "f1512a73-a30e-492f-8e43-d2d90d11dd2f"
1368
type: "vlan"
14-
interface-name: "enp65s0f0.2130"
69+
interface-name: "bond0.2130"
1570
master: "br2130"
1671
slave-type: "bridge"
1772
ethernet: {}
1873
vlan:
1974
flags: "1"
2075
id: "2130"
21-
parent: "enp65s0f0"
76+
parent: "bond0"
77+
bridge-port: {}
78+
bond0.2131:
79+
content:
80+
connection:
81+
id: "bond0.2131"
82+
uuid: "5861c0e1-5a35-4f32-927f-eb2aa7b84e2e"
83+
type: "vlan"
84+
interface-name: "bond0.2131"
85+
master: "br2131"
86+
slave-type: "bridge"
87+
ethernet: {}
88+
vlan:
89+
flags: "1"
90+
id: "2131"
91+
parent: "bond0"
2292
bridge-port: {}
2393
br2130:
2494
content:
@@ -35,3 +105,18 @@ nm::connections:
35105
ipv6:
36106
method: "disabled"
37107
proxy: {}
108+
br2131:
109+
content:
110+
connection:
111+
id: "br2131"
112+
uuid: "7dd05d98-a9c3-4569-a7c3-00316b13c0eb"
113+
type: "bridge"
114+
interface-name: "br2131"
115+
ethernet: {}
116+
bridge:
117+
stp: "false"
118+
ipv4:
119+
method: "auto"
120+
ipv6:
121+
method: "disabled"
122+
proxy: {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
22
classes:
3+
- "profile::core::sysctl::lhn"
34
- "profile::core::sysctl::rp_filter"
45
profile::core::sysctl::rp_filter::enable: false
6+
rke2::config:
7+
node-label:
8+
- "role=storage-node"

hieradata/common.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ ipset::sets:
406406
- "139.229.152.128/26" # vlan2503
407407
- "139.229.152.192/26" # vlan2504
408408
- "139.229.154.0/26" # vlan2507
409+
- "139.229.154.96/28" # vlan2131
409410
cpfde: # cps site hosts which might need FDE
410411
ensure: "present"
411412
type: "hash:net"

spec/hosts/nodes/antu01.ls.lsst.org_spec.rb

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
end
2020
let(:node_params) do
2121
{
22-
role: 'rke',
22+
role: 'rke2server',
2323
site: 'ls',
2424
cluster: 'antu',
25-
variant: '1115s',
2625
}
2726
end
2827

@@ -31,7 +30,12 @@
3130
include_examples 'baremetal'
3231
include_context 'with nm interface'
3332
include_examples 'ceph cluster'
34-
include_examples 'docker', docker_version: '25.0.3'
33+
34+
it do
35+
expect(catalogue.resource('class', 'rke2')[:config]).to include(
36+
'node-label' => ['role=storage-node']
37+
)
38+
end
3539

3640
it do
3741
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
@@ -49,16 +53,26 @@
4953
end
5054

5155
it do
52-
is_expected.to contain_class('rke').with(
53-
version: '1.8.0'
56+
is_expected.to contain_class('rke2').with(
57+
node_type: 'server',
58+
release_series: '1.32',
59+
version: '1.32.2~rke2r1'
5460
)
5561
end
5662

57-
it { is_expected.to have_nm__connection_resource_count(5) }
63+
it do
64+
expect(catalogue.resource('class', 'nm')[:conf]).to include(
65+
'device' => {
66+
'keep-configuration' => 'no',
67+
'allowed-connections' => 'except:origin:nm-initrd-generator',
68+
}
69+
)
70+
end
71+
72+
it { is_expected.to have_nm__connection_resource_count(8) }
5873

5974
%w[
6075
enp12s0f4u1u2c2
61-
enp65s0f0
6276
].each do |i|
6377
context "with #{i}" do
6478
let(:interface) { i }
@@ -67,28 +81,57 @@
6781
end
6882
end
6983

70-
context 'with enp65s0f1' do
71-
let(:interface) { 'enp65s0f1' }
84+
%w[
85+
enp65s0f0
86+
enp65s0f1
87+
].each do |i|
88+
context "with #{i}" do
89+
let(:interface) { i }
7290

73-
it_behaves_like 'nm enabled interface'
74-
it_behaves_like 'nm dhcp interface'
75-
it_behaves_like 'nm ethernet interface'
91+
it_behaves_like 'nm enabled interface'
92+
it_behaves_like 'nm ethernet interface'
93+
it_behaves_like 'nm bond slave interface', master: 'bond0'
94+
end
7695
end
7796

78-
context 'with enp65s0f0.2130' do
79-
let(:interface) { 'enp65s0f0.2130' }
97+
context 'with bond0' do
98+
let(:interface) { 'bond0' }
8099

81100
it_behaves_like 'nm enabled interface'
82-
it_behaves_like 'nm vlan interface', id: 2130, parent: 'enp65s0f0'
83-
it_behaves_like 'nm bridge slave interface', master: 'br2130'
101+
it_behaves_like 'nm bond interface'
102+
it_behaves_like 'nm no-ip interface'
84103
end
85104

86-
context 'with br2130' do
87-
let(:interface) { 'br2130' }
105+
%w[
106+
2130
107+
2131
108+
].each do |vlan|
109+
iface = "bond0.#{vlan}"
110+
context "with #{iface}" do
111+
let(:interface) { iface }
112+
113+
it_behaves_like 'nm enabled interface'
114+
it_behaves_like 'nm vlan interface', id: vlan.to_i, parent: 'bond0'
115+
it_behaves_like 'nm bridge slave interface', master: "br#{vlan}"
116+
end
117+
end
88118

89-
it_behaves_like 'nm enabled interface'
90-
it_behaves_like 'nm no-ip interface'
91-
it_behaves_like 'nm bridge interface'
119+
%w[
120+
br2130
121+
br2131
122+
].each do |i|
123+
context "with #{i}" do
124+
let(:interface) { i }
125+
126+
it_behaves_like 'nm enabled interface'
127+
it_behaves_like 'nm bridge interface'
128+
129+
if i == 'br2131'
130+
it_behaves_like 'nm dhcp interface'
131+
else
132+
it_behaves_like 'nm no-ip interface'
133+
end
134+
end
92135
end
93136
end # on os
94137
end # on_supported_os

spec/support/spec/ipset.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
139.229.152.128/26
7171
139.229.152.192/26
7272
139.229.154.0/26
73+
139.229.154.96/28
7374
]
7475
).that_comes_before('Class[firewall]')
7576
end

0 commit comments

Comments
 (0)