Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'lsst-ccs_software', '2.9.0'
Learn more about managing modules with a PuppetfileDocumentation
ccs_software
Table of Contents
- Overview
- Description
- Setup - The basics of getting started with ccs_software
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
Overview
This module manages installations of Camera Control System (CCS) software.
Description
The ccs_software module can optionally manage one or more installations.
Setup
What ccs_software affects
install.py
script- ccs /scripts/
/lsst
link- clone(s) of the package-list repo
- ccs
etc
directory - ccs
log
directory - [optional] /installations/ of ccs software
- [optional] systemd service units for ccs applications
Setup Requirements
ccs
andccsadm
user accounts- The systemd service units created by this module require
java
to be installed on the system. See [java_artisanal
])https://github.com/lsst-it/puppet-java_artisanal)
Usage
Absolute Minimal Example / If you want to manually create installations
When the ccs_software
class is included with no parameters it will create directories, install the install.py
script, etc. but it will not create a CCS installation.
accounts::user { 'ccs': }
accounts::user { 'ccsadm': }
include ccs_software
Example profile
This is an example of minimal
profile
that provides the requirements listed in Setup
requirements. The intent is that the majority of
configuration to the ccs_software
class be provided via hiera data.
class profile::ccs::common {
include ccs_software
include accounts
include java_artisanal
Class['java_artisanal']
-> Class['ccs_software']
accounts::user { 'ccs':
uid => 62000,
gid => 62000,
}
accounts::user { 'ccsadm':
uid => 62001,
gid => 62001,
}
}
Installation(s)
This example creates two installations at the paths /opt/lsst/ccs/master
and
/opt/lsst/ccs/e4a8224
. Where master
and e4a8224
are refs in the
lsst-camera-dh/dev-package-lists
.
---
classes:
- "profile::ccs::common"
ccs_software::hostname: "comcam-mcm" # not required if `comcam-mcm` is the real hostname
ccs_software::env: "ComCam"
ccs_software::installations:
master: {}
e4a8224: {},
The literal invocations of the install.py
command would be something like:
/opt/lsst/release/bin/install.py --ccs_inst_dir /opt/lsst/ccs/master /opt/lsst/ccsadm/package-lists/master/ComCam/comcam-mcm/ccsApplications.txt
and
/opt/lsst/release/bin/install.py --ccs_inst_dir /opt/lsst/ccs/e4a8224 /opt/lsst/ccsadm/package-lists/e4a8224/ComCam/comcam-mcm/ccsApplications.txt
Note that a separate clone of the dev-package-lists
repo is created for each installation.
Service(s)
This example will create a systemd service unit named comcam-mcm
that
executes /opt/lsst/ccs/dev/bin/comcam-mcm
.
classes:
- "profile::ccs::common"
ccs_software::env: "ComCam"
ccs_software::installations:
e4a8224:
aliases:
- "dev"
ccs_software::services:
dev:
- "comcam-mcm"
Desktop
classes:
- "profile::ccs::common"
ccs_software::desktop: true # default is false
Multiple Installations sharing a git clone
This may be an efficiency optimization for simulating a large number of hosts on a single node.
---
classes:
- "profile::ccs::common"
ccs_software::base_path: "/opt/lsst"
ccs_software::env: "ComCam"
ccs_software::installations:
test-mcm:
repo_path: "%{lookup('ccs_software::base_path')}/ccsadm/package-lists/e4a8224"
repo_ref: "e4a8224"
hostname: "comcam-mcm"
test-fp:
repo_path: "%{lookup('ccs_software::base_path')}/ccsadm/package-lists/e4a8224"
repo_ref: "e4a8224"
hostname: "comcam-fp01"
ccs_software::services:
test-mcm:
- "comcam-mcm"
test-fp:
- "comcam-fp01"
Force git clone update
In the event that a git clone has local changes, and the vcsrepo
type is
having trouble updating it, setting the force_git
flag will cause the clones
to be deleted and re-cloned on every puppet run. This flag should generally
only be set temporarily to resolve a known issue.
---
classes:
- "profile::ccs::common"
ccs_software::env: "ComCam"
ccs_software::force_git: true
ccs_software::installations:
master: {}
Pedantic Example
---
classes:
- "profile::ccs::common"
ccs_software::base_path: "/opt/lsst"
ccs_software::etc_path: "/etc/ccs"
ccs_software::log_path: "/var/log/ccs"
ccs_software::user: "ccs"
ccs_software::group: "ccs"
ccs_software::adm_user: "ccsadm"
ccs_software::adm_group: "ccsadm"
ccs_software::pkglist_repo_url: "https://github.com/lsst-camera-dh/dev-package-lists" # overriden in installations hash
ccs_software::release_repo_url: "https://github.com/lsst-it/release"
ccs_software::release_repo_ref: "IT-2233/working"
ccs_software::env: ~ # overriden in installations hash
ccs_software::hostname: "%{lookup(facts.hostname)}" # overidden in installations hash
ccs_software::desktop: false
ccs_software::git_force: false
ccs_software::installations:
test1:
repo_path: "%{lookup('ccs_software::base_path')}/ccsadm/package-lists/test1"
repo_url: "https://github.com/lsst-camera-dh/dev-package-lists"
repo_ref: "e4a8224"
env: "ComCam"
hostname: "comcam-mcm"
aliases:
- "dev"
test42:
repo_path: "%{lookup('ccs_software::base_path')}/ccsadm/package-lists/test42"
repo_url: "https://github.com/lsst-camera-dh/dev-package-lists"
repo_ref: "e4a8224"
env: "IR2"
hostname: "lsst-dc01"
aliases:
- "prod"
ccs_software::services:
dev:
- "comcam-mcm"
prod:
- "lsst-dc01"
Reference
See REFERENCE.
Reference
Table of Contents
Classes
Public Classes
ccs_software
: Installs and configures CCS software
Private Classes
ccs_software::config
: Install /etc/ccs files.ccs_software::desktop
: Add desktop menu entries for CCS apps.ccs_software::install
: Install ccs software.ccs_software::log
: Create /var/log/ccs and install logrotation.ccs_software::pre
: Install ccs software prerequisitesccs_software::service
: Manages ccs systemd service units
Classes
ccs_software
Installs and configures CCS software
Parameters
The following parameters are available in the ccs_software
class:
installations
service_workdir
services
base_path
etc_path
log_path
user
group
adm_user
adm_group
influx_url
influx_name
influx_username
influx_password
kafka_files
kafka_auths
service_email
pkglist_repo_url
release_repo_url
release_repo_ref
env
hostname
desktop
git_force
global_properties
udp_properties
installations
Data type: Hash[String, Hash]
Hash of hashes which describes one or more CCS "installations" to manage.
Options:
- name-of-installation
String
: The top level hash keys are the name of the installation. Eg.,foo
would create the installation/opt/lsst/ccs/<foo>
.
Supported keys in nested hashes:
- repo_path - Overrides the default path to package list repo clone for this installation.
- repo_url - Overrides the
pkglist_repo_url
param for this installation. - repo_ref - Overrides the
pkglist_repo_ref
param for this installation. - env - Overides the
env
param for this installation. - hostname - Overides the
hostname
param for this installation. - aliases - [Array] of "alias" links to create for the current installation.
Default value: {}
service_workdir
Data type: Optional[String]
CWD for services
Default value: undef
services
Data type: Hash[String, Array[Variant[String, Hash]]]
Hash of Arrays of services to create systemd service units for.
Options:
- name-of-alias
String
: [Array] of service names/service executables (links under /opt/lsst//bin/) Alternatively, array element can also be a hash of the form { name: "h2db", key: "value", ... } Allowed keys: cmd, user, group, workdir, env, enable. Values specify the associated service file values/state.
Default value: {}
base_path
Data type: Stdlib::Absolutepath
Base path for [all] CCS installations.
Default value: '/opt/lsst'
etc_path
Data type: Stdlib::Absolutepath
Path to global CCS configuration files.
Default value: '/etc/ccs'
log_path
Data type: Stdlib::Absolutepath
Path to CCS log files.
Default value: '/var/log/ccs'
user
Data type: String
Name of the role user under which CCS services will be run and the owner of config files
Default value: 'ccs'
group
Data type: String
Name of the role group
Default value: 'ccs'
adm_user
Data type: String
Name of the admin role user which owns many of the installed files
Default value: 'ccsadm'
adm_group
Data type: String
Name of the admin role group
Default value: 'ccsadm'
influx_url
Data type: String[1]
String giving URL of the influxDB server.
Default value: 'https://camera-influxdb.dev.lsst.org:443'
influx_name
Data type: String[1]
String giving name of the influxDB instance.
Default value: 'grafana'
influx_username
Data type: Sensitive[String[1]]
Sensitive string giving influxDB username.
Default value: Sensitive('user')
influx_password
Data type: Sensitive[String[1]]
Sensitive string giving influxDB password.
Default value: Sensitive('pass')
kafka_files
Data type: Hash[String, Hash]
Optional hash of kafka properties files and associated values. Eg: data-int: bootstrap_url: "bootstrap_url" registry_url: "registry_url"
Default value: {}
kafka_auths
Data type: Hash[String, Array[Variant[Sensitive[String],String]]]
Optional (but required for each key of kafka_files) hash of kafka files and the associated username and password. Eg: data-int:
- "user"
- "pass"
Default value: {}
service_email
Data type: String
String giving email address (or comma separated addresses) to receive change of service status emails from systemd.
Default value: 'root@localhost'
pkglist_repo_url
Data type: Stdlib::HTTPUrl
URL of the git repo to use for install.py
package lists by default. This
may be overriden in a installations
hash with the repo_url
key.
Default value: 'https://github.com/lsst-camera-dh/dev-package-lists'
release_repo_url
Data type: Stdlib::HTTPUrl
URL of the repo which contains the install.py
script.
Default value: 'https://github.com/lsst-it/release'
release_repo_ref
Data type: String
install.py
git repo ref.
Default value: 'IT-4348/python3'
env
Data type: Optional[String]
Name of the package list environment. Eg., ComCam
. This may be
overriden in a installation
hash with the env
key.
Default value: undef
hostname
Data type: Optional[String]
The "short" hostname used to select the installation set in a package lists repo.
Default value: $facts['networking']['hostname']
desktop
Data type: Boolean
Install desktop shortcuts.
Default value: false
git_force
Data type: Boolean
Force the update of managed git clones. This is done by passing force => true
to vcsrepo
type resources.
Default value: false
global_properties
Data type: Array[String]
Array of extra strings to add to the ccsGlobal.properties file.
Default value: []
udp_properties
Data type: Array[String]
Array of extra strings to add to the udp_ccs.properties file.
Default value: []
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v2.9.0 (2024-12-18)
Implemented enhancements:
v2.8.1 (2024-11-12)
Implemented enhancements:
v2.8.0 (2024-10-24)
Implemented enhancements:
v2.7.0 (2024-09-04)
Implemented enhancements:
- Add CCS desktops apps to default gnome favorites #69 (glennmorris)
v2.6.0 (2024-08-27)
Implemented enhancements:
- Add option to install kafka-brokers properties files #67 (glennmorris)
v2.5.0 (2024-08-13)
Implemented enhancements:
- Add new config file for influxDB #65 (glennmorris)
v2.4.0 (2024-08-07)
Implemented enhancements:
v2.3.0 (2024-07-05)
Implemented enhancements:
- Allow control over the enable state of services #60 (glennmorris)
- Added code to cleanup dev-package-list clone after installation #59 (mxturri)
v2.2.2 (2024-05-21)
Implemented enhancements:
- (files/install/installCCS.sh) update CCS install script for use on summit #58 (glennmorris)
- (puppet-ccs-software) add license file #56 (dtapiacl)
v2.2.1 (2024-03-19)
Breaking changes:
Implemented enhancements:
- Bump version to 2.2.1 #53 (glennmorris)
- Add wget as a required system package #52 (glennmorris)
v2.2.0 (2023-10-04)
Implemented enhancements:
v2.1.0 (2023-08-22)
Implemented enhancements:
v2.0.0 (2023-06-23)
Breaking changes:
Implemented enhancements:
- allow puppetlabs/vcsrepo 6.x #42 (jhoblitt)
- add support for puppet8 #38 (jhoblitt)
- (sudo) add 'reset-failed' to the commands ccs user can run #36 (glennmorris)
v1.4.0 (2023-04-17)
Implemented enhancements:
- Extend the service hash to allow for more options #33 (glennmorris)
v1.3.0 (2023-03-06)
Implemented enhancements:
- Switch to using python3 to run the install.py script #31 (glennmorris)
v1.2.1 (2023-01-31)
Fixed bugs:
v1.2.0 (2023-01-31)
Implemented enhancements:
v1.1.4 (2022-11-01)
Merged pull requests:
- Use remote persistency server, get rid of 6.0.4 full paths workaround #25 (tony-johnson)
v1.1.3 (2022-08-17)
Merged pull requests:
v1.1.2 (2022-08-17)
Merged pull requests:
v1.1.1 (2022-08-17)
Merged pull requests:
v1.1.0 (2022-07-22)
Merged pull requests:
v1.0.2 (2022-07-08)
v1.0.1 (2022-02-21)
Merged pull requests:
- Default to CCS remote configuration server #19 (glennmorris)
v1.0.0 (2022-02-01)
Merged pull requests:
v0.8.0 (2021-11-30)
Merged pull requests:
- Produce alert emails when a ccs systemd service fails #17 (glennmorris)
- Allow a service file to specify a custom ExecStart #16 (glennmorris)
v0.7.0 (2021-08-03)
Merged pull requests:
v0.6.1 (2021-07-30)
v0.6.0 (2021-07-29)
Merged pull requests:
- Add a sudo file allowing the ccs user to control ccs services #14 (glennmorris)
sudo-0.1 (2021-07-29)
v0.5.0 (2021-04-08)
Merged pull requests:
- It 2820 auxtel ccs #13 (glennmorris)
auxtel-0.3 (2021-04-06)
auxtel-0.2 (2021-03-31)
auxtel-0.1 (2021-03-30)
v0.4.2 (2020-10-16)
Merged pull requests:
- Add bash completion for the ccslog utility #12 (glennmorris)
v0.4.1 (2020-09-18)
Merged pull requests:
- Install the /usr/local/bin/ccslog utility #11 (glennmorris)
v0.4.0 (2020-09-02)
Merged pull requests:
- [blacksmith] Bump version to 0.4.0 #10 (jhoblitt)
- add
WorkingDirectory
to all systemd service units #9 (jhoblitt) - sync puppet-lint plugins from lsst-it/lsst-itconf #8 (jhoblitt)
- README fixes #7 (jhoblitt)
v0.3.0 (2020-06-25)
Merged pull requests:
- [blacksmith] Bump version to 0.3.0 #6 (jhoblitt)
- add jgroups bufs + allow manual installs + git_force param #5 (jhoblitt)
v0.2.0 (2020-06-12)
Merged pull requests:
v0.1.1 (2020-06-12)
Merged pull requests:
v0.1.0 (2020-06-10)
Merged pull requests:
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)
- puppetlabs/vcsrepo (>= 3.0.0 < 7.0.0)
- puppet/systemd (>= 3.0.0 < 9.0.0)
- saz/sudo (>= 6.0.0 < 10.0.0)
- simp/dconf (>= 0.5.0 < 1.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.