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

Adjust JDK detection / configuration #452

Closed
danielmitterdorfer opened this issue Apr 3, 2018 · 2 comments · Fixed by #518
Closed

Adjust JDK detection / configuration #452

danielmitterdorfer opened this issue Apr 3, 2018 · 2 comments · Fixed by #518
Labels
:Benchmark Candidate Management Anything affecting how Rally sets up Elasticsearch enhancement Improves the status quo
Milestone

Comments

@danielmitterdorfer
Copy link
Member

Rally has been created before the JDK moved to a more rapid 6 month release cycle. However, meanwhile things have changed and Elasticsearch embraces this more rapid cycle. Elasticsearch allows us to set:

  • RUNTIME_JAVA_HOME to define the JDK version that Elasticsearch will run with, and
  • JAVA_HOME to define the JDK version that Elasticsearch is built with (will also be used if RUNTIME_JAVA_HOME is not set)

Our current configuration logic in Rally however, is still tied to specific JDK versions and we should change that. Ideally we can still figure out everything automatically for the standard case but the exact logic is yet tbd.

W.r.t. to the timeframe it would be good if we could implement this before JDK 11 is out.

@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Config Config file format changes, new properties, ... labels Apr 3, 2018
@danielmitterdorfer danielmitterdorfer added this to the Backlog milestone Apr 3, 2018
@danielmitterdorfer danielmitterdorfer modified the milestones: Backlog, 1.x Apr 12, 2018
@danielmitterdorfer danielmitterdorfer modified the milestones: 1.x, 0.10.2 Apr 19, 2018
@danielmitterdorfer
Copy link
Member Author

After discussion we settled on the following requirements:

  • We must be able to benchmark different versions of Elasticsearch which may require different JDKs to run.
  • We only allow to build the master version of Elasticsearch from sources with Rally, older versions will need to be benchmarked based on a distribution (or the user can always build it outside of Rally).
  • It must be possible the detection of Java version can be done non-interactively (e.g. for CI)

We came up with the following approach:

  • We will add a new file java-versions.ini on top-level of the rally-teams repo. Its contents can be different per branch (which match the Elasticsearch versions). In the file we will define a property runtime.jdk which defines a comma-separated list of (major) JDK versions that are allowed with the respective Elasticsearch version. On the master branch, we will define an additional property build.jdk which defines the allowed (major) JDK version to build Elasticsearch. This property will only contain one entry.
  • esrally configure will not check for Java anymore. The configuration file (in ~/.rally/rally.ini) will also not contain any Java paths anymore.
  • Rally will use the environment variable JAVA_HOME to determine the home directory of the Java installation. It needs to match the following requirements:
    • For build.jdk: the major version of the Java installation JAVA_HOME points to, needs to match the required version.
    • For runtime.jdk: the major version of the Java installation JAVA_HOME points to, needs to match one of the required versions. Additionally, it must be a proper release, i.e. early access versions will be rejected (because Elasticsearch would reject them as well).
  • Additionally, the user can define environment variables matching the pattern JAVAx_HOME where x is the major version, e.g. JAVA8_HOME, JAVA9_HOME, etc.. If those are defined they take precedence over JAVA_HOME. By default, Rally will pick the highest possible version that satisfies the criteria mentioned above. We will allow the user with a command line option to override that choice.

As it is possible for users to define custom team repositories, we will issue a warning if java-versions.ini is missing and rely entirely that JAVA_HOME is set to the "correct" version.

@danielmitterdorfer
Copy link
Member Author

We should leverage the mechanisms introduced in #485 and define new properties in config.ini instead of a dedicated file.

@danielmitterdorfer danielmitterdorfer modified the milestones: 0.11.0, 0.12.0 May 8, 2018
@danielmitterdorfer danielmitterdorfer modified the milestones: 0.12.0, 1.0.0 May 25, 2018
danielmitterdorfer added a commit that referenced this issue Jun 5, 2018
With this commit we derive the appropriate JDK version at benchmark
runtime instead of requiring that it is preconfigured. This requires two
new variables in the rally-teams repo: `build.jdk` and `runtime.jdk` to
resolve the appropriate (major) JDK version depending on the
Elasticsearch version.

When we know the required JDK version, we check the environment
variables `JAVAx_HOME` (where `x` is the JDK version) and `JAVA_HOME` to
find the correct JAVA_HOME path. We also allow the user to override the
runtime JDK with a new command line parameter `--runtime-jdk` as Rally
will default to the highest available and supported JDK version on the
target system.

Closes #452
danielmitterdorfer added a commit that referenced this issue Jun 5, 2018
With this commit we derive the appropriate JDK version at benchmark
runtime instead of requiring that it is preconfigured. This requires two
new variables in the rally-teams repo: `build.jdk` and `runtime.jdk` to
resolve the appropriate (major) JDK version depending on the
Elasticsearch version.

When we know the required JDK version, we check the environment
variables `JAVAx_HOME` (where `x` is the JDK version) and `JAVA_HOME` to
find the correct JAVA_HOME path. We also allow the user to override the
runtime JDK with a new command line parameter `--runtime-jdk` as Rally
will default to the highest available and supported JDK version on the
target system.

Closes #452
@danielmitterdorfer danielmitterdorfer added :Benchmark Candidate Management Anything affecting how Rally sets up Elasticsearch and removed :Config Config file format changes, new properties, ... labels Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit to elastic/rally-teams that referenced this issue Jun 5, 2018
danielmitterdorfer added a commit that referenced this issue Jun 14, 2018
With this commit we derive the appropriate JDK version at benchmark
runtime instead of requiring that it is preconfigured. This requires two
new variables in the rally-teams repo: `build.jdk` and `runtime.jdk` to
resolve the appropriate (major) JDK version depending on the
Elasticsearch version.

When we know the required JDK version, we check the environment
variables `JAVAx_HOME` (where `x` is the JDK version) and `JAVA_HOME` to
find the correct JAVA_HOME path. We also allow the user to override the
runtime JDK with a new command line parameter `--runtime-jdk` as Rally
will default to the highest available and supported JDK version on the
target system.

Closes #452
Relates #518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Benchmark Candidate Management Anything affecting how Rally sets up Elasticsearch enhancement Improves the status quo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant