java
Version information
This version is compatible with:
- Puppet Enterprise >= 3.0.0 < 2015.3.0
- Puppet >= 3.0.0 < 5.0.0
- RedHat,CentOS,OracleLinux,Scientific,Fedora,Debian,Ubuntu,SLES,Solaris
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-java', '1.4.1'
Learn more about managing modules with a PuppetfileDocumentation
#java
####Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with the java module
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
##Overview
Installs the correct Java package on various platforms.
##Module Description
The java module can automatically install Java jdk or jre on a wide variety of systems. Java is a base component for many software platforms, but Java system packages don't always follow packaging conventions. The java module simplifies the Java installation process.
##Setup
###Beginning with the java module
To install the correct Java package on your system, include the java
class: include java
.
##Usage
The java module installs the correct jdk or jre package on a wide variety of systems. By default, the module will install the jdk package, but you can set different installation parameters as needed. For example, to install jre instead of jdk, you would set the distribution parameter:
class { 'java':
distribution => 'jre',
}
##Reference
###Classes
####Public classes
java
: Installs and manages the Java package.
####Private classes
-
java::config
: Configures the Java alternatives. -
java::params
: Builds a hash of jdk/jre packages for all compatible operating systems.
####Parameters
The following parameters are available in java
:
distribution
Specifies the Java distribution to install.
Valid options: 'jdk', 'jre', or, where the platform supports alternative packages, 'sun-jdk', 'sun-jre', 'oracle-jdk', 'oracle-jre'. Default: 'jdk'.
#####java_alternative
Specifies the name of the Java alternative to use. If you set this parameter, you must also set the java_alternative_path
.
Valid options: Run command update-java-alternatives -l
for a list of available choices. Default: OS and distribution dependent defaults on *deb systems, undef on others.
#####java_alternative_path
Required when java_alternative
is specified. Defines the path to the java
command.
Valid option: String. Default: OS and distribution dependent defaults on *deb systems, undef on others.
#####package
Specifies the name of the Java package. This is configurable in case you want to install a non-standard Java package. If not set, the module will install the appropriate package for the distribution
parameter and target platform. If you set package
, the distribution
parameter will do nothing.
Valid option: String. Default: undef.
#####version
Sets the version of Java to install, if you want to ensure a particular version.
Valid options: 'present', 'installed', 'latest', or a string matching /^[.+_0-9a-zA-Z:-]+$/
. Default: 'present'.
###Facts
The java module includes a few facts to describe the version of Java installed on the system:
java_major_version
: The major version of Java.java_patch_level
: The patch level of Java.java_version
: The full Java version string.
Note: The facts return nil
if Java is not installed on the system.
##Limitations
This module cannot guarantee installation of Java versions that are not available on platform repositories.
This module only manages a singular installation of Java, meaning it is not possible to manage e.g. OpenJDK 7, Oracle Java 7 and Oracle Java 8 in parallel on the same system.
Oracle Java packages are not included in Debian 7 and Ubuntu 12.04/14.04 repositories. To install Java on those systems, you'll need to package Oracle JDK/JRE, and then the module will be able to install the package. For more information on how to package Oracle JDK/JRE, see the Debian wiki.
This module is officially supported for the following Java versions and platforms:
OpenJDK is supported on:
- Red Hat Enterprise Linux (RHEL) 5, 6, 7
- CentOS 5, 6, 7
- Oracle Linux 6, 7
- Scientific Linux 5, 6
- Debian 6, 7
- Ubuntu 10.04, 12.04, 14.04
- Solaris 11
- SLES 11 SP1, 12
- OpenBSD 5.6, 5.7
Sun Java is supported on:
- Debian 6
A note to OpenBSD
OpenBSD packages install Java JRE/JDK in a unique directory structure, not linking the binaries to a standard directory. Because of that, the path to this location is hardcoded in the java_version fact. Whenever a Java upgrade to a newer version/path will be done on OpenBSD, it has to be adapted there.
##Development
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve. We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see our module contribution guide.
##Contributors
The list of contributors can be found at: https://github.com/puppetlabs/puppetlabs-java/graphs/contributors.
2015-07-16 - Supported Release 1.4.1
Summary
This release updates the metadata for the upcoming release of PE and update params for OEL to match metadata
Bugfixes:
- Add missing OEL to params
##2015-07-07 - Supported Release 1.4.0 ###Summary This release adds several new features, bugfixes, documentation updates, and test improvements.
####Features:
- Puppet 4 support and testing
- Adds support for several Operating Systems
- Ubuntu 15.04
- OpenBSD 5.6, 5.7
- Fedora 20, 21, 22
####Bugfixes:
- Fixes java_version fact to work on large systems. (MODULES-1749)
- Improves maintainability of java_version fact.
- Fixes java package names on Fedora 21+.
- Fixes java install problems on Puppet 3.7.5 - 3.8.1 (PUP-4520)
- Fixes create-java-alternatives commands on RedHat distros.
- Fixes bug with Debian systems missing java-common package.
##2015-01-20 - Supported Release 1.3.0
###Summary
This release adds 3 new facts for determining Java version, adds RHEL alternatives support, adds utopic support, and fixes the flag for update-java-alternatives
when installed from a headless pacakge.
####Features
- Added RHEL support for alternatives
- New facts
- java_major_version
- java_patch_level
- java_version
- Add support for utopic
####Bugfixes
- Use
--jre-headless
in theupdate-java-alternatives
command when installed from aheadless
package
##2014-11-11 - Supported Version 1.2.0
###Summary: This release adds SLES 12 support and is tested for Future Parser Support
####Bugfixes:
- Several readme updates
- Testcase flexability increased
####Features:
- Add SLES 12 support
- Future Parser tested
- Validated against PE 3.7
##2014-08-25 - Supported Version 1.1.2
###Summary: This release begins the support coverage of the puppetlabs-java module.
###Bugfixes:
- Update java alternative values from deprecated names
- Readme updated
- Testing updated
##2014-05-02 - Version 1.1.1
###Summary:
Add support for new versions of Debian and Ubuntu!
####Features:
- Add support for Ubuntu Trusty (14.04)
- Add support for Debian Jessie (8.x)
##2014-01-06 - Version 1.1.0
####Summary:
Primarily a release for Ubuntu users!
####Features:
- Add support for Ubuntu Saucy (13.10)
- Add
java_home
parameter for centralized setting of JAVA_HOME. - Add Scientific Linux
###Bugfixes:
- Plus signs are valid in debian/ubuntu package names.
##2013-08-01 - Version 1.0.1
Matthaus Owens matthaus@puppetlabs.com
- Update java packages for Fedora systems
##2013-07-29 - Version 1.0.0
####Detailed Changes
Krzysztof Suszyński krzysztof.suszynski@coi.gov.pl
- Adding support for Oracle Enterprise Linux
Peter Drake pdrake@allplayers.com
- Add support for natty
Robert Munteanu rmuntean@adobe.com
- Add support for OpenSUSE
Martin Jackson martin@uncommonsense-uk.com
- Added support Amazon Linux using facter >= 1.7.x
Gareth Rushgrove gareth@morethanseven.net Brett Porter brett@apache.org
- Fixes for older versions of CentOS
- Improvements to module build and tests
Nathan R Valentine nrvale0@gmail.com
- Add support for Ubuntu quantal and raring
Sharif Nassar sharif@mediatemple.net
- Add support for Debian alternatives, and more than one JDK/JRE per platform.
##2013-04-04 - Version 0.3.0 Reid Vandewiele reid@puppetlabs.com -
- Refactor, introduce params pattern
##2012-11-15 - Version 0.2.0 Scott Schneider sschneider@puppetlabs.com
- Add Solaris support
##2011-06-16 - Version 0.1.5 Jeff McCune jeff@puppetlabs.com
- Add Debian based distro (Lucid) support
##2011-06-02 - Version 0.1.4 Jeff McCune jeff@puppetlabs.com
- Fix class composition ordering problems
##2011-05-28 - Version 0.1.3 Jeff McCune jeff@puppetlabs.com
- Remove stages
##2011-05-26 - Version 0.1.2 Jeff McCune jeff@puppetlabs.com
- Changes JRE/JDK selection class parameter to $distribution
##2011-05-25 - Version 0.1.1 Jeff McCune jeff@puppetlabs.com
- Re-did versioning to follow semantic versioning
- Add validation of class parameters
##2011-05-24 - Version 0.1.0 Jeff McCune jeff@puppetlabs.com
- Default to JDK version 6u25
##2011-05-24 - Version 0.0.1 Jeff McCune jeff@puppetlabs.com
- Initial release
Dependencies
- puppetlabs/stdlib (>= 2.4.0 < 5.0.0)
Puppet Java Module - Puppet module for managing Java Copyright (C) 2011 Puppet Labs Inc Puppet Labs can be contacted at: info@puppetlabs.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.