Page MenuHomeSoftware Heritage

Kafka needs a jre to run
ClosedPublic

Authored by vsellier on Nov 19 2020, 3:27 PM.

Details

Summary

On the servers currently installed, the jre is installed as a dependency
of the zookeeper package. We should explicitely install it for kafka.

Related to T2790

Test Plan

It just make the default-jre installation explicit:

vsellier@kafka1 ~ % aptitude why default-jre-headless
i   zookeeper Depends default-jre-headless | java6-runtime-headless
diff origin/production/journal0.internal.staging.swh.network current/journal0.internal.staging.swh.network
*******************************************
+ Anchor[java::begin:]
*******************************************
+ Anchor[java::end]
*******************************************
+ Exec[update-java-alternatives] =>
   parameters =>
     "command": "update-java-alternatives --set java-1.11.0-openjdk-amd64 --jre-h...
     "path": "/usr/bin:/usr/sbin:/bin:/sbin",
     "unless": "test /etc/alternatives/java -ef '/usr/lib/jvm/java-1.11.0-openjdk...
*******************************************
+ File_line[java-home-environment] =>
   parameters =>
     "line": "JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/",
     "match": "JAVA_HOME=",
     "path": "/etc/environment"
*******************************************
+ Package[java-common] =>
   parameters =>
     "ensure": "present"
*******************************************
+ Package[java] =>
   parameters =>
     "ensure": "present",
     "name": "openjdk-11-jre-headless"
*******************************************
*** End octocatalog-diff on journal0.internal.staging.swh.network
diff origin/production/kafka1.internal.softwareheritage.org current/kafka1.internal.softwareheritage.org
*******************************************
+ Anchor[java::begin:]
*******************************************
+ Anchor[java::end]
*******************************************
+ Exec[update-java-alternatives] =>
   parameters =>
     "command": "update-java-alternatives --set java-1.11.0-openjdk-amd64 --jre-h...
     "path": "/usr/bin:/usr/sbin:/bin:/sbin",
     "unless": "test /etc/alternatives/java -ef '/usr/lib/jvm/java-1.11.0-openjdk...
*******************************************
+ File_line[java-home-environment] =>
   parameters =>
     "line": "JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/",
     "match": "JAVA_HOME=",
     "path": "/etc/environment"
*******************************************
+ Package[java-common] =>
   parameters =>
     "ensure": "present"
*******************************************
+ Package[java] =>
   parameters =>
     "ensure": "present",
     "name": "openjdk-11-jre-headless"
*******************************************
*** End octocatalog-diff on kafka1.internal.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
staging
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17342
Build 26786: arc lint + arc unit

Event Timeline

We use the puppet java module in a bunch of other places, maybe it makes sense to directly import that (which would mean using include ::java)?

Use ::java instead of directly install the jre package

In D4534#113059, @olasd wrote:

We use the puppet java module in a bunch of other places, maybe it makes sense to directly import that (which would mean using include ::java)?

Sure, I have only saw it on the jenkins agent so I was not sure.
It's updated (the test plan reflect the new change).

This revision is now accepted and ready to land.Nov 20 2020, 10:14 AM
This revision was automatically updated to reflect the committed changes.