Skip to content

Commit

Permalink
(role/htcondor) installs htcondor scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarria committed Apr 16, 2024
1 parent cebe0ac commit 278ab9c
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 0 deletions.
1 change: 1 addition & 0 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ mod 'lsst/daq', '2.3.0'
mod 'lsst/dellperc', '2.0.0'
mod 'lsst/foreman_envsync', '2.1.0'
mod 'lsst/helm_binary', '2.1.0'
mod 'lsst/htcondor', '0.1.0'
mod 'lsst/ipa', git: 'https://github.com/lsst-it/puppet-ipa', ref: '37eb701'
mod 'lsst/java_artisanal', '3.3.0'
mod 'lsst/kubectl', '1.1.0'
Expand Down
7 changes: 7 additions & 0 deletions hieradata/role/htcondor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
classes:
- "htcondor"
- "profile::core::common"
- "profile::core::nfsclient"

htcondor::htcondor_version: "23.0"
13 changes: 13 additions & 0 deletions hieradata/site/cp/role/htcondor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
htcondor::htcondor_host: "htcondor-cm.cp.lsst.org"

nfs::client_enabled: true
nfs::client_mounts:
/mnt/project:
share: "project"
server: "nfs1.cp.lsst.org"
atboot: true
/mnt/rsphome:
share: "rsphome"
server: "nfs-rsphome.cp.lsst.org"
atboot: true
13 changes: 13 additions & 0 deletions hieradata/site/dev/role/htcondor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
htcondor::htcondor_host: "htcondor-cm.dev.lsst.org"

nfs::client_enabled: true
nfs::client_mounts:
/mnt/project:
share: "project"
server: "nfs-project.ls.lsst.org"
atboot: true
/mnt/rsphome:
share: "rsphome"
server: "nfs-rsphome.ls.lsst.org"
atboot: true
13 changes: 13 additions & 0 deletions hieradata/site/ls/role/htcondor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
htcondor::htcondor_host: "htcondor-cm.ls.lsst.org"

nfs::client_enabled: true
nfs::client_mounts:
/mnt/project:
share: "project"
server: "nfs-project.ls.lsst.org"
atboot: true
/mnt/rsphome:
share: "rsphome"
server: "nfs-rsphome.ls.lsst.org"
atboot: true
189 changes: 189 additions & 0 deletions spec/hosts/roles/htcondor_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# frozen_string_literal: true

require 'spec_helper'

role = 'htcondor'

describe "#{role} role" do
on_supported_os.each do |os, os_facts|
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:facts) { os_facts }
let(:node_params) do
{
role: role,
site: site,
}
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,
)
end
end # host
end # on os
end # on_supported_os
end # role

0 comments on commit 278ab9c

Please sign in to comment.