Comments (7)
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
or11
, return the currentlatest
url it does today - Otherwise construct the specific version URL (utilizing ohai attributes for architecture, etc) to pull the appropriate version down
- Example:
- A caveat here is understanding exactly what that specific URL structure is, of which I am following up with AWS on
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.
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.
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.
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.
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.
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 withfull_version
if defined, otherwise is defaulted to a hardcodedfull_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.
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)
- java_certificate resource :remove fails
- Please remove references to supporting Oracle/IBM HOT 3
- Cannot 'Include' in Run List HOT 3
- `archive_file` within `corretto_install` will not extract if directory already exists HOT 4
- AdoptOpenJDK install doesn't handle JAVA_HOME correctly HOT 10
- Feature: STARTTLS parameter for the java_certificate resource HOT 1
- Bad resource naming for openjdk_source_install HOT 1
- Chef Exceptions CookbookChefVersionMismatch: Cookbook 'java' version '8.5.0' depends on chef version [">= 15.0"], but the running chef version is 14.15.6 HOT 2
- Cannot upgrade java version HOT 12
- Multiple errors when upgrading from v4.0.0 to v8.4.0 HOT 7
- OpenJDK Alternatives don't set correctly on OpenSUSE HOT 2
- AdoptOpenJDK is now Adoptium Temurin and IBM Semeru HOT 2
- openjdk_pkg_install reset_alternatives all the times HOT 2
- Adoptium Temurin JDK 11 is breaking certificate install HOT 1
- Dependency Dashboard
- OpenJDK variant typo HOT 1
- Cant seem to install anything but the default OpenJDK 17 version HOT 1
- AdoptiumJDK
- openjdk_pkg_install fails when installing older than newest version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java.