From 4b6cb95c18949cdf5eb8cae4d6c2df508d72c80d Mon Sep 17 00:00:00 2001 From: Ryan Rotter Date: Wed, 25 Oct 2023 19:08:19 -0400 Subject: [PATCH] squash - patch solr version check --- manifests/profile/hathitrust/lss.pp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/manifests/profile/hathitrust/lss.pp b/manifests/profile/hathitrust/lss.pp index e359dee3f..95203aed8 100644 --- a/manifests/profile/hathitrust/lss.pp +++ b/manifests/profile/hathitrust/lss.pp @@ -13,7 +13,14 @@ String $solr_core = 'fake_core' ){ package { "openjdk-${jdk_version}-jre-headless": } - package { 'solr': } + package { "solr": } + # patch solr startup script to repair broken java version determination + file_line { "patch solr startup script": + path => $solr_bin, + after => ' JAVA_VER_NUM=$(echo $JAVA_VER | head -1 | awk -F \'"\' \'/version/ {print $2}\')', + line => ' JAVA_VER_NUM=$(echo $JAVA_VER | head -1 | sed -En \'s/.*"([0-9]+\.[0-9])(\.[0-9]+)?".*/\1/p\')}', + require => Package["solr"] + } include nebula::profile::dns::smartconnect; @@ -49,9 +56,12 @@ file { "${solr_home}/solr.in.sh": content => template("nebula/profile/hathitrust/solr_lss/solr.in.sh.erb"), } -# file { "/var/solr-lss/log4j.properties": } -# file { "/var/solr-lss/logs": } -# file { "/var/solr-lss/home": } + file { "${solr_home}/logs": + ensure => "directory", + owner => "solr", + mode => "2775", + } + # file { "${solr_home}/log4j.properties": } # lss service file { '/etc/systemd/system/solr.service': @@ -60,12 +70,6 @@ service { 'solr': ensure => "running", enable => true, - require => [Package["solr"], File["/etc/systemd/system/solr.service"]] + require => [Package["solr"], File["/etc/systemd/system/solr.service"], File_line["patch solr startup script"]] } - - # correct user home paths - - # service ensure enabled, running - - # tests... }