Skip to content

Commit

Permalink
Merge pull request #1472 from lsst-it/IT-5657_add_k5login_lsstcam_arc…
Browse files Browse the repository at this point in the history
…hiver

 (node/lsstcam-archiver.cp.lsst.org) fwv
  • Loading branch information
jhoblitt authored Sep 23, 2024
2 parents 2ab4647 + 54e852d commit 7f0c352
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hieradata/node/lsstcam-archiver.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
nfs::client_mounts:
/data:
share: "lsstcam"
server: "nfs3.cp.lsst.org"
atboot: true

profile::core::k5login::k5login:
"/home/saluser/.k5login":
ensure: "present"
principals:
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
- "ccs-ipa/[email protected]"
6 changes: 6 additions & 0 deletions hieradata/role/nfsclient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
classes:
- "profile::core::common"
- "profile::core::nfsclient"

nfs::client_enabled: true
53 changes: 53 additions & 0 deletions spec/hosts/nodes/lsstcam-archiver.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'lsstcam-archiver.cp.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next if os =~ %r{centos-7-x86_64}

context "on #{os}" do
let(:facts) do
lsst_override_facts(os_facts,
is_virtual: false,
virtual: 'physical',
dmi: {
'product' => {
'name' => 'AS -1114S-WN10RT',
},
})
end
let(:node_params) do
{
role: 'nfsclient',
site: 'cp',
variant: '1114s',
}
end

it { is_expected.to compile.with_all_deps }

principals = 1.upto(10).map do |i|
format('ccs-ipa/lsstcam-dc%[email protected]', i)
end

it { is_expected.to contain_class('nfs').with_server_enabled(false) }
it { is_expected.to contain_class('nfs').with_client_enabled(true) }

it do
is_expected.to contain_nfs__client__mount('/data').with(
share: 'lsstcam',
server: 'nfs3.cp.lsst.org',
atboot: true
)
end

it do
is_expected.to contain_k5login('/home/saluser/.k5login').with(
ensure: 'present',
principals:
)
end
end # on os
end # on_supported_os
end # role
35 changes: 35 additions & 0 deletions spec/hosts/roles/nfsclient_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# frozen_string_literal: true

require 'spec_helper'

role = 'nfsclient'

describe "#{role} role" do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
describe 'nfsclient.cp.lsst.org', :sitepp do
site = 'cp'
let(:site) { site }
let(:node_params) do
{
role:,
site:,
}
end
let(:facts) { lsst_override_facts(os_facts) }

it { is_expected.to compile.with_all_deps }

include_examples('common', os_facts:, site:)

it do
is_expected.to contain_class('nfs').with(
server_enabled: false,
client_enabled: true,
nfs_v4_client: true
)
end
end
end # on os
end # on_supported_os
end # role

0 comments on commit 7f0c352

Please sign in to comment.