Permalink
Browse files

Install Java using recipe, instead of package

I needed to do this because the recipe sets up JAVA_HOME, which is needed by
Jetty. Simply installing openjdk's package wasn't enough.
  • Loading branch information...
1 parent 26175d5 commit 63a0340e331dcde9f912486226a59efba9072de6 @vitorbaptista committed Jan 22, 2013
View
@@ -13,3 +13,6 @@
[submodule "cookbooks/postgresql"]
path = cookbooks/postgresql
url = git://github.com/phlipper/chef-postgresql.git
+[submodule "cookbooks/java"]
+ path = cookbooks/java
+ url = git://github.com/opscode-cookbooks/java.git
@@ -2,6 +2,7 @@
include_recipe "python"
include_recipe "postgresql::server"
include_recipe "postgresql::libpq"
+include_recipe "java"
USER = node[:user]
HOME = "/home/#{USER}"
@@ -54,9 +55,12 @@
end
# Install and configure Solr
-package "openjdk-6-jdk"
package "solr-jetty"
-cookbook_file "/etc/default/jetty"
+template "/etc/default/jetty" do
+ variables({
+ :java_home => node["java"]["java_home"]
+ })
+end
execute "setup solr's schema" do
command "sudo ln -f -s #{SOURCE_DIR}/ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml"
action :run
@@ -1,3 +1,4 @@
NO_START=0
JETTY_HOST=127.0.0.1
JETTY_PORT=8983
+JAVA_HOME=<%= @java_home %>
Submodule java added at 6ffb9c

0 comments on commit 63a0340

Please sign in to comment.