-
Notifications
You must be signed in to change notification settings - Fork 2
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
Changes from all commits
6b0c596
68b08ac
a6af2a2
21af74a
6d78a3c
8743928
30e4a84
eaa196a
aef0b7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
ccs_site: "tucson" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
||
ccs_monit::alert: | ||
## tucson-teststand-alerts | ||
- "tucson-teststand-aler-aaaae4zsdubhmm3n7mowaugr2y@lsstc.slack.com" | ||
ccs_monit::hwraid: false |
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 ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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}") | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%- | String $setup_file | -%> | ||
system.pre-execute=<%= $setup_file %> |
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 |
There was a problem hiding this comment.
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.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.