openjdk - How to use chef to install JDK8 on RHEL -
i have been looking @ : https://github.com/agileorbit-cookbooks/java. don't know how run recipes cookbook.
i new chef.
i have gone through basic chef tutorial , know :
chef-apply $recipe.rb i need in creating recipe install jdk 7/8. don't need cookbook. have setup chef-dk on machine, , tried out few examples learning website.
edit#1 :
looking @ java-cookbook, don't follow readme file. unable run recipe jdk-8 install.
what trying follows :
- cd java cookbook
- cd recipes folder
- chef-apply $recipe-name.rb
- this giving me errors
what want :
- install jdk8 using chef internet
i have tried following things listed below :
i try :
chef-apply default.rb i following errors :
fatal : stacktrace dumped /var/chef/cache/chef-stacktrace.out fatal : nomethoderror: undefined method '[]' nil"nilclass the 'chef-stacktrace.out' contains :

i'm unsure of you're stuck, quoting readme java cookbook (the link gave):
you have make wrapper cookbook with:
metadata.rb
[...] # usual data in cookbook depends "java"attribute/default.rb
default["java"]["install_flavor"] = "oracle" default["java"]["jdk_version"] = "7" default['java']['jdk']['7']['x86_64']['url'] = "http://you_local_host/package.tgz" # oracle not allow directly download jdkrecipes/default.rb
include_recipe "java"
and add cookbook target runlist.
best idea start learning material here runlist , wrapper cookbooks.
Comments
Post a Comment