Install Oracle JDK with Puppet

Problem

You would like to install Oracle JDK using Puppet.

Using the puppetlabs/java module, you might get an error message such as:

Error: Java distribution oracle-jdk is not supported. at […]/init.pp:57 on node […]

Solution

Use the module puppet-jdk-oracle.

Just follow the installation instruction from the GitHub page.

Note that you might want to set the java version used to the latest available. You can find the latest version and build number from the Oracle JDK downloads page.

To get the build number, you first need to accept the terms and conditions and then check the URL of the link to download the version of the JDK you are interested in:

Also, make sure to configure the right platform: ‘x64’ for 64 bit systems and ‘i586’ for 32 bit systems.

As of 30th of April 2015, this would be the configuration for the latest JDK version on 64 bit Linux:

class { ‘jdk_oracle’:

    version => ‘8’,

    version_update => ’45’,

    version_build => ’14’,

    platform => ‘x64’,

    ensure => ‘installed’,

}

2 thoughts on “Install Oracle JDK with Puppet

  1. waste of time , am getting following error

    Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Could not match ‘jdk_oracle’: at /etc/puppet/manifests/site.pp:1 on node puppet-agent.c.dynamicmenu.internal
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s