Skip to content

Commit

Permalink
Merge pull request #1140 from lsst-it/IT-5315_add_bridge_ruka
Browse files Browse the repository at this point in the history
(cluster/ruka) add br2101 for htcondor
  • Loading branch information
cbarria authored May 8, 2024
2 parents 5da7fa6 + 22d7c7e commit 36ee2b0
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 125 deletions.
58 changes: 34 additions & 24 deletions hieradata/cluster/ruka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,38 @@ clustershell::groupmembers:
ruka: {group: "ruka", member: "ruka[01-05]"}
profile::core::rke::enable_dhcp: true
nm::connections:
br2101:
content:
connection:
id: "br2101"
uuid: "488bf841-4a72-4e02-af3c-34a64493d677"
type: "bridge"
interface-name: "br2101"
ethernet: {}
bridge:
stp: "false"
ipv4:
method: "disabled"
ipv6:
method: "disabled"
proxy: {}
br2505:
content: |
[connection]
id=br2505
uuid=61800cc2-7bf7-4463-de5a-25e7d7c355a4
type=bridge
interface-name=br2505
[ethernet]
[bridge]
stp=false
[ipv4]
method=disabled
route1=139.229.153.0/24
route1_options=table=2505
route2=0.0.0.0/0,139.229.153.254
route2_options=table=2505
routing-rule1=priority 100 from 139.229.153.64/26 table 2505
[ipv6]
method=disabled
[proxy]
content:
connection:
id: "br2505"
uuid: "61800cc2-7bf7-4463-de5a-25e7d7c355a4"
type: "bridge"
interface-name: "br2505"
ethernet: {}
bridge:
stp: "false"
ipv4:
method: "disabled"
route1: "139.229.153.0/24"
route1_options: "table=2505"
route2: "0.0.0.0/0,139.229.153.254"
route2_options: "table=2505"
routing-rule1: "priority 100 from 139.229.153.64/26 table 2505"
ipv6:
method: "disabled"
proxy: {}
102 changes: 54 additions & 48 deletions hieradata/cluster/ruka/variant/r430.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
---
nm::connections:
enp5s0f0: # fqdn
content: |
[connection]
id=enp5s0f0
uuid=688bf5bf-d649-34b4-15eb-b07c50ac43f8
type=ethernet
interface-name=enp5s0f0
[ethernet]
[ipv4]
method=auto
[ipv6]
method=disabled
enp5s0f1: # trunk
content: |
[connection]
id=enp5s0f1
uuid=46d19ce1-bcab-7e77-6fc7-b730b26c54b1
type=ethernet
autoconnect=false
interface-name=enp5s0f1
[ethernet]
[ipv4]
method=disabled
[ipv6]
method=disabled
enp5s0f0:
content:
connection:
id: "enp5s0f0"
uuid: "688bf5bf-d649-34b4-15eb-b07c50ac43f8"
type: "ethernet"
interface-name: "enp5s0f0"
ethernet: {}
ipv4:
method: "auto"
ipv6:
method: "disabled"
enp5s0f1:
content:
connection:
id: "enp5s0f1"
uuid: "46d19ce1-bcab-7e77-6fc7-b730b26c54b1"
type: "ethernet"
autoconnect: "false"
interface-name: "enp5s0f1"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"
enp5s0f1.2101:
content:
connection:
id: "enp5s0f1.2101"
uuid: "89e2562d-37b5-4124-bb8e-f1261492e1fa"
type: "vlan"
interface-name: "enp5s0f1.2101"
master: "br2101"
slave-type: "bridge"
ethernet: {}
vlan:
flags: "1"
id: "2101"
parent: "enp5s0f1"
bridge-port: {}
enp5s0f1.2505:
content: |
[connection]
id=enp5s0f1.2505
uuid=d5642f16-53c6-6053-7d4d-8c6ef5ae8a38
type=vlan
interface-name=enp5s0f1.2505
master=br2505
slave-type=bridge
[ethernet]
[vlan]
flags=1
id=2505
parent=enp5s0f1
[bridge-port]
content:
connection:
id: "enp5s0f1.2505"
uuid: "d5642f16-53c6-6053-7d4d-8c6ef5ae8a38"
type: "vlan"
interface-name: "enp5s0f1.2505"
master: "br2505"
slave-type: "bridge"
ethernet: {}
vlan:
flags: "1"
id: "2505"
parent: "enp5s0f1"
bridge-port: {}
102 changes: 54 additions & 48 deletions hieradata/cluster/ruka/variant/r440.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
---
nm::connections:
ens2f1: # fqdn
content: |
[connection]
id=ens2f1
uuid=688bf5bf-d649-34b4-15eb-b07c50ac43f8
type=ethernet
interface-name=ens2f1
[ethernet]
[ipv4]
method=auto
[ipv6]
method=disabled
ens2f0: # trunk
content: |
[connection]
id=ens2f0
uuid=46d19ce1-bcab-7e77-6fc7-b730b26c54b1
type=ethernet
autoconnect=false
interface-name=ens2f0
[ethernet]
[ipv4]
method=disabled
[ipv6]
method=disabled
ens2f1:
content:
connection:
id: "ens2f1"
uuid: "688bf5bf-d649-34b4-15eb-b07c50ac43f8"
type: "ethernet"
interface-name: "ens2f1"
ethernet: {}
ipv4:
method: "auto"
ipv6:
method: "disabled"
ens2f0:
content:
connection:
id: "ens2f0"
uuid: "46d19ce1-bcab-7e77-6fc7-b730b26c54b1"
type: "ethernet"
autoconnect: "false"
interface-name: "ens2f0"
ethernet: {}
ipv4:
method: "disabled"
ipv6:
method: "disabled"
ens2f0.2101:
content:
connection:
id: "ens2f0.2101"
uuid: "87823dc2-278d-4ee5-a55a-3730b856141c"
type: "vlan"
interface-name: "ens2f0.2101"
master: "br2101"
slave-type: "bridge"
ethernet: {}
vlan:
flags: "1"
id: "2101"
parent: "ens2f0"
bridge-port: {}
ens2f0.2505:
content: |
[connection]
id=ens2f0.2505
uuid=d5642f16-53c6-6053-7d4d-8c6ef5ae8a38
type=vlan
interface-name=ens2f0.2505
master=br2505
slave-type=bridge
[ethernet]
[vlan]
flags=1
id=2505
parent=ens2f0
[bridge-port]
content:
connection:
id: "ens2f0.2505"
uuid: "d5642f16-53c6-6053-7d4d-8c6ef5ae8a38"
type: "vlan"
interface-name: "ens2f0.2505"
master: "br2505"
slave-type: "bridge"
ethernet: {}
vlan:
flags: "1"
id: "2505"
parent: "ens2f0"
bridge-port: {}
20 changes: 17 additions & 3 deletions spec/hosts/nodes/ruka01.dev.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
variant: 'r440',
}
end
let(:vlan_id) { 2505 }
let(:rt_id) { vlan_id }

it { is_expected.to compile.with_all_deps }

Expand Down Expand Up @@ -70,7 +68,7 @@

include_context 'with nm interface'

it { is_expected.to have_nm__connection_resource_count(6) }
it { is_expected.to have_nm__connection_resource_count(8) }

%w[
eno1
Expand All @@ -92,6 +90,22 @@
it_behaves_like 'nm ethernet interface'
end

context 'with ens2f0.2101' do
let(:interface) { 'ens2f0.2101' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm vlan interface', id: 2101, parent: 'ens2f0'
it_behaves_like 'nm bridge slave interface', master: 'br2101'
end

context 'with br2101' do
let(:interface) { 'br2101' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm no-ip interface'
it_behaves_like 'nm bridge interface'
end

context 'with ens2f0.2505' do
let(:interface) { 'ens2f0.2505' }

Expand Down
19 changes: 17 additions & 2 deletions spec/hosts/nodes/ruka04.dev.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@
variant: 'r430',
}
end
let(:vlan_id) { 2505 }

it { is_expected.to compile.with_all_deps }

include_examples 'baremetal'

include_context 'with nm interface'

it { is_expected.to have_nm__connection_resource_count(8) }
it { is_expected.to have_nm__connection_resource_count(10) }

%w[
eno1
Expand All @@ -62,6 +61,22 @@
it_behaves_like 'nm ethernet interface'
end

context 'with enp5s0f1.2101' do
let(:interface) { 'enp5s0f1.2101' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm vlan interface', id: 2101, parent: 'enp5s0f1'
it_behaves_like 'nm bridge slave interface', master: 'br2101'
end

context 'with br2101' do
let(:interface) { 'br2101' }

it_behaves_like 'nm enabled interface'
it_behaves_like 'nm no-ip interface'
it_behaves_like 'nm bridge interface'
end

context 'with enp5s0f1.2505' do
let(:interface) { 'enp5s0f1.2505' }

Expand Down

0 comments on commit 36ee2b0

Please sign in to comment.