Skip to content

Revamp Java cookbook and add support for Oracle JDK8 (EA Edition) #236

merged 12 commits into from Oct 22, 2013

3 participants

Travis CI member

@joshk @michaelklishin: could you please test this one on your side?

Yeah, I know that there is quite a bunch of changes here, but believe me it is quite solid and should ease the cookbook maintenance in the future. Adding JDK8 without refactoring was too painful, I have been very prudent to keep in sync with precedent behavior on Ubuntu 12.04.

The only thing that significantly changed is that now the Oracle JDKs also use the Ubuntu certificate keystore, but that can be changed if another option is preferred.

Attention: the chef run_lists must be adapted... See travis-ci/travis-images#5

Related to travis-ci/travis-ci#1330 and travis-ci/travis-ci#1291

gildegoma added some commits Oct 18, 2013
@gildegoma gildegoma Install Oracle JDK8-EA from Webupd8 PPA 81abc94
@gildegoma gildegoma Webupd8 PPA fully supports 'update-alternatives'
This is a "documentation" commit to show that *.jinfo files are now well
handled in Webupd8 packages. These files are therefore no more needed to
be deployed by Chef recipes and they will be removed in next commit.
@gildegoma gildegoma Use default 'update-alternatives' packaging
- Remove obsolete .jinfo files for Oracle JDK7 and JDK8, since Webupd8
  packages configure 'alternatives' well
- Clean OpenJDK7 recipe, since Ubuntu package configure 'alternative'
  well on 12.04 (compatible with jdk_switcher alias)
- At the end, ensure that OpenJDK7 (hardcoded for now) is set as default java version

For the records, see in particular:
- 13687ce
- 04017c4
- 139b3d8
@gildegoma gildegoma Use Ubuntu Java keystore for all JDKs
This way we ensure that:
- all java runtime will behave the same, independently of selected JDK
- most common SSL CA will be supported (including popular authorities like
  StartSSL, ...)

Notes: now uses certificate issued by RapidSSL CA, and I
verified that default keystore provided by Webupd8 packages also work
fine to run Leiningen2. But as argumented above, for any other similar
possible use case, it is safer to use the certificates provided by
Ubuntu packaging.

The current implementation will auto-install an openjdk6 JRE as
dependency of the package ca-certificates-java. This is not *ideal*, but
it should have no impact. As a variant, we could provision a static copy
of the ubuntu keystore file, via cookbook_file or remote_file.
@gildegoma gildegoma Remove obsolete java.seed file
No more needed with recent versions of Webupd8 packages.
@gildegoma gildegoma Java cookbook only supports Ubuntu 12.04+
Remove outdated and obsolete/unused pieces of code. This
will make cookbook more readable and easier to maintain. We'll have time
to refactor back the day we want to support more linux flavors :)

Note that tzdata workaround (65b0eca) is kept
untouched (just the package installation statements that are written a
bit differently).
@gildegoma gildegoma Refactor java attributes and recipes
Attention: the 'multi' recipe must not be directly called, since it is
now conditionally included by 'default' recipe (depending on
'alternate_versions' value). travis-images run_list for JVM and Ruby
must be hence updated.
@gildegoma gildegoma Install IcedTea plugin for OpenJDK 6 and 7
With this change, jdk_switcher (update-java-alternatives) won't warn anymore about
plugin alternative that does not exist (/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/
@gildegoma gildegoma Add a comment about missing JCE in JDK8-EA edition 19eee53
@gildegoma gildegoma Update java/metadata.rb about multi refactoring 7e254b2
@gildegoma gildegoma Improve jdk_switcher
- provision as template to ensure that both 'default' versions match
- print more warnings when an unsupported version name is requested.
  See also michaelklishin/jdk_switcher#2
@gildegoma gildegoma added a commit to gildegoma/travis-images that referenced this pull request Oct 19, 2013
@gildegoma gildegoma Update Ruby and JVM workers to new java cookbook 741a76b
@gildegoma gildegoma referenced this pull request in travis-ci/travis-images Oct 19, 2013

Update Ruby and JVM workers to new java cookbook #5


Will do in the next day or two. Thank you!

Travis CI member
joshk commented Oct 19, 2013
Travis CI member

Thanks Michael and Josh! It will be great if we finalize it so fast! I'm looking forward to receiving your feedbacks :)

@gildegoma gildegoma referenced this pull request in travis-ci/ Oct 21, 2013

Upgrades in next Linux VM update #370

Travis CI member
joshk commented Oct 22, 2013

I'm ready to merge this in, but could you please update with the upstream changes?



Travis CI member

Okay, frenglish has been washed.

@michaelklishin michaelklishin merged commit 2688193 into travis-ci:master Oct 22, 2013

1 check was pending

Details default The Travis CI build is in progress
@gildegoma gildegoma deleted the gildegoma:revamp-java-and-add-oraclejdk8 branch Oct 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.