Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCS changes for Tucson test-stand #464

Merged
merged 9 commits into from
Nov 9, 2021
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - I usually sort the inclusion list but the linter doesn't care.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted.

- "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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhoblitt Yes, if you are ok with it, please merge it, thanks.


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dds interface still hasn't shown up in foreman for some reason. I'll sort this out tomorrow.


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 (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be completely stand alone and could be in an external module. There are a bunch of example of things in the tree that should be in an external module as they aren't a composition. I don't object to merging this now but it should probably be moved external at some point in the future in the interest of keeping our profile tree small.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will try to separate it out at some point in the future.

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