Last active
December 11, 2015 07:58
-
-
Save sbates/4570125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wrapper overrides | |
# override attributes are being set here in order to use the base solr cookbook without direct modification | |
override[:solr][:home] = "/opt/solr/solr-home" | |
override[:solr][:configxml][:destdir] = "/opt/solr/solr-home/products/conf" | |
override[:solr][:configxml][:cookbook_loc] = "projectX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This recipe is a wrapper for the solr cookbook | |
# and contains project application-specific configurations for solr | |
# See the project/attributes/solr.rb file for override attributes that have been set | |
# See this link for attributes precedence: http://wiki.opscode.com/display/chef/Attributes#Attributes-Precedence | |
include_recipe "solr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# solrconfig.xml file | |
# This allows an external project to drop in the solarconfig.xml from outside a cookbook | |
# OR pass in another cookbook where the template is kept | |
# If these are empty, a default solrconfig.xml will deployed from this cookbook | |
default[:solr][:home] = "/opt/solr" | |
default[:solr][:configxml][:source] = "solrconfig.xml.erb" | |
default[:solr][:configxml][:destdir] = "/opt/solr/conf" | |
default[:solr][:configxml][:local] = false | |
default[:solr][:configxml][:cookbook_loc] = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# solrconfig.xml has most of the solr config info in it. Therefore, template | |
template "#{node[:solr][:configxml][:destdir]}/solrconfig.xml" do | |
source node[:solr][:configxml][:source] | |
variables(:solr_servers => solr_servers) | |
notifies :restart, :service => node[:tomcat][:svc_name] | |
local node[:solr][:configxml][:local] | |
cookbook node[:solr][:configxml][:cookbook_loc] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment