From 3f51340347c4b88a046cca105f86f5bd7eb2727c Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Thu, 30 Jul 2015 16:07:11 +0200 Subject: [PATCH] Add solr dist-root to askbot-staging This patch provides a new dist_root directory for solr distribution under /srv/dist/solr instead of /tmp, which is getting removed after instance restart. Hopefully this resolves the missing smartcn file failure on puppet run. Change-Id: Ieb59fc470079dc548e0b6e2018504c47838ab906 --- .../manifests/ask_staging.pp | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/modules/openstack_project/manifests/ask_staging.pp b/modules/openstack_project/manifests/ask_staging.pp index f43862d001..774f09beac 100644 --- a/modules/openstack_project/manifests/ask_staging.pp +++ b/modules/openstack_project/manifests/ask_staging.pp @@ -17,11 +17,28 @@ class openstack_project::ask_staging ( User::Virtual::Localuser['mkiss'], ) + file { '/srv/dist': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + } + # solr search engine + file { '/srv/dist/solr': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + require => File['/srv/dist'], + } + class { 'solr': - mirror => 'http://apache.mesi.com.ar/lucene/solr', - version => $solr_version, - cores => [ 'core-default', 'core-en', 'core-zh' ], + mirror => 'http://apache.mesi.com.ar/lucene/solr', + version => $solr_version, + cores => [ 'core-default', 'core-en', 'core-zh' ], + dist_root => '/srv/dist/solr', + require => File['/srv/dist/solr'], } file { '/usr/share/solr/core-en/conf/schema.xml': @@ -48,7 +65,7 @@ class openstack_project::ask_staging ( file { "/usr/share/solr/WEB-INF/lib/lucene-analyzers-smartcn-${solr_version}.jar": ensure => present, replace => 'no', - source => "/tmp/solr-${solr_version}/contrib/analysis-extras/lucene-libs/lucene-analyzers-smartcn-${solr_version}.jar", + source => "/srv/dist/solr/solr-${solr_version}/contrib/analysis-extras/lucene-libs/lucene-analyzers-smartcn-${solr_version}.jar", owner => 'root', group => 'root', mode => '0644',