Git Product home page Git Product logo

Comments (7)

jakauppila avatar jakauppila commented on June 1, 2024 2

So this is what I want to do, install a specific version and not just grab the latest 11 release.

corretto_install 'install 11.0.7.10.1' do
  version '11.0.7.10.1'
end

My thought is this:

  • default_corretto_url will continue to take in the version specified on the resource
  • if 'version' is 8 or 11, return the current latest url it does today
  • Otherwise construct the specific version URL (utilizing ohai attributes for architecture, etc) to pull the appropriate version down

I figured this sort of behavior is probably beneficial for all rather than keeping the URL-building in our wrapper cookbook.

I'm happy to work on this, just wanted to make sure we were on the same page first.

from java.

damacus avatar damacus commented on June 1, 2024 1

Oh this makes loads of sense! I like it.

having it match only 8 or 11 then falling back to helping you construct the URL makes sense.

from java.

jakauppila avatar jakauppila commented on June 1, 2024 1

I'll work on this functionality and may submit a WIP PR, but may not want it merged until AWS publishes/documents a structured version URL for specific Corretto versions.

I've heard from our AWS TAM that the Corretto team will be doing this, but won't commit to a timeframe yet.

from java.

damacus avatar damacus commented on June 1, 2024

I think this is actually working as I designed. Limiting Corretto down to a current/previous minor version will probably lead to code sprawl.

from java.

jakauppila avatar jakauppila commented on June 1, 2024

I have opened an issue over on corretto/corretto11 asking about documentation around the specific version url structure, just to have more clarity: corretto/corretto-11#112

from java.

jakauppila avatar jakauppila commented on June 1, 2024

Here's some rambling thoughts about this issue.

Today, the resource takes both version and full_version.

version is used for the following:

  • Retrieve the 'latest' friendly URL via default_corretto_url
  • Retrieve the 'latest' checksum via default_corretto_checksum (hardcoded in the cookbook, so gets out of date quickly)
  • Help define the default java_home along with full_version if defined, otherwise is defaulted to a hardcoded full_version (which has the same problem as above)

full_version is used for the sole purpose of defining the full path of the default java_home directory structure.

So I'm thinking:

  • Condense down to only a single version property where we can evaluate to see if it's simply a major version (8, 11, or 15) or a specific version
    • If major version, use the friendly 'latest' URLs. Dynamically retrieve the checksum via friendly URL
    • If specific version, use the undocumented 'version' URLs. There is currently no method for retrieving the checksum as they are not actively published right now.
    • The friendly URLs are simply a 302 redirect to the latest version; is there any precedence in other cookbooks for parsing the resulting downloaded filename for the full version to use elsewhere in the resource? This naturally breaks down if someone supplies their own download URL that doesn't follow the same naming scheme.

One caveat on the checksum is that currently the resource passes it directly to remote_file which appears to expect SHA256, whereas the AWS published the MD5 on the "friendly" urls.

Or:

  • Stop allowing the "friendly" latest 8, 11 versions and force specifying a specific version, where checksum must be manually supplied until AWS publishes them via repeatable means.

We also deploy java on application servers and configure those apps to use an explicit version, so I'd probably look to add a property to skip the alternatives configuration.

from java.

jakauppila avatar jakauppila commented on June 1, 2024

There's another issue out on corretto/corretto-jdk about exposing an API for fetching versions, I think this is the ideal state for being able to bring in this functionality into the cookbook. corretto/corretto-jdk#14

from java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.