Skip to content

Commit

Permalink
Merge pull request #672 from lsst-it/IT-3057/el8-dnscache-int-names2
Browse files Browse the repository at this point in the history
(dnscache role/nodes) prepare for EL8 stable interfaces names
  • Loading branch information
jhoblitt committed Oct 19, 2022
2 parents ed06a5b + f13cb67 commit b76db32
Show file tree
Hide file tree
Showing 23 changed files with 440 additions and 11 deletions.
2 changes: 1 addition & 1 deletion hieradata/node/dns1.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "139.229.160.53"
4 changes: 4 additions & 0 deletions hieradata/node/dns1.dev.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
network::interfaces_hash:
"%{networking.primary}": # fqdn
ipaddress: "139.229.134.53"
2 changes: 1 addition & 1 deletion hieradata/node/dns1.ls.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "139.229.135.53"
2 changes: 1 addition & 1 deletion hieradata/node/dns1.tu.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "140.252.146.71"
2 changes: 1 addition & 1 deletion hieradata/node/dns2.ls.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "139.229.135.54"
2 changes: 1 addition & 1 deletion hieradata/node/dns2.tu.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "140.252.146.72"
2 changes: 1 addition & 1 deletion hieradata/node/dns3.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "139.229.160.55"
2 changes: 1 addition & 1 deletion hieradata/node/dns3.ls.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "139.229.135.55"
2 changes: 1 addition & 1 deletion hieradata/node/dns3.tu.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
ipaddress: "140.252.146.73"
domain: "tu.lsst.org"
2 changes: 1 addition & 1 deletion hieradata/site/cp/role/dnscache.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
bootproto: "none"
defroute: "yes"
dns1: "%{lookup('dhcp::nameservers.0')}"
Expand Down
13 changes: 13 additions & 0 deletions hieradata/site/dev/role/dnscache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
network::interfaces_hash:
"%{networking.primary}": # fqdn
bootproto: "none"
defroute: "yes"
dns1: "%{lookup('dhcp::nameservers.0')}"
dns2: "%{lookup('dhcp::nameservers.1')}"
domain: "%{lookup('dhcp::dnsdomain.0')}"
gateway: "139.229.134.254"
netmask: "255.255.255.0"
nozeroconf: "yes"
onboot: "yes"
type: "Ethernet"
2 changes: 1 addition & 1 deletion hieradata/site/ls/role/dnscache.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
bootproto: "none"
defroute: "yes"
dns1: "%{lookup('dhcp::nameservers.0')}"
Expand Down
2 changes: 1 addition & 1 deletion hieradata/site/tu/role/dnscache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dns::allow_recursion:
dns::zones: ~

network::interfaces_hash:
eth0: # fqdn
"%{networking.primary}": # fqdn
bootproto: "none"
defroute: "yes"
dns1: "%{lookup('dhcp::nameservers.0')}"
Expand Down
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns1.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns1.cp.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns1.cp.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'cp',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '139.229.160.53',
gateway: '139.229.160.254',
netmask: '255.255.255.0',
)
end
end # on os
end # on_supported_os
end
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns1.dev.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns1.dev.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns1.dev.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'dev',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '139.229.134.53',
gateway: '139.229.134.254',
netmask: '255.255.255.0',
)
end
end # on os
end # on_supported_os
end
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns1.ls.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns1.ls.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns1.ls.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'ls',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '139.229.135.53',
gateway: '139.229.135.254',
netmask: '255.255.255.0',
)
end
end # on os
end # on_supported_os
end
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns1.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns1.tu.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns1.tu.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'tu',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '140.252.146.71',
gateway: '140.252.146.65',
netmask: '255.255.255.224',
)
end
end # on os
end # on_supported_os
end
43 changes: 43 additions & 0 deletions spec/hosts/nodes/dns2.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns2.cp.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) { 'ens192' }

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns2.cp.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'cp',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '139.229.160.54',
gateway: '139.229.160.254',
netmask: '255.255.255.0',
)
end

it do
is_expected.to contain_network__interface('ens32').with(
ipaddress: '192.168.251.241',
netmask: '255.255.255.0',
gateway: '192.168.251.1',
)
end
end # on os
end # on_supported_os
end
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns2.ls.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns2.ls.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns2.ls.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'ls',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '139.229.135.54',
gateway: '139.229.135.254',
netmask: '255.255.255.0',
)
end
end # on os
end # on_supported_os
end
41 changes: 41 additions & 0 deletions spec/hosts/nodes/dns2.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'dns2.tu.lsst.org', :site do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:primary) do
if (facts[:os]['family'] == 'RedHat') && (facts[:os]['release']['major'] == '7')
'eth0'
else
'ens192'
end
end

let(:facts) do
facts[:networking]['primary'] = primary
facts.merge(
fqdn: 'dns2.tu.lsst.org',
)
end

let(:node_params) do
{
role: 'dnscache',
site: 'tu',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_network__interface(primary).with(
ipaddress: '140.252.146.72',
gateway: '140.252.146.65',
netmask: '255.255.255.224',
)
end
end # on os
end # on_supported_os
end
Loading

0 comments on commit b76db32

Please sign in to comment.