Skip to content

Commit

Permalink
(manifests/init) add option to install ccs tomcat rest config
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmorris committed May 15, 2024
1 parent 909ad3c commit 521a75b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
# @param log_path
# Path to CCS log files.
#
# @param tomcat_rest_etc_path
# Path to CCS tomcat configuration directory.
#
# @param user
# Name of the role user under which CCS services will be run and the owner of config files
#
Expand Down Expand Up @@ -80,19 +83,32 @@
# Force the update of managed git clones. This is done by passing `force =>
# true` to `vcsrepo` type resources.
#
# @param tomcat_rest
# If true, install tomcat rest server configuration
#
# @param global_properties
# Array of extra strings to add to the ccsGlobal.properties file.
#
# @param udp_properties
# Array of extra strings to add to the udp_ccs.properties file.
#
# @param tomcat_rest_url
# String giving URL for the rest server.
#
# @param tomcat_rest_user
# Sensitive string giving username for the rest server.
#
# @param tomcat_rest_user
# Sensitive string giving password for the rest server.
#
class ccs_software (
Hash[String, Hash] $installations = {},
Hash[String, Array[Variant[String, Hash]]] $services = {},
Optional[String] $service_workdir = undef,
Stdlib::Absolutepath $base_path = '/opt/lsst',
Stdlib::Absolutepath $etc_path = '/etc/ccs',
Stdlib::Absolutepath $log_path = '/var/log/ccs',
Stdlib::Absolutepath $tomcat_rest_etc_path = '/etc/ccs/tomcat',
String $user = 'ccs',
String $group = 'ccs',
String $adm_user = 'ccsadm',
Expand All @@ -105,8 +121,13 @@
Optional[String] $hostname = $facts['networking']['hostname'],
Boolean $desktop = false,
Boolean $git_force = false,
Boolean $tomcat_rest = false,
Array[String] $global_properties = [],
Array[String] $udp_properties = [],
String[1] $tomcat_rest_url = 'lsstcam-db01:3306/ccsdbprod',
## These are only required if tomcat rest server is being used.
Sensitive[String[1]] $tomcat_rest_user = Sensitive('user'),
Sensitive[String[1]] $tomcat_rest_pass = Sensitive('pass'),
) {
$ccs_path = "${base_path}/ccs"
$ccsadm_path = "${base_path}/ccsadm"
Expand All @@ -130,4 +151,10 @@
if ($desktop) {
contain ccs_software::desktop
}

if ($tomcat_rest) {
contain ccs_software::tomcat
Class['ccs_software::install']
-> Class['ccs_software::tomcat']
}
}

0 comments on commit 521a75b

Please sign in to comment.