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
This commit is contained in:
Marton Kiss 2015-07-30 16:07:11 +02:00
parent a615cc8f94
commit 3f51340347

View File

@ -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',