fixes update-alternatives for openjdk installs #95

Merged
merged 5 commits into from Dec 15, 2013

Conversation

Projects
None yet
5 participants
@mylons
Contributor

mylons commented Oct 31, 2013

I'm not sure how others are using this cookbook, but it's currently in attribute hell for me. The only way I can actually get an openjdk 7 install is if I run chef-client and supply it json on the command line specifically for java. This is obviously not ideal, and if you want to use this cookbook in something like AWS Opsworks you might have issue overriding versions inside recipes, etc.

These changes fix that, for the openjdk recipe.

mylons added some commits Oct 31, 2013

mylons
something is terribly wrong with this cookbook in it's present state.…
… you can almost never install an alternative version of java once a machine is provisioned once with this book. this addresses my issues with the openjdk install and update recipes.
mylons
moving run time parameters into default recipe. without doing this, o…
…r moving the parameters out of the default you cannot change the node[:java][:openjdk_packages] in a recipe.
@mylons

This comment has been minimized.

Show comment
Hide comment
@mylons

mylons Nov 1, 2013

Contributor

The latest change is actually the main issue for me. I want to be able to do

node.override[:java][:jdk_version] = '7'

in my recipe, and have it set all of the parameters that reference the jdk_version in the attributes/default.rb file.

However, that file gets completely filled out AT recipe compile time. This means all the variables referencing the jdk_version have defaults, and they all point to 6. Overriding the jdk_version does indeed override that config parameter, but only that. The jdk_version change isn't reflected in the other parameters, and it forces the user of the cookbook to override them all manually

Contributor

mylons commented Nov 1, 2013

The latest change is actually the main issue for me. I want to be able to do

node.override[:java][:jdk_version] = '7'

in my recipe, and have it set all of the parameters that reference the jdk_version in the attributes/default.rb file.

However, that file gets completely filled out AT recipe compile time. This means all the variables referencing the jdk_version have defaults, and they all point to 6. Overriding the jdk_version does indeed override that config parameter, but only that. The jdk_version change isn't reflected in the other parameters, and it forces the user of the cookbook to override them all manually

@pmaccamp

This comment has been minimized.

Show comment
Hide comment
@pmaccamp

pmaccamp Dec 6, 2013

👍 thought I was going crazy when I specified jdk 7 and it kept installing 6.

pmaccamp commented Dec 6, 2013

👍 thought I was going crazy when I specified jdk 7 and it kept installing 6.

@rafaelmagu

This comment has been minimized.

Show comment
Hide comment
@rafaelmagu

rafaelmagu Dec 12, 2013

Can we please get this into the cookbook. It's driving me crazy as well. :)

Can we please get this into the cookbook. It's driving me crazy as well. :)

@carmstrong

This comment has been minimized.

Show comment
Hide comment
@carmstrong

carmstrong Dec 12, 2013

Contributor

Can you please update the PR to no longer include the version bump? I'll merge a few of these and cut a release. Thanks!

Contributor

carmstrong commented Dec 12, 2013

Can you please update the PR to no longer include the version bump? I'll merge a few of these and cut a release. Thanks!

@carmstrong

This comment has been minimized.

Show comment
Hide comment
@carmstrong

carmstrong Dec 12, 2013

Contributor

Rebasing on master would be nice too :)

Contributor

carmstrong commented Dec 12, 2013

Rebasing on master would be nice too :)

@mylons

This comment has been minimized.

Show comment
Hide comment
Contributor

mylons commented Dec 14, 2013

carmstrong added a commit that referenced this pull request Dec 15, 2013

Merge pull request #95 from mylons/master
fixes update-alternatives for openjdk installs

@carmstrong carmstrong merged commit 7bccdfc into sous-chefs:master Dec 15, 2013

@blt04

This comment has been minimized.

Show comment
Hide comment
@blt04

blt04 Dec 16, 2013

Contributor

Thank you!!! This was the primary reason I was trying to get Chef-4234 landed. This makes overriding the JDK version much easier.

Contributor

blt04 commented Dec 16, 2013

Thank you!!! This was the primary reason I was trying to get Chef-4234 landed. This makes overriding the JDK version much easier.

blt04 added a commit to blt04/chef-java that referenced this pull request Dec 17, 2013

Specify windows attributes in attribute files
This moves windows attributes back to the attribute file.
sous-chefs#95 moved these to the recipe,
however that prevents setting these attributes in a wrapper cookbook's
attribute file.

This ensures that only attributes which depend on jdk_version are set
in the recipe.  All other attributes are set in the attribute file like
normal.

blt04 added a commit to blt04/chef-java that referenced this pull request Dec 17, 2013

Specify windows attributes in attribute files
This moves windows attributes back to the attribute file.
sous-chefs#95 moved these to the recipe,
however that prevents setting these attributes in a wrapper cookbook's
attribute file.

This ensures that only attributes which depend on jdk_version are set
in the recipe.  All other attributes are set in the attribute file like
normal.

tonyjchong pushed a commit to kwarter-cookbooks/java that referenced this pull request Jan 2, 2014

Specify windows attributes in attribute files
This moves windows attributes back to the attribute file.
sous-chefs#95 moved these to the recipe,
however that prevents setting these attributes in a wrapper cookbook's
attribute file.

This ensures that only attributes which depend on jdk_version are set
in the recipe.  All other attributes are set in the attribute file like
normal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment