Skip to content

Commit 9fbb832

Browse files
authored
Merge pull request #1702 from lsst-it/IT-6034/ayekan-rke2
(cluster/ayekan) convert rke[1] -> rke2
2 parents 667faf0 + 4c010f3 commit 9fbb832

File tree

9 files changed

+125
-97
lines changed

9 files changed

+125
-97
lines changed

hieradata/cluster/ayekan.yaml

Lines changed: 66 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,75 @@
11
---
22
clustershell::groupmembers:
3-
ayekan: {group: "ayekan", member: "ayekan[01-03]"}
3+
ayekan:
4+
group: "ayekan"
5+
member: "ayekan[01-03]"
46
tuned::active_profile: "latency-performance"
7+
nm::conf:
8+
device:
9+
keep-configuration: "no"
10+
allowed-connections: "except:origin:nm-initrd-generator"
511
nm::connections:
612
eno1np0:
7-
content: |
8-
[connection]
9-
id=eno1np0
10-
uuid=f330f829-20cc-b829-67b0-18086a5fe6fa
11-
type=ethernet
12-
autoconnect=false
13-
interface-name=eno1np0
14-
15-
[ethernet]
16-
17-
[ipv4]
18-
method=disabled
19-
20-
[ipv6]
21-
method=disabled
13+
content:
14+
connection:
15+
id: "eno1np0"
16+
uuid: "f330f829-20cc-b829-67b0-18086a5fe6fa"
17+
type: "ethernet"
18+
autoconnect: "false"
19+
interface-name: "eno1np0"
20+
ethernet: {}
21+
ipv4:
22+
method: "disabled"
23+
ipv6:
24+
method: "disabled"
2225
eno2np1:
23-
content: |
24-
[connection]
25-
id=eno2np1
26-
uuid=de9904c8-9577-1a17-36b1-34b94132f06a
27-
type=ethernet
28-
autoconnect=false
29-
interface-name=eno2np1
30-
31-
[ethernet]
32-
33-
[ipv4]
34-
method=disabled
35-
36-
[ipv6]
37-
method=disabled
26+
content:
27+
connection:
28+
id: "eno2np1"
29+
uuid: "de9904c8-9577-1a17-36b1-34b94132f06a"
30+
type: "ethernet"
31+
autoconnect: "false"
32+
interface-name: "eno2np1"
33+
ethernet: {}
34+
ipv4:
35+
method: "disabled"
36+
ipv6:
37+
method: "disabled"
3838
enp4s0f3u2u2c2:
39-
content: |
40-
[connection]
41-
id=enp4s0f3u2u2c2
42-
uuid=283f3035-13d7-4c87-9d7a-7d47861fa1f9
43-
type=ethernet
44-
autoconnect=false
45-
interface-name=enp4s0f3u2u2c2
46-
47-
[ethernet]
48-
49-
[ipv4]
50-
method=disabled
51-
52-
[ipv6]
53-
method=disabled
39+
content:
40+
connection:
41+
id: "enp4s0f3u2u2c2"
42+
uuid: "283f3035-13d7-4c87-9d7a-7d47861fa1f9"
43+
type: "ethernet"
44+
autoconnect: "false"
45+
interface-name: "enp4s0f3u2u2c2"
46+
ethernet: {}
47+
ipv4:
48+
method: "disabled"
49+
ipv6:
50+
method: "disabled"
5451
enp129s0f0:
55-
content: |
56-
[connection]
57-
id=enp129s0f0
58-
uuid=688bf5bf-d649-34b4-15eb-b07c50ac43f8
59-
type=ethernet
60-
interface-name=enp129s0f0
61-
62-
[ethernet]
63-
64-
[ipv4]
65-
method=auto
66-
67-
[ipv6]
68-
method=disabled
52+
content:
53+
connection:
54+
id: "enp129s0f0"
55+
uuid: "688bf5bf-d649-34b4-15eb-b07c50ac43f8"
56+
type: "ethernet"
57+
interface-name: "enp129s0f0"
58+
ethernet: {}
59+
ipv4:
60+
method: "auto"
61+
ipv6:
62+
method: "disabled"
6963
enp129s0f1:
70-
content: |
71-
[connection]
72-
id=enp129s0f1
73-
uuid=46d19ce1-bcab-7e77-6fc7-b730b26c54b1
74-
type=ethernet
75-
autoconnect=false
76-
interface-name=enp129s0f1
77-
78-
[ethernet]
79-
80-
[ipv4]
81-
method=disabled
82-
83-
[ipv6]
84-
method=disabled
64+
content:
65+
connection:
66+
id: "enp129s0f1"
67+
uuid: "46d19ce1-bcab-7e77-6fc7-b730b26c54b1"
68+
type: "ethernet"
69+
autoconnect: "false"
70+
interface-name: "enp129s0f1"
71+
ethernet: {}
72+
ipv4:
73+
method: "disabled"
74+
ipv6:
75+
method: "disabled"

hieradata/cluster/ayekan/role/rke.yaml renamed to hieradata/cluster/ayekan/role/rke2server.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
classes:
33
- "profile::core::sysctl::rp_filter"
44
profile::core::sysctl::rp_filter::enable: false
5+
rke2::config:
6+
node-label:
7+
- "role=storage-node"

hieradata/common.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ ipset::sets:
383383
type: "hash:net"
384384
set:
385385
- "139.229.134.0/24"
386+
- "139.229.144.0/26" # ayekan
386387
tufde: # tu/tts site hosts which might need FDE
387388
ensure: "present"
388389
type: "hash:net"

hieradata/node/foreman.dev.lsst.org.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,17 @@ dhcp::pools:
3232
range:
3333
- "139.229.134.120 139.229.134.149"
3434
search_domains: "%{alias('dhcp::dnsdomain')}"
35+
BDC-Ayekan:
36+
network: "139.229.144.0"
37+
mask: "255.255.255.192"
38+
gateway: "139.229.144.62"
39+
range:
40+
- "139.229.144.40 139.229.144.59"
41+
search_domains: "%{alias('dhcp::dnsdomain')}"
42+
DEV-MGT:
43+
network: "139.229.144.64"
44+
mask: "255.255.255.192"
45+
gateway: "139.229.144.126"
46+
range:
47+
- "139.229.144.100 139.229.144.123"
48+
search_domains: "%{alias('dhcp::dnsdomain')}"

hieradata/node/foreman.ls.lsst.org.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,6 @@ dhcp::pools:
7878
range:
7979
- "139.229.142.230 139.229.142.250"
8080
search_domains: "%{alias('dhcp::dnsdomain')}"
81-
BDC-Ayekan:
82-
network: "139.229.144.0"
83-
mask: "255.255.255.192"
84-
gateway: "139.229.144.62"
85-
range:
86-
- "139.229.144.40 139.229.144.59"
87-
search_domains: "%{alias('dhcp::dnsdomain')}"
8881
BDC-Teststand-DDS: # vlan2301
8982
network: "139.229.145.0"
9083
mask: "255.255.255.0"

spec/hosts/nodes/ayekan01.ls.lsst.org_spec.rb renamed to spec/hosts/nodes/ayekan01.dev.lsst.org_spec.rb

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe 'ayekan01.ls.lsst.org', :sitepp do
5+
describe 'ayekan01.dev.lsst.org', :sitepp do
66
on_supported_os.each do |os, os_facts|
77
next unless os =~ %r{almalinux-9-x86_64}
88

@@ -19,18 +19,23 @@
1919
end
2020
let(:node_params) do
2121
{
22-
role: 'rke',
22+
role: 'rke2server',
2323
site: 'dev',
2424
cluster: 'ayekan',
2525
}
2626
end
2727

28+
it { is_expected.to compile.with_all_deps }
29+
2830
include_examples 'baremetal'
2931
include_context 'with nm interface'
3032
include_examples 'ceph cluster'
31-
include_examples 'docker', docker_version: '24.0.9'
3233

33-
it { is_expected.to compile.with_all_deps }
34+
it do
35+
expect(catalogue.resource('class', 'rke2')[:config]).to include(
36+
'node-label' => ['role=storage-node']
37+
)
38+
end
3439

3540
it do
3641
is_expected.to contain_class('profile::core::sysctl::rp_filter').with_enable(false)
@@ -48,8 +53,19 @@
4853
end
4954

5055
it do
51-
is_expected.to contain_class('rke').with(
52-
version: '1.6.5'
56+
is_expected.to contain_class('rke2').with(
57+
node_type: 'server',
58+
release_series: '1.31',
59+
version: '1.31.6~rke2r1'
60+
)
61+
end
62+
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+
}
5369
)
5470
end
5571

spec/hosts/nodes/foreman.dev.lsst.org_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@
6464
gateway: '139.229.134.254'
6565
)
6666
end
67+
68+
it do
69+
is_expected.to contain_dhcp__pool('BDC-Ayekan').with(
70+
network: '139.229.144.0',
71+
mask: '255.255.255.192',
72+
range: ['139.229.144.40 139.229.144.59'],
73+
gateway: '139.229.144.62'
74+
)
75+
end
76+
77+
it do
78+
is_expected.to contain_dhcp__pool('DEV-MGT').with(
79+
network: '139.229.144.64',
80+
mask: '255.255.255.192',
81+
range: ['139.229.144.100 139.229.144.123'],
82+
gateway: '139.229.144.126'
83+
)
84+
end
6785
end # on os
6886
end # on_supported_os
6987
end # role

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,6 @@
120120
)
121121
end
122122

123-
it do
124-
is_expected.to contain_dhcp__pool('BDC-Ayekan').with(
125-
network: '139.229.144.0',
126-
mask: '255.255.255.192',
127-
range: ['139.229.144.40 139.229.144.59'],
128-
gateway: '139.229.144.62'
129-
)
130-
end
131-
132123
it do
133124
is_expected.to contain_dhcp__pool('BDC-Teststand-DDS').with(
134125
network: '139.229.145.0',

spec/support/spec/ipset.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
is_expected.to contain_ipset__set('dev').with_set(
4242
%w[
4343
139.229.134.0/24
44+
139.229.144.0/26
4445
]
4546
).that_comes_before('Class[firewall]')
4647
end

0 commit comments

Comments
 (0)