Version information
This version is compatible with:
- Puppet Enterprise 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, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 8.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'lsst-ccs_software', '1.4.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
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. Values specify the associated service file values.
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'
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.
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 (>= 5.0.0 < 9.0.0)
- puppetlabs/vcsrepo (>= 3.0.0 < 6.0.0)
- puppet/systemd (>= 3.0.0 < 5.0.0)
- saz/sudo (>= 6.0.0 < 8.0.0)