I have been trying to learn chef recently because I was planning on using it for deploying server config and server application software. I am having issues understanding how to use other people's cookbooks. For example, I want to deploy JDK8u31. I can't figure it out how to implement this cookbook. https://supermarket.chef.io/cookbooks/java
I read the instructions and I see the following
Simply include the java recipe wherever you would like Java installed, such as a run list (recipe[java]) or a cookbook (include_recipe 'java')
I tried to
include_recipe 'java'
inside my cookbook called common_java_server
then
directory '/usr/lib/jvm/' do
owner 'root'
group 'root'
mode '0644'
end
java_ark "jdk" do
url 'http://download.oracle.com/otn-pub/java/jdk/8u31/jdk-8u31-linux-x64.bin'
checksum 'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
app_home '/usr/lib/jvm/'
bin_cmds ["java", "javac"]
action :install
end
# set alternatives for java and javac commands
java_alternatives "set java alternatives" do
java_location '/usr/local/java'
bin_cmds ["java", "javac"]
action :set
end
This is the error I get
Recipe Compile Error in /etc/chef/src/cookbooks/common/recipes/java_dev_server.rb
====