Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes update-alternatives for openjdk installs #95

Merged
merged 5 commits into from Dec 15, 2013

Conversation

mylons
Copy link

@mylons 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 3 commits October 31, 2013 12:04
… 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.
…r moving the parameters out of the default you cannot change the node[:java][:openjdk_packages] in a recipe.
@mylons
Copy link
Author

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
Copy link

pmaccamp commented Dec 6, 2013

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

@rafaelmagu
Copy link

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

@carmstrong
Copy link
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!

@carmstrong
Copy link
Contributor

Rebasing on master would be nice too :)

@mylons
Copy link
Author

mylons commented Dec 14, 2013

@carmstrong how's 525343f

carmstrong added a commit that referenced this pull request Dec 15, 2013
fixes update-alternatives for openjdk installs
@carmstrong carmstrong merged commit 7bccdfc into sous-chefs:master Dec 15, 2013
@blt04
Copy link
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
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
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
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.
@lock
Copy link

lock bot commented May 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants