Commit 2fbf3b45 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[FEATURE] Xenial compatibility

parent a3292373
if node['platform_version'] == '16.04'
default['tomcat']['base_version'] = 8
default['java']['jdk_version'] = 8
else
default['tomcat']['base_version'] = 6
default['java']['jdk_version'] = 7
default['java']['install_flavor'] = 'oracle'
default['java']['oracle']['accept_oracle_download_terms'] = true
end
default['tomcat']['base_instance'] = "tomcat#{node['tomcat']['base_version']}"
default['tomcat']['packages'] = ["tomcat#{node['tomcat']['base_version']}"]
default['tomcat']['deploy_manager_packages'] = ["tomcat#{node['tomcat']['base_version']}-admin"]
default['tomcat']['user'] = "tomcat#{node['tomcat']['base_version']}"
default['tomcat']['group'] = "tomcat#{node['tomcat']['base_version']}"
default['tomcat']['home'] = "/usr/share/tomcat#{node['tomcat']['base_version']}"
default['tomcat']['base'] = "/var/lib/tomcat#{node['tomcat']['base_version']}"
default['tomcat']['config_dir'] = "/etc/tomcat#{node['tomcat']['base_version']}"
default['tomcat']['log_dir'] = "/var/log/tomcat#{node['tomcat']['base_version']}"
default['tomcat']['tmp_dir'] = "/tmp/tomcat#{node['tomcat']['base_version']}-tmp"
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
......@@ -10,4 +10,4 @@ issues_url 'https://gitlab.sgalinski.de/chef-cookbooks/typo3_solr/issues'
source_url 'https://gitlab.sgalinski.de/chef-cookbooks/typo3_solr'
depends 'apt'
depends 'tomcat', '~> 2.3.1'
\ No newline at end of file
depends 'tomcat', '~> 1.3.0'
\ No newline at end of file
......@@ -20,7 +20,7 @@ action :add do
plugin_uri = "https://github.com/TYPO3-Solr/solr-typo3-plugin/releases/download/release-#{new_resource.plugin}"
service 'tomcat' do
service_name 'tomcat6'
service_name node['tomcat']['base_instance']
supports :restart => true, :reload => true, :status => true
end
......@@ -40,7 +40,7 @@ action :add do
end
execute "decompress-solr-archive - #{new_resource.name}" do
cwd #{Chef::Config['file_cache_path']}
cwd Chef::Config['file_cache_path']
command "tar -xzf apache-solr-#{new_resource.solr}.tar.gz"
creates "#{Chef::Config['file_cache_path']}/apache-solr-#{new_resource.solr}/dist/apache-solr-#{new_resource.solr}.war"
end
......@@ -232,7 +232,7 @@ end
action :remove do
service 'tomcat' do
service_name 'tomcat6'
service_name node['tomcat']['base_instance']
supports :restart => true, :reload => true, :status => true
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment