Page MenuHomeSoftware Heritage

Kafka needs a jre to run
ClosedPublic

Authored by vsellier on Thu, Nov 19, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vsellier created this revision.Thu, Nov 19, 3:27 PM
olasd added a subscriber: olasd.Thu, Nov 19, 3:29 PM

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)?

vsellier updated this revision to Diff 16077.Fri, Nov 20, 9:08 AM

Use ::java instead of directly install the jre package

vsellier edited the test plan for this revision. (Show Details)Fri, Nov 20, 9:09 AM
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).

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