Re: Re: Re: Re: Tomcat Cookbook and Oracle JDK


#1

I didn’t see another reply, odd.

Can you point to the line number in the README that says to include the
oracle recipe? (or better yet a PR with the fix?) I just skimmed it and
don’t see it (though it is a old, long readme with likely some cruft in
there).

The Usage section directs you to override the install_flavor:
Usage

Simply include the java recipe wherever you would like Java installed, such
as a run list (recipe[java]) or a cookbook (include_recipe ‘java’). By
default, OpenJDK 6 is installed. The install_flavor attribute is used to
determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and
jdk_version specifies which version to install (currently 6 and 7 are
supported for all JDK types, 8 for Oracle only).

On Wed Dec 10 2014 at 5:20:42 PM Morgan Blackthorne stormerider@gmail.com
wrote:

You probably want to do node.override[‘java’][‘install_flavor’] = 'oracle’
in your wrapper cookbook.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Wed, Dec 10, 2014 at 3:10 PM, Douglas Garstang <doug.garstang@gmail.com

wrote:

Well, this is weird.

Someone else replied before Eric and now that reply has disappeared. His
suggestion, well I was going to follow it, and it’s gone poof. Where did it
go?

I’m confused. The java cookbook in one place says if you want the oracle
java to include the ‘oracle’ recipe. Further down, it says to use
attributes. Which is it?

It’s also not clear now, and never has been, if setting
default[‘java’][‘install_flavor’] = ‘oracle’ in my wrapper cookbook will
have an effect on a cookbook two levels away in the stack. Ie if I have A
-> B -> C and cookbook A has default[‘java’][‘install_flavor’] =
‘oracle’… will that affect how cookbook B operates?

Doug.

On Wed, Dec 10, 2014 at 1:06 PM, Eric Helgeson erichelgeson@gmail.com
wrote:

Yep, you can, take a look at the examples in the readme -
https://github.com/agileorbit-cookbooks/java/#examples

Just override some attributes and it will install that version.

Also be sure to mirror the oracle binary locally in production, as
downloading directly can be troublesome at times
https://github.com/agileorbit-cookbooks/java#production-deployment-with-oracle-java

-Eric

On Wed Dec 10 2014 at 2:32:05 PM Douglas Garstang <
doug.garstang@gmail.com> wrote:

I was taking a look at the tomcat cookbook for chef,
https://github.com/opscode-cookbooks/tomcat.

It installs the OpenJDK. It doesn’t seem to have a facility to change
that to the Oracle JDK. I look a look inside the tomcat recipe and yep,
it’s got:

include_recipe “java”

The java cookbook can install the Oracle JDK, but the defaut installs
the OpenJDK. Is there a way I can override this without modifying the java
or tomcat cookbooks?

Doug


Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627


#2

Eric,

Cloned https://github.com/agileorbit-cookbooks/java

Starting at line 7, the README.md says:

"Usage

Simply include the java recipe wherever you would like Java installed,
such as a run list (recipe[java]) or a cookbook (include_recipe 'java'). By default, OpenJDK 6 is installed. The install_flavor
attribute is used to determine which JDK to install (OpenJDK, Oracle, IBM,
or Windows), and jdk_version specifies which version to install
(currently 6 and 7 are supported for all JDK types, 8 for Oracle only)."

Then, further down, starting at line #116, it describes a set of recipe
install options, including this starting at line #157.

"### oracle

This recipe installs the oracle flavor of Java."

So, initially it says the way to select the flavour is with an attribute
and then further down it implies you don’t do that, but rather you include
a specific recipe.

Douglas.

On Wed, Dec 10, 2014 at 6:41 PM, Eric Helgeson erichelgeson@gmail.com
wrote:

I didn’t see another reply, odd.

Can you point to the line number in the README that says to include the
oracle recipe? (or better yet a PR with the fix?) I just skimmed it and
don’t see it (though it is a old, long readme with likely some cruft in
there).

The Usage section directs you to override the install_flavor:
Usage

Simply include the java recipe wherever you would like Java installed,
such as a run list (recipe[java]) or a cookbook (include_recipe ‘java’).
By default, OpenJDK 6 is installed. The install_flavor attribute is used
to determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and
jdk_version specifies which version to install (currently 6 and 7 are
supported for all JDK types, 8 for Oracle only).

On Wed Dec 10 2014 at 5:20:42 PM Morgan Blackthorne stormerider@gmail.com
wrote:

You probably want to do node.override[‘java’][‘install_flavor’] =
‘oracle’ in your wrapper cookbook.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Wed, Dec 10, 2014 at 3:10 PM, Douglas Garstang <
doug.garstang@gmail.com> wrote:

Well, this is weird.

Someone else replied before Eric and now that reply has disappeared. His
suggestion, well I was going to follow it, and it’s gone poof. Where did it
go?

I’m confused. The java cookbook in one place says if you want the oracle
java to include the ‘oracle’ recipe. Further down, it says to use
attributes. Which is it?

It’s also not clear now, and never has been, if setting
default[‘java’][‘install_flavor’] = ‘oracle’ in my wrapper cookbook will
have an effect on a cookbook two levels away in the stack. Ie if I have A
-> B -> C and cookbook A has default[‘java’][‘install_flavor’] =
‘oracle’… will that affect how cookbook B operates?

Doug.

On Wed, Dec 10, 2014 at 1:06 PM, Eric Helgeson erichelgeson@gmail.com
wrote:

Yep, you can, take a look at the examples in the readme -
https://github.com/agileorbit-cookbooks/java/#examples

Just override some attributes and it will install that version.

Also be sure to mirror the oracle binary locally in production, as
downloading directly can be troublesome at times
https://github.com/agileorbit-cookbooks/java#production-deployment-with-oracle-java

-Eric

On Wed Dec 10 2014 at 2:32:05 PM Douglas Garstang <
doug.garstang@gmail.com> wrote:

I was taking a look at the tomcat cookbook for chef,
https://github.com/opscode-cookbooks/tomcat.

It installs the OpenJDK. It doesn’t seem to have a facility to change
that to the Oracle JDK. I look a look inside the tomcat recipe and yep,
it’s got:

include_recipe “java”

The java cookbook can install the Oracle JDK, but the defaut installs
the OpenJDK. Is there a way I can override this without modifying the java
or tomcat cookbooks?

Doug


Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627


Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627


#3

Le 2014-12-11 16:28, Douglas Garstang a écrit :

Eric,

Cloned https://github.com/agileorbit-cookbooks/java [1]

Starting at line 7, the README.md says:

"Usage

Simply include the java recipe wherever you would like Java installed, such as a run list (recipe[java]) or a cookbook (include_recipe 'java'). By default, OpenJDK 6 is installed. The install_flavor attribute is used to determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and jdk_version specifies which version to install (currently 6 and 7 are supported for all JDK types, 8 for Oracle only)."

Then, further down, starting at line #116, it describes a set of recipe install options, including this starting at line #157.

"### oracle

This recipe installs the oracle flavor of Java."

So, initially it says the way to select the flavour is with an attribute and then further down it implies you don’t do that, but rather you include a specific recipe.

Douglas.

You’re mixing things.

The usage paragraph is how to use the cookbook the way it was written
(99% of the cases).

The attributes and recipes paragraphs are there to describe what is
inside the cookbook in case you wish to use them in a specific case
which is not the default behavior.

Exemple: if you wish to install oracle jdk without overwriting system
java, you’ll use directly the oracle recipe and won’t include the
default_java_symlink.
Another use case would be 2 software needing specific jdk for each, you
may wish to have oracle and ibm jdk on your system and configuring your
apps to use the appropriate one.

In brief: the usual usage is working with attributes, but you have the
option to do something more specific with the recipes if you need to.

On Wed, Dec 10, 2014 at 6:41 PM, Eric Helgeson erichelgeson@gmail.com wrote:
I didn’t see another reply, odd.

Can you point to the line number in the README that says to include the oracle recipe? (or better yet a PR with the fix?) I just skimmed it and don’t see it (though it is a old, long readme with likely some cruft in there).

The Usage section directs you to override the install_flavor:

USAGE

Simply include the java recipe wherever you would like Java installed, such as a run list (recipe[java]) or a cookbook (include_recipe ‘java’). By default, OpenJDK 6 is installed. The install_flavor attribute is used to determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and jdk_version specifies which version to install (currently 6 and 7 are supported for all JDK types, 8 for Oracle only).

On Wed Dec 10 2014 at 5:20:42 PM Morgan Blackthorne stormerider@gmail.com wrote:

You probably want to do node.override[‘java’][‘install_flavor’] = ‘oracle’ in your wrapper cookbook.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS [2]

On Wed, Dec 10, 2014 at 3:10 PM, Douglas Garstang doug.garstang@gmail.com wrote:

Well, this is weird.

Someone else replied before Eric and now that reply has disappeared. His suggestion, well I was going to follow it, and it’s gone poof. Where did it go?

I’m confused. The java cookbook in one place says if you want the oracle java to include the ‘oracle’ recipe. Further down, it says to use attributes. Which is it?

It’s also not clear now, and never has been, if setting default[‘java’][‘install_flavor’] = ‘oracle’ in my wrapper cookbook will have an effect on a cookbook two levels away in the stack. Ie if I have A -> B -> C and cookbook A has default[‘java’][‘install_flavor’] = ‘oracle’… will that affect how cookbook B operates?

Doug.

On Wed, Dec 10, 2014 at 1:06 PM, Eric Helgeson erichelgeson@gmail.com wrote:
Yep, you can, take a look at the examples in the readme - https://github.com/agileorbit-cookbooks/java/#examples [3]

Just override some attributes and it will install that version.

Also be sure to mirror the oracle binary locally in production, as downloading directly can be troublesome at times https://github.com/agileorbit-cookbooks/java#production-deployment-with-oracle-java [4]

-Eric

On Wed Dec 10 2014 at 2:32:05 PM Douglas Garstang doug.garstang@gmail.com wrote:

I was taking a look at the tomcat cookbook for chef, https://github.com/opscode-cookbooks/tomcat [5].

It installs the OpenJDK. It doesn’t seem to have a facility to change that to the Oracle JDK. I look a look inside the tomcat recipe and yep, it’s got:

include_recipe “java”

The java cookbook can install the Oracle JDK, but the defaut installs the OpenJDK. Is there a way I can override this without modifying the java or tomcat cookbooks?

Doug

Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang [6]
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627 [7]

Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang [6]
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627

Links:

[1] https://github.com/agileorbit-cookbooks/java
[2] http://bit.ly/Ps3uSS
[3] https://github.com/agileorbit-cookbooks/java/#examples
[4]
https://github.com/agileorbit-cookbooks/java#production-deployment-with-oracle-java
[5] https://github.com/opscode-cookbooks/tomcat
[6] http://www.linkedin.com/in/garstang
[7] tel:%2B1-805-340-5627