diff --git a/hieradata/role/htcondor.yaml b/hieradata/role/htcondor.yaml index 8c9b2b6f9e..f3eedd3e24 100644 --- a/hieradata/role/htcondor.yaml +++ b/hieradata/role/htcondor.yaml @@ -4,4 +4,13 @@ classes: - "profile::core::common" - "profile::core::nfsclient" +packages: + - "nano" + +files: + /etc/profile.d/rubin.sh: + ensure: file + mode: "0600" + content: "export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml" + htcondor::htcondor_version: "23.0" diff --git a/hieradata/site/cp/role/htcondor.yaml b/hieradata/site/cp/role/htcondor.yaml index 2a71305718..7d53aebd6e 100644 --- a/hieradata/site/cp/role/htcondor.yaml +++ b/hieradata/site/cp/role/htcondor.yaml @@ -3,11 +3,31 @@ htcondor::htcondor_host: "htcondor-cm.cp.lsst.org" nfs::client_enabled: true nfs::client_mounts: - /mnt/project: + /project: share: "project" server: "nfs1.cp.lsst.org" atboot: true - /mnt/rsphome: + /rsphome: share: "rsphome" server: "nfs-rsphome.cp.lsst.org" atboot: true + /repo/LATISS: + share: "/auxtel/repo/LATISS" + server: "nfs-auxtel.cp.lsst.org" + atboot: true + /repo/LSSTComCam: + share: "/repo/LSSTComCam" + server: "comcam-archiver.cp.lsst.org" + atboot: true + /readonly/lsstdata/other: + share: "lsstdata" + server: "nfs1.cp.lsst.org" + atboot: true + /readonly/lsstdata/comcam: + share: "lsstdata" + server: "comcam-archiver.cp.lsst.org" + atboot: true + /readonly/lsstdata/auxtel: + share: "/auxtel/lsstdata" + server: "nfs-auxtel.cp.lsst.org" + atboot: true diff --git a/hieradata/site/dev/role/htcondor.yaml b/hieradata/site/dev/role/htcondor.yaml index 465b0e0b2e..459eba0404 100644 --- a/hieradata/site/dev/role/htcondor.yaml +++ b/hieradata/site/dev/role/htcondor.yaml @@ -3,11 +3,11 @@ htcondor::htcondor_host: "htcondor-cm.dev.lsst.org" nfs::client_enabled: true nfs::client_mounts: - /mnt/project: + /project: share: "project" server: "nfs-project.ls.lsst.org" atboot: true - /mnt/rsphome: + /rsphome: share: "rsphome" server: "nfs-rsphome.ls.lsst.org" atboot: true diff --git a/hieradata/site/ls/role/htcondor.yaml b/hieradata/site/ls/role/htcondor.yaml index 858fb590dc..008e7ca1e9 100644 --- a/hieradata/site/ls/role/htcondor.yaml +++ b/hieradata/site/ls/role/htcondor.yaml @@ -3,11 +3,23 @@ htcondor::htcondor_host: "htcondor-cm.ls.lsst.org" nfs::client_enabled: true nfs::client_mounts: - /mnt/project: + /project: share: "project" server: "nfs-project.ls.lsst.org" atboot: true - /mnt/rsphome: + /rsphome: share: "rsphome" server: "nfs-rsphome.ls.lsst.org" atboot: true + /repo/LATISS: + share: "/auxtel/repo/LATISS" + server: "nfs-auxtel.ls.lsst.org" + atboot: true + /data/lsstdata/BTS/auxtel: + share: "/auxtel/lsstdata/BTS/auxtel" + server: "nfs-auxtel.ls.lsst.org" + atboot: true + /datasets: + share: "lsstdata" + server: "nfs-lsstdata.ls.lsst.org" + atboot: true diff --git a/spec/hosts/roles/htcondor_spec.rb b/spec/hosts/roles/htcondor_spec.rb index c2f678cce2..792477a7e3 100644 --- a/spec/hosts/roles/htcondor_spec.rb +++ b/spec/hosts/roles/htcondor_spec.rb @@ -17,171 +17,176 @@ } end - fqdn = "#{role}.dev.lsst.org" - # rubocop:disable RSpec/RepeatedExampleGroupDescription - describe fqdn, :sitepp do - # rubocop:enable RSpec/RepeatedExampleGroupDescription - override_facts(os_facts, fqdn: fqdn, networking: { fqdn => fqdn }) - let(:site) { 'dev' } - - it { is_expected.to compile.with_all_deps } - - %w[ - profile::core::common - profile::core::nfsclient - htcondor - ].each do |c| - it { is_expected.to contain_class(c) } - end - - it { is_expected.to contain_class('htcondor').with_htcondor_version('23.0') } - - it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.dev.lsst.org') } - - it do - is_expected.to contain_nfs__client__mount('/mnt/rsphome').with( - share: 'rsphome', - server: 'nfs-rsphome.ls.lsst.org', - atboot: true, - ) - end - - it do - is_expected.to contain_nfs__client__mount('/mnt/project').with( - share: 'project', - server: 'nfs-project.ls.lsst.org', - atboot: true, - ) - end - - it { is_expected.to contain_yumrepo('condor') } - - it do - is_expected.to contain_package('condor') - .that_requires('Yumrepo[condor]') - end - - it { is_expected.to contain_file('/etc/condor/condor_config.local') } - - it { is_expected.to contain_file('/etc/condor/config.d/schedd').with_content(%r{^DAEMON_LIST = MASTER, SCHEDD}) } - - it do - is_expected.to contain_service('condor').with( - ensure: 'running', - enable: true, - ) - end - end - - fqdn = "#{role}.ls.lsst.org" - # rubocop:disable RSpec/RepeatedExampleGroupDescription - describe fqdn, :sitepp do - # rubocop:enable RSpec/RepeatedExampleGroupDescription - override_facts(os_facts, fqdn: fqdn, networking: { fqdn => fqdn }) - let(:site) { 'ls' } - - it { is_expected.to compile.with_all_deps } - - %w[ - profile::core::common - profile::core::nfsclient - htcondor - ].each do |c| - it { is_expected.to contain_class(c) } - end - - it { is_expected.to contain_class('htcondor').with_htcondor_version('23.0') } - - it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.ls.lsst.org') } - - it do - is_expected.to contain_nfs__client__mount('/mnt/rsphome').with( - share: 'rsphome', - server: 'nfs-rsphome.ls.lsst.org', - atboot: true, - ) - end - - it do - is_expected.to contain_nfs__client__mount('/mnt/project').with( - share: 'project', - server: 'nfs-project.ls.lsst.org', - atboot: true, - ) - end - - it { is_expected.to contain_yumrepo('condor') } - - it do - is_expected.to contain_package('condor') - .that_requires('Yumrepo[condor]') - end - - it { is_expected.to contain_file('/etc/condor/condor_config.local') } - - it { is_expected.to contain_file('/etc/condor/config.d/schedd').with_content(%r{^DAEMON_LIST = MASTER, SCHEDD}) } - - it do - is_expected.to contain_service('condor').with( - ensure: 'running', - enable: true, - ) - end - end # host - - fqdn = "#{role}.cp.lsst.org" - # rubocop:disable RSpec/RepeatedExampleGroupDescription - describe fqdn, :sitepp do - # rubocop:enable RSpec/RepeatedExampleGroupDescription - override_facts(os_facts, fqdn: fqdn, networking: { fqdn => fqdn }) - let(:site) { 'cp' } - - it { is_expected.to compile.with_all_deps } - - %w[ - profile::core::common - profile::core::nfsclient - htcondor - ].each do |c| - it { is_expected.to contain_class(c) } - end - - it { is_expected.to contain_class('htcondor').with_htcondor_version('23.0') } - - it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.cp.lsst.org') } - - it do - is_expected.to contain_nfs__client__mount('/mnt/rsphome').with( - share: 'rsphome', - server: 'nfs-rsphome.cp.lsst.org', - atboot: true, - ) - end - - it do - is_expected.to contain_nfs__client__mount('/mnt/project').with( - share: 'project', - server: 'nfs1.cp.lsst.org', - atboot: true, - ) - end - - it { is_expected.to contain_yumrepo('condor') } - - it do - is_expected.to contain_package('condor') - .that_requires('Yumrepo[condor]') - end - - it { is_expected.to contain_file('/etc/condor/condor_config.local') } - - it { is_expected.to contain_file('/etc/condor/config.d/schedd').with_content(%r{^DAEMON_LIST = MASTER, SCHEDD}) } - - it do - is_expected.to contain_service('condor').with( - ensure: 'running', - enable: true, - ) + lsst_sites.each do |site| + next if site == 'tu' + fqdn = "#{role}.#{site}.lsst.org" + override_facts(os_facts, fqdn: fqdn, networking: { 'fqdn' => fqdn }) + + describe fqdn, :sitepp do + let(:site) { site } + + it { is_expected.to compile.with_all_deps } + %w[ + profile::core::common + profile::core::nfsclient + htcondor + ].each do |c| + it { is_expected.to contain_class(c) } + end + + it { is_expected.to contain_package('nano') } + + it do + is_expected.to contain_file('/etc/profile.d/rubin.sh').with( + ensure: 'file', + mode: '0600', + content: 'export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml', + ) + end + + it { is_expected.to contain_class('htcondor').with_htcondor_version('23.0') } + + it { is_expected.to contain_yumrepo('condor') } + + it do + is_expected.to contain_package('condor') + .that_requires('Yumrepo[condor]') + end + + it { is_expected.to contain_file('/etc/condor/condor_config.local') } + + it { is_expected.to contain_file('/etc/condor/config.d/schedd').with_content(%r{^DAEMON_LIST = MASTER, SCHEDD}) } + + it do + is_expected.to contain_service('condor').with( + ensure: 'running', + enable: true, + ) + end + + if site == 'dev' + it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.dev.lsst.org') } + + it do + is_expected.to contain_nfs__client__mount('/rsphome').with( + share: 'rsphome', + server: 'nfs-rsphome.ls.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/project').with( + share: 'project', + server: 'nfs-project.ls.lsst.org', + atboot: true, + ) + end + end + + if site == 'ls' + it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.ls.lsst.org') } + + it do + is_expected.to contain_nfs__client__mount('/rsphome').with( + share: 'rsphome', + server: 'nfs-rsphome.ls.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/project').with( + share: 'project', + server: 'nfs-project.ls.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/repo/LATISS').with( + share: '/auxtel/repo/LATISS', + server: 'nfs-auxtel.ls.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/data/lsstdata/BTS/auxtel').with( + share: '/auxtel/lsstdata/BTS/auxtel', + server: 'nfs-auxtel.ls.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/datasets').with( + share: 'lsstdata', + server: 'nfs-lsstdata.ls.lsst.org', + atboot: true, + ) + end + end + + if site == 'cp' + it { is_expected.to contain_class('htcondor').with_htcondor_host('htcondor-cm.cp.lsst.org') } + + it do + is_expected.to contain_nfs__client__mount('/rsphome').with( + share: 'rsphome', + server: 'nfs-rsphome.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/project').with( + share: 'project', + server: 'nfs1.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/repo/LATISS').with( + share: '/auxtel/repo/LATISS', + server: 'nfs-auxtel.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/repo/LSSTComCam').with( + share: '/repo/LSSTComCam', + server: 'comcam-archiver.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/readonly/lsstdata/other').with( + share: 'lsstdata', + server: 'nfs1.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/readonly/lsstdata/comcam').with( + share: 'lsstdata', + server: 'comcam-archiver.cp.lsst.org', + atboot: true, + ) + end + + it do + is_expected.to contain_nfs__client__mount('/readonly/lsstdata/auxtel').with( + share: '/auxtel/lsstdata', + server: 'nfs-auxtel.cp.lsst.org', + atboot: true, + ) + end + end end end # host end # on os