From 5e17bba6d86a729dd67b4e0fe873a39a1be9125c Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Tue, 9 May 2023 15:41:39 -0700 Subject: [PATCH 1/4] (node/auxtel-mcm.tu.lsst.org) rm nfs mounts --- hieradata/node/auxtel-mcm.tu.lsst.org.yaml | 7 --- .../nodes/auxtel-mcm.tu.lsst.org_spec.rb | 46 +++++++++++++++++++ 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb diff --git a/hieradata/node/auxtel-mcm.tu.lsst.org.yaml b/hieradata/node/auxtel-mcm.tu.lsst.org.yaml index d01b71b40a..f255050842 100644 --- a/hieradata/node/auxtel-mcm.tu.lsst.org.yaml +++ b/hieradata/node/auxtel-mcm.tu.lsst.org.yaml @@ -41,13 +41,6 @@ network::mroutes_hash: "140.252.147.48/28": "140.252.147.17" "140.252.147.128/27": "140.252.147.17" -nfs::client_enabled: true -nfs::client_mounts: - /ccs-data: - share: "ccs-data" - server: "auxtel-fp01.tu.lsst.org" - atboot: true - ccs_software::services: prod: - "lockmanager" diff --git a/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb new file mode 100644 index 0000000000..15536ddc2e --- /dev/null +++ b/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'auxtel-mcm.tu.lsst.org', :site do + centos7 = FacterDB.get_facts({ operatingsystem: 'CentOS', operatingsystemmajrelease: '7' }).first + # rubocop:disable Naming/VariableNumber + { 'centos-7-x86_64': centos7 }.each do |os, facts| + # rubocop:enable Naming/VariableNumber + context "on #{os}" do + let(:facts) { facts.merge(fqdn: 'auxtel-mcm.tu.lsst.org') } + let(:node_params) do + { + role: 'atsccs', + site: 'tu', + cluster: 'auxtel-ccs', + } + end + + let(:alert_email) do + 'tucson-teststand-aler-aaaae4zsdubhmm3n7mowaugr2y@lsstc.slack.com' + end + + it { is_expected.to compile.with_all_deps } + + include_examples 'ccs alerts' + include_context 'with nm interface' + + it { is_expected.to contain_package('OpenSpliceDDS') } + it { is_expected.to contain_file('/etc/ccs/setup-sal5').with_content(%r{^export LSST_DDS_INTERFACE=auxtel-mcm-dds.tu.lsst.org}) } + it { is_expected.to contain_file('/etc/ccs/setup-sal5').with_content(%r{^export LSST_DDS_PARTITION_PREFIX=tucson}) } + it { is_expected.to contain_class('Ccs_software::Service') } + + it do + is_expected.to contain_class('clustershell').with( + groupmembers: { + 'all' => { + 'group' => 'all', + 'member' => 'auxtel-fp01,auxtel-mcm', + }, + }, + ) + end + end # on os + end # on_supported_os +end # role From eacdf5861321373bd8d695acdaac66781ad1ee80 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Tue, 9 May 2023 15:42:38 -0700 Subject: [PATCH 2/4] (node/auxtel-mcm.cp.lsst.org) rm nfs mounts --- hieradata/node/auxtel-mcm.cp.lsst.org.yaml | 12 ------------ spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb | 16 ---------------- 2 files changed, 28 deletions(-) diff --git a/hieradata/node/auxtel-mcm.cp.lsst.org.yaml b/hieradata/node/auxtel-mcm.cp.lsst.org.yaml index 1ffa178a9f..5ce7dfe467 100644 --- a/hieradata/node/auxtel-mcm.cp.lsst.org.yaml +++ b/hieradata/node/auxtel-mcm.cp.lsst.org.yaml @@ -49,15 +49,3 @@ ccs_software::services: - "localdb" - "lockmanager" - "rest-server" - -nfs::client_enabled: true - -nfs::client_mounts: - /data: - share: "data" - server: "auxtel-fp01.cp.lsst.org" - atboot: true - /repo: - share: "repo" - server: "auxtel-archiver.cp.lsst.org" - atboot: true diff --git a/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb index e5ede96716..d83a68ef48 100644 --- a/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb @@ -20,22 +20,6 @@ end it { is_expected.to compile.with_all_deps } - - it do - is_expected.to contain_nfs__client__mount('/data').with( - share: 'data', - server: 'auxtel-fp01.cp.lsst.org', - atboot: true, - ) - end - - it do - is_expected.to contain_nfs__client__mount('/repo').with( - share: 'repo', - server: 'auxtel-archiver.cp.lsst.org', - atboot: true, - ) - end end # on os end # on_supported_os end # role From d38f0af7ca546d43e885b786bbd818adee37e7e4 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Tue, 9 May 2023 15:29:28 -0700 Subject: [PATCH 3/4] (role/ccs-mcm) include profile::core::debugutils --- hieradata/role/ccs-mcm.yaml | 1 + spec/hosts/roles/ccs_mcm_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/hieradata/role/ccs-mcm.yaml b/hieradata/role/ccs-mcm.yaml index ab0f220129..e472fdd098 100644 --- a/hieradata/role/ccs-mcm.yaml +++ b/hieradata/role/ccs-mcm.yaml @@ -5,6 +5,7 @@ classes: - "profile::ccs::graphical" - "profile::ccs::tomcat" - "profile::core::common" + - "profile::core::debugutils" nginx::confd_purge: true nginx::server_purge: true diff --git a/spec/hosts/roles/ccs_mcm_spec.rb b/spec/hosts/roles/ccs_mcm_spec.rb index 4e4be7957d..7f13838340 100644 --- a/spec/hosts/roles/ccs_mcm_spec.rb +++ b/spec/hosts/roles/ccs_mcm_spec.rb @@ -35,6 +35,7 @@ include_examples 'common', facts: facts include_examples 'ccs common', facts: facts include_examples 'x2go packages' + include_examples 'debugutils' end # host end # lsst_sites end # cluster From 0125f3a1181aa7f9b1c60dddd394514bead4a9be Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Tue, 9 May 2023 15:37:12 -0700 Subject: [PATCH 4/4] (role/ccs-mcm) merge role/atsccs into role/ccs-mcm --- hieradata/role/atsccs.yaml | 13 ------- .../osfamily/RedHat/major/7.yaml | 0 .../nodes/auxtel-dc01.cp.lsst.org_spec.rb | 2 +- .../nodes/auxtel-dc01.ls.lsst.org_spec.rb | 2 +- .../nodes/auxtel-mcm.cp.lsst.org_spec.rb | 2 +- .../nodes/auxtel-mcm.ls.lsst.org_spec.rb | 2 +- .../nodes/auxtel-mcm.tu.lsst.org_spec.rb | 2 +- spec/hosts/roles/atsccs_spec.rb | 37 ------------------- spec/hosts/roles/ccs_mcm_spec.rb | 2 + 9 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 hieradata/role/atsccs.yaml rename hieradata/role/{atsccs => ccs-mcm}/osfamily/RedHat/major/7.yaml (100%) delete mode 100644 spec/hosts/roles/atsccs_spec.rb diff --git a/hieradata/role/atsccs.yaml b/hieradata/role/atsccs.yaml deleted file mode 100644 index bf9f2caf36..0000000000 --- a/hieradata/role/atsccs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# XXX rename to auxtel-mcm ---- -classes: - - "ccs_sal" - - "profile::ccs::common" - - "profile::core::common" - - "profile::core::debugutils" - - "profile::core::nfsclient" - - "profile::core::nfsserver" - -profile::core::systemd::tmpfile: - docker_tmp.conf: # XXX short term kludge - content: "x /tmp/docker_tmp 0777 saluser saluser -" diff --git a/hieradata/role/atsccs/osfamily/RedHat/major/7.yaml b/hieradata/role/ccs-mcm/osfamily/RedHat/major/7.yaml similarity index 100% rename from hieradata/role/atsccs/osfamily/RedHat/major/7.yaml rename to hieradata/role/ccs-mcm/osfamily/RedHat/major/7.yaml diff --git a/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb index f23c831da9..1a0e0c51f1 100644 --- a/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb @@ -13,7 +13,7 @@ let(:node_params) do { - role: 'atsccs', + role: 'ccs-dc', site: 'cp', cluster: 'auxtel-ccs', } diff --git a/spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb index 4a000cc6f0..c4d45543d8 100644 --- a/spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb @@ -10,7 +10,7 @@ let(:facts) { facts.merge(fqdn: 'auxtel-dc01.ls.lsst.org') } let(:node_params) do { - role: 'atsccs', + role: 'ccs-dc', site: 'ls', cluster: 'auxtel-ccs', variant: '1114s', diff --git a/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb index d83a68ef48..e277064de0 100644 --- a/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-mcm.cp.lsst.org_spec.rb @@ -13,7 +13,7 @@ let(:node_params) do { - role: 'atsccs', + role: 'ccs-mcm', site: 'cp', cluster: 'auxtel-ccs', } diff --git a/spec/hosts/nodes/auxtel-mcm.ls.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-mcm.ls.lsst.org_spec.rb index 8f68e24cba..a665ab3782 100644 --- a/spec/hosts/nodes/auxtel-mcm.ls.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-mcm.ls.lsst.org_spec.rb @@ -15,7 +15,7 @@ let(:node_params) do { - role: 'atsccs', + role: 'ccs-mcm', site: 'ls', cluster: 'auxtel-ccs', variant: '1114s', diff --git a/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb index 15536ddc2e..eb3d2940c9 100644 --- a/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-mcm.tu.lsst.org_spec.rb @@ -11,7 +11,7 @@ let(:facts) { facts.merge(fqdn: 'auxtel-mcm.tu.lsst.org') } let(:node_params) do { - role: 'atsccs', + role: 'ccs-mcm', site: 'tu', cluster: 'auxtel-ccs', } diff --git a/spec/hosts/roles/atsccs_spec.rb b/spec/hosts/roles/atsccs_spec.rb deleted file mode 100644 index 65731486ad..0000000000 --- a/spec/hosts/roles/atsccs_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -role = 'atsccs' - -describe "#{role} role" do - on_supported_os.each do |os, facts| - context "on #{os}" do - let(:facts) do - facts.merge( - fqdn: self.class.description, - ) - end - - let(:node_params) do - { - role: role, - site: site, - cluster: 'auxtel-ccs', - } - end - - lsst_sites.each do |site| - describe "#{role}.#{site}.lsst.org", :site do - let(:site) { site } - - it { is_expected.to compile.with_all_deps } - - include_examples 'common', facts: facts - include_examples 'ccs common', facts: facts - it { is_expected.to contain_class('ccs_sal') } - end # host - end # lsst_sites - end # on os - end # on_supported_os -end # role diff --git a/spec/hosts/roles/ccs_mcm_spec.rb b/spec/hosts/roles/ccs_mcm_spec.rb index 7f13838340..9cbe29ce93 100644 --- a/spec/hosts/roles/ccs_mcm_spec.rb +++ b/spec/hosts/roles/ccs_mcm_spec.rb @@ -16,6 +16,7 @@ %w[ comcam-ccs auxtel-ccs + lsstcam-ccs ].each do |cluster| context "#{cluster} cluster" do let(:node_params) do @@ -36,6 +37,7 @@ include_examples 'ccs common', facts: facts include_examples 'x2go packages' include_examples 'debugutils' + it { is_expected.to contain_class('ccs_sal') } end # host end # lsst_sites end # cluster