Closed jakauppila closed 2 years ago
I think this is actually working as I designed. Limiting Corretto down to a current/previous minor version will probably lead to code sprawl.
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 resource8
or 11
, return the current latest
url it does todayI 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.
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.
I have opened an issue over on corretto/corretto11 asking about documentation around the specific version url structure, just to have more clarity: https://github.com/corretto/corretto-11/issues/112
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.
Here's some rambling thoughts about this issue.
Today, the resource takes both version
and full_version
.
version
is used for the following:
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:
version
property where we can evaluate to see if it's simply a major version (8, 11, or 15) or a specific version
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:
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.
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. https://github.com/corretto/corretto-jdk/issues/14
:speaking_head: Foreword
Thank for taking the time to fill this feature request fully. Without it we may not be able to , and the issue may be closed without resolution.
:person_frowning: Problem Statement
Currently, the
version
property on thecorretto_install
resource accepts a major version which then builds the latest major version url withdefault_corretto_url
, which means I could not specify11.0.7.10.1
without providing the full url and checksum value myself.:grey_question: Possible Solution
Add the ability to specify specific versions and build the appropriate URL to download the correct package. We could maintain the current ability by detecting only a major version and downloading the latest version.
Along with #607, we should also dynamically pull back the MD5 checksum as well.
:heavy_plus_sign: Additional context
URL download format is documented here: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
Though it appears to only be clearly documented for the
latest
version. I have submitted feedback for AWS to provide additional documentation for downloading specific versions rather than just guessing; I will also follow-up with AWS with support.