Forge Home

oracle_java

Puppet module to install Oracle Java on Linux systems

114,265 downloads

17,851 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 2.9.4 (latest)
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.3
  • 2.8.2
  • 2.8.1
  • 2.8.0
  • 2.7.4
  • 2.7.3
  • 2.7.2
  • 2.7.1
  • 2.7.0 (deleted)
  • 2.7.0-hf
  • 2.6.3
  • 2.6.2
  • 2.6.1
  • 2.6.0
  • 2.5.1
  • 2.5.0
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.0
  • 2.2.7
  • 2.2.6
  • 2.2.5 (deleted)
  • 2.2.4
  • 2.2.3
  • 2.2.2
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Apr 23rd 2018
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.4.0
  • , , , , , , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'aco-oracle_java', '2.9.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add aco-oracle_java
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install aco-oracle_java --version 2.9.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: java, jdk, jre, oracle

Documentation

aco/oracle_java — version 2.9.4 Apr 23rd 2018

oracle_java

Build Status

By using this module you acknowledge that you have read and accepted the terms of the Oracle Binary Code License Agreement for Java SE.

Downloads from the Oracle Java Archive require an Oracle.com account.

Table of Contents

  1. Overview - What is the oracle_java module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with tomcat
  4. Usage - The classes and defined types available for configuration
  1. Limitations
  2. Contributors
  3. Credits

Overview

The oracle_java module allows you to install the Oracle JRE or JDK of your choice from the official archives provided by Oracle.

Module description

This module downloads the desired Java version from Oracle's website and installs it on the target system. On RPM-based distributions the RPM version will be used by default. On all other platforms a tar.gz archive will be retrieved and extracted. Multiple versions of Oracle Java can be installed on the same system using a defined type.

Java SE archives are available from the Oracle Java SE Downloads and Oracle Java Archive pages.

This module is suitable for pretty much any Linux system. It currently supports all released Java SE versions from JSE 7 on.

Setup

oracle_java will affect the following parts of your system:

  • jre/jdk packages and/or archives
  • java alternatives (and slaves)

Including the main class is enough to install the latest version of the Oracle JRE.

include oracle_java

A couple of examples

Install a specific version of the JDK

class { 'oracle_java':
  version     => '7u45',
  type        => 'jdk',
  ssousername => 'me@example.com',  # only for packages from the Oracle Java Archive
  ssopassword => 'mypassword'       #
}

Install multiple Java versions

class { 'oracle_java':
  version => '8u45',
  type    => 'jdk'
}
oracle_java::installation { '7u65':
  type => 'jdk'
}

Force installation from standard tar.gz archive, in a custom location

class { 'oracle_java':format       => 'tar.gz',
  install_path => '/opt/java'
}

Disable checksum validation and add java alternative

class { 'oracle_java':check_checksum  => false,
  add_alternative => true
}

Install a Java version not (yet) supported by this module

class { 'oracle_java':version  => '8u122',
  build    => '-b04',
  checksum => '436fc6772eb961b07b7b3414ab111857',
  urlcode  => '/e9e7ea248e2c4826b92b3f075a80e441'
}

Install from custom archive and URL

class { 'oracle_java':download_url => 'http://myrepo.com',
  filename     => 'my-jdk-8u66.tar.gz',
  checksum     => '380e6d224f5c8c8eba37c97439f09eb4'
}

Download Java archives behind a proxy server

class { 'oracle_java':proxy_server => 'http://user:password@proxy.example.com:8080'
}

Usage

Classes and Defined Types

Class: oracle_java

Primary class and entry point of the module. Installs Java in /usr/java

Parameters within oracle_java:

version

Java version to install, formatted as 'major_version'u'minor_version' or simply 'major_version' for the latest available release in the selected Java SE series. Defaults to 8
Note: a minor version of '0' (for example 8u0) matches the initial release of the selected Java SE series.

format

What format of installation archive to retrieve. Valid values are rpm and tar.gz. Default depends on the platform.

ssousername

Oracle account username. Used to authenticate against Oracle.com Single Sign-on service and download packages from the Oracle Java Archive.

ssopassword

Oracle account password.

install_path

Absolute root path where the Oracle Java archives are extracted. Requires format set to tar.gz. Defaults to /usr/java.

add_system_env

Add JAVA_HOME environment variable to the /etc/environment file. Boolean value. Defaults to false.

See also Common parameters

Define: oracle_java::installation

Installs an extra version of Oracle Java in install_path.

Parameters within oracle_java::installation:

version

Namevar. See oracle_java::version

See also Common parameters

Common parameters

Parameters common to both oracle_java and oracle_java::installation.

build

Build number associated to the requested Java SE version, formatted as -b## . Default determined automatically.
Note: this parameter is mandatory when installing a Java SE release which is not currently supported by this module.

type

What envionment type to install. Valid values are jre and jdk. Defaults to jre.

check_checksum

Enable checksum validation on downloaded archives. Boolean value. Defaults to true.

checksum

MD5 checksum used to verify the archive integrity. Defaults to the checksum provided by Oracle.

add_alternative

Add Oracle Java to the system alternatives on compatible platforms (Debian/RHEL/SuSE families). Boolean value. Defaults to false.

download_url

Base URL of an alternative location to download the Java archive from. Defaults to Oracle servers.

filename

File name of the installation package to retrieve at ${download_url}. Defaults to the file name provided by Oracle.

proxy_server

URL of a proxy server used for downloading Java archives.

proxy_type

Type of the proxy server. Valid values are none, http, https and ftp. Default determined by the scheme used in proxy_server.

urlcode

Complex code Oracle adds to the download URL since Java SE 8u121. Default determined automatically.

Limitations

Prior to Java 8u20, two different releases of the same Java series could not cohabit on the same system when installed from RPM. Each new version would override the previous one. This does not happen with tar.gz archives.

Contributors

Credits

The cookie manipulation used by this module to download installation packages directly from Oracle's page was found on Ivan Dyedov's Blog

Features request and contributions are always welcome!