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

Should either lock in a nexus external_version or not include a checksum #41

Closed
josephholsten opened this issue Aug 1, 2013 · 10 comments

Comments

@josephholsten
Copy link
Contributor

the cookbook doesn't work out of the box today because it automatically downloads the latest release of nexus, which is different than the one used to calculate the checksum.

Either:

  • it should lock default[:nexus][:external_version] = '4.9', or
  • it should unset default[:nexus][:checksum] = nil

I'm personally partial to locking the version to 4.9 and occasionally updating the values. Let me know your preference and I'll happily supply a pr.

@KAllan357
Copy link
Contributor

Thank you @josephholsten, I actually just went to run this cookbook 20 minutes ago and noticed this.

I agree that we should default to a version. If you are interested in taking it on, I would love to see this cookbook updated to support Nexus 2.6 (which just came out) - I think that would be a bit extra work:

  • Nexus 2.6 only supports Java 7 now.
  • There was this change, that I think might affect this cookbook.
Old Startup Scripts are Deprecated
The old startup scripts under "<nexus_root>/bin/jsw/<os>/<architecture>" are deprecated, they will be removed in an upcoming release.  Users should use the new startup scripts under "<nexus_root>/bin/nexus" instead.

Anyway, I would also happily accept a pull request to default to 2.5.1.

@josephholsten
Copy link
Contributor Author

oh, I'll give that a try

@josephholsten
Copy link
Contributor Author

Well this is annoying. You'd think we'd be able to just get away with overriding java.jdk_version from attributes/default.rb:25 with

default['java']['jdk_version'] = '7'

Unfortunately this doesn't work because the attribute loading order is alphabetical. That wouldn't be an issue, except that other java attributes are dependent on java.jdk_version in attributes/default.rb:30, in particular java.java_home and java.openjdk_packages. It seems like the best way to keep this working correctly would be to simply duplicate the attribute logic for our supported platforms:

case node['platform_family']
when "rhel", "fedora"
  default['java']['java_home'] = "/usr/lib/jvm/java"
  default['java']['openjdk_packages'] = ["java-1.#{node['java']['jdk_version']}.0-openjdk", "java-1.#{node['java']['jdk_version']}.0-openjdk-devel"]
when "debian"
  default['java']['java_home'] = "/usr/lib/jvm/default-java"
  default['java']['openjdk_packages'] = ["openjdk-#{node['java']['jdk_version']}-jdk", "default-jre-headless"]
else
  default['java']['java_home'] = "/usr/lib/jvm/default-java"
  default['java']['openjdk_packages'] = ["openjdk-#{node['java']['jdk_version']}-jdk"]
end

This sucks. But progress proceeds.

@KAllan357
Copy link
Contributor

Could you use the include_attribute "java" syntax to load the attributes and then override them afterwards? I guess ultimately, since jdk_version is used by the openjdk_packages attribute, that wouldn't solve it anyway.

I agree that is less than ideal.

@josephholsten
Copy link
Contributor Author

tried it, nope.

@josephholsten
Copy link
Contributor Author

Actually, 2.6 seems to be working pretty easily once I've got java 7 set up. I'm not quite satisfied with the https proxy and I need active directory auth, but I'll wrap up the current work and put the rest in another pr.

@josephholsten
Copy link
Contributor Author

Ha! Forgot to actually send the pr.

@josephholsten
Copy link
Contributor Author

#43

KAllan357 added a commit that referenced this issue Aug 5, 2013
@KAllan357
Copy link
Contributor

Released to Opscode Community site as 2.3.0

@josephholsten
Copy link
Contributor Author

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants