Skip to content

Commit

Permalink
squash - patch solr version check
Browse files Browse the repository at this point in the history
  • Loading branch information
rrotter committed Oct 25, 2023
1 parent 4d079c7 commit 4b6cb95
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions manifests/profile/hathitrust/lss.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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':
Expand All @@ -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...
}

0 comments on commit 4b6cb95

Please sign in to comment.