[chef] Re: How to handle required Java version?


Chronological Thread 
  • From: Jeff Byrnes < >
  • To:
  • Subject: [chef] Re: How to handle required Java version?
  • Date: Wed, 14 Jan 2015 09:29:48 -0500

We use the Java cookbook all the time, and this, in your cookbook’s attributes/default.rb should be sufficient (works well for us):

default['java']['install_flavor'] = 'oracle'
default['java']['jdk_version'] = '7'
default['java']['oracle']['accept_oracle_download_terms'] = true

You’ll need to also include_recipe 'java' in your recipe somewhere as well, but that’s all that should be needed.

Of course, change the values to suit, and you don’t need the node['java']['oracle'][‘accept_oracle_download_terms'] attribute if you’re not using Oracle’s JDK.

This is how the Java cookbook is designed to work, and we have no trouble at all using it this way.

-- 
Jeff Byrnes
@berkleebassist
Lead DevOps Engineer
704.516.4628

On January 13, 2015 at 9:15:30 PM, Greg Barker ( "> ) wrote:

Nexus cookbook leverages the Java cookbook, but Nexus requires at least Java 7.

I came across this code & comment and while it worked, they didn't seem happy with the solution.

I'm curious if there's a better way to handle this scenario?

Thanks!
Greg




Archive powered by MHonArc 2.6.16.

§