-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjetty.pp
63 lines (59 loc) · 1.73 KB
/
jetty.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# = Class: solr
#
# This class installs a standalone solr master or slave running in the Jetty servlet container.
#
# == Parameters:
#
# $solr_tarball:: See solr::common
#
# $solr_home_tarball:: See solr::common
#
# $solrconfig:: See solr::common
#
# $master_url:: See solr::common
#
# == Actions:
# Install a solr server.
#
# == Sample Usage:
#
# class { 'solr::jetty':
# solr_tarball => "http://source.sakaiproject.org/release/oae/solr/solr-example.tar.gz",
# solrconfig => 'myconfig/solrconfig.xml.erb',
# }
#
class solr::jetty(
$basedir = '/usr/local/solr',
$user = 'root',
$group = 'root',
$solr_tarball = "http://nodeload.github.com/sakaiproject/solr/tarball/master",
$solr_home_tarball = "http://dl.dropbox.com/u/24606888/puppet-oae-files/home0.tgz",
$solrconfig = 'solr/solrconfig.xml.erb',
$master_url = 'set the master url' ) {
# Make sure solr::common is executed BEFORE solr::jetty
Class['solr::common'] -> Class['solr::jetty']
# Lift heavy things
class { 'solr::common':
basedir => basedir,
user => $user,
group => $group,
solr_tarball => $solr_git,
solr_home_tarball => $solr_home_tarball,
solrconfig => $solrconfig,
master_url => $master_url,
}
# Drop the init script
file { '/etc/init.d/solr':
ensure => present,
owner => $user,
group => $group,
mode => 0755,
content => template("solr/solr.erb"),
}
# And turn it on
service { 'solr':
ensure => running,
enable => true,
subscribe => File["${solr_conf_dir}/solrconfig.xml"],
}
}