Skip to content
Snippets Groups Projects
Commit 7b782acc authored by Markus Guenther's avatar Markus Guenther
Browse files

[FEATURE] Install tika server

parent 2fbf3b45
No related branches found
No related tags found
No related merge requests found
......@@ -22,4 +22,5 @@ default['tomcat']['work_dir'] = "/var/cache/tomcat#{node['tomcat']['base_version
default['tomcat']['context_dir'] = "#{node['tomcat']['config_dir']}/Catalina/localhost"
default['tomcat']['webapp_dir'] = "/var/lib/tomcat#{node['tomcat']['base_version']}/webapps"
default['typo3_solr']['solr']['solr_home'] = '/srv/solr'
\ No newline at end of file
default['typo3_solr']['solr']['solr_home'] = '/srv/solr'
default['typo3_solr']['solr']['tika_home'] = '/srv/tika'
\ No newline at end of file
......@@ -18,6 +18,7 @@ action :add do
ext_solr_uri = "https://raw.githubusercontent.com/TYPO3-Solr/ext-solr/#{remote_branch}/#{resources_path}"
plugin_uri = "https://github.com/TYPO3-Solr/solr-typo3-plugin/releases/download/release-#{new_resource.plugin}"
tika_server_uri = "http://mirror.dkd.de/apache/tika"
service 'tomcat' do
service_name node['tomcat']['base_instance']
......@@ -221,6 +222,15 @@ action :add do
only_if { Gem::Version.new(new_resource.plugin_lang) > Gem::Version.new('0.0.0') }
end
# tika server
remote_file "#{node['typo3_solr']['solr']['tika_home']}/tika-server-#{new_resource.tika_server}" do
source "#{tika_server_uri}/tika-server-#{new_resource.tika_server}.jar"
mode 0550
notifies :restart, 'service[tomcat]', :immediately
only_if { Gem::Version.new(new_resource.tika_server) > Gem::Version.new('0.0.0') }
end
# reset directory access restrictions
execute "chown - #{new_resource.name}" do
......
......@@ -29,4 +29,11 @@ directory node['typo3_solr']['solr']['solr_home'] do
group 'root'
mode 0770
action :create
end
directory node['typo3_solr']['solr']['tika_home'] do
owner node['tomcat']['user']
group 'root'
mode 0770
action :create
end
\ No newline at end of file
......@@ -2,6 +2,7 @@ actions :add, :remove
attribute :name, :kind_of => String, :name_attribute => true
attribute :solr, :kind_of => String, :default => '3.6.2'
attribute :tika_server, :kind_of => String, :default => '0.0.0'
attribute :extension, :kind_of => String, :default => '2.8'
attribute :plugin, :kind_of => String, :default => '0.0.0'
attribute :plugin_access, :kind_of => String, :default => '0.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment