Skip to content

Commit

Permalink
Merge pull request #464 from lsst-it/ccs-tu-tts
Browse files Browse the repository at this point in the history
CCS changes for Tucson test-stand
  • Loading branch information
jhoblitt authored Nov 9, 2021
2 parents 1062c4c + aef0b7a commit 73b08dd
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 6 deletions.
14 changes: 9 additions & 5 deletions hieradata/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ ccs_sal::rpms:
ccs_sal::rpms_private:
OpenSpliceDDS: "OpenSpliceDDS-6.10.4-6.el7.x86_64.rpm"

ccs_sal::dds_domain: "summit"
## Used in lookups:
ccs_site: "summit"
ccs_instrument: "comcam"

ccs_sal::dds_domain: "%{lookup('ccs_site')}"
ccs_sal::dds_interface: "comcam-mcm-dds"
ccs_sal::instrument: "comcam"
ccs_sal::instrument: "%{lookup('ccs_instrument')}"

ccs_software::global_properties:
- "org.lsst.ccs.subsystem.agent.property.instrument=comcam"
- "org.lsst.ccs.subsystem.agent.property.cluster=comcam"
- "org.lsst.ccs.subsystem.agent.property.site=summit"
- "org.lsst.ccs.subsystem.agent.property.instrument=%{lookup('ccs_instrument')}"
- "org.lsst.ccs.subsystem.agent.property.cluster=%{lookup('ccs_instrument')}"
- "org.lsst.ccs.subsystem.agent.property.site=%{lookup('ccs_site')}"

ccs_monit::mailhost: "mail.lsst.org"
ccs_monit::alert:
Expand Down
7 changes: 7 additions & 0 deletions hieradata/node/comcam-fp01.tu.lsst.org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ nfs::client_mounts:
share: "ccs-data"
server: "%{facts.fqdn}"
atboot: true

ccs_software::services:
prod:
- "comcam-fp"
- "comcam-ih"
## Non-standard ExecStart:
# - "h2db"
1 change: 1 addition & 0 deletions hieradata/org/lsst/role/ccs-mcm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ classes:
- "profile::core::common"
- "profile::ccs::common"
- "profile::ccs::tomcat"
- "profile::ccs::graphical"
- "ccs_sal"

nginx::confd_purge: true
Expand Down
5 changes: 4 additions & 1 deletion hieradata/org/lsst/role/comcam-fp-tts.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
classes:
- "profile::ccs::common"
- "profile::ccs::daq4"
- "profile::ccs::daq_client"
- "profile::ccs::daq_interface"
- "profile::ccs::graphical"
- "profile::core::common"
- "profile::core::nfsclient"
- "profile::core::nfsserver"

profile::ccs::facts::daq: true

profile::ccs::daq_client::version: "R5-V0.6"
10 changes: 10 additions & 0 deletions hieradata/site/tu/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
ccs_site: "tucson"

## FIXME this should be "comcam-mcm-dds", same as real comcam.
ccs_sal::dds_interface: "140.252.147.52"

ccs_monit::alert:
## tucson-teststand-alerts
- "tucson-teststand-aler-aaaae4zsdubhmm3n7mowaugr2y@lsstc.slack.com"
ccs_monit::hwraid: false
77 changes: 77 additions & 0 deletions site/profile/manifests/ccs/daq_client.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## @summary
## Installation of DAQ client:
## Download DAQ tarfile, extract it, create /etc/ccs config files.

class profile::ccs::daq_client (
String $prefix = '/opt/lsst/daq',
String $repo = 'https://repo-nexus.lsst.org/nexus/repository/daq/daq-sdk',
String $version = 'R5-V0.6',
String $owner = 'ccsadm',
String $group = 'ccsadm',
String $config_dir = '/etc/ccs',
String $instrument = 'comcam',
) {
ensure_packages(['tar', 'gzip'])

ensure_resources('file', {
$prefix => {
ensure => directory,
mode => '0775',
owner => $owner,
group => $group,
},
})

$tarfile = "${version}.tgz"

$daq_home = "${prefix}/${version}"

## todo: tarfile is owned by root:root.
archive { "${prefix}/${tarfile}":
ensure => present,
source => "${repo}/${tarfile}",
extract => true,
extract_path => $prefix,
cleanup => false,
creates => $daq_home,
user => $owner,
group => $group,
}

## Point the "current" symlink to this version.
file { "${prefix}/current":
ensure => link,
target => $version,
owner => $owner,
group => $group,
}

if $version =~ /R(\d+)/ {
$daq_version = $1

$daq_setup = "${config_dir}/daqv${daq_version}-setup"

file { $daq_setup:
ensure => file,
content => epp("${module_name}/ccs/daq_client/daqvX-setup.epp", { 'home' => $daq_home }),
owner => $owner,
group => $group,
mode => '0644',
}

## TODO Is it -ih for v4 and -fp for v5?
$appfiles = ['store.app', "${instrument}-ih.app", "${instrument}-fp.app"]

$appfiles.each | $appfile | {
file { "${config_dir}/${appfile}":
ensure => file,
content => epp("${module_name}/ccs/daq_client/daq.app.epp", { 'setup_file' => "${basename($daq_setup)}" }),
owner => $owner,
group => $group,
mode => '0644',
}
}
} else {
fail("Could not figure out DAQ version from ${version}")
}
}
2 changes: 2 additions & 0 deletions site/profile/templates/ccs/daq_client/daq.app.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%- | String $setup_file | -%>
system.pre-execute=<%= $setup_file %>
4 changes: 4 additions & 0 deletions site/profile/templates/ccs/daq_client/daqvX-setup.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%- | String $home | -%>
# This file is managed by Puppet; changes may be overwritten
export DAQ_HOME=<%= $home %>
export LD_LIBRARY_PATH=$DAQ_HOME/x86/lib:$LD_LIBRARY_PATH

0 comments on commit 73b08dd

Please sign in to comment.