Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 01d830e

Browse files
committed
Merge pull request #4 from antoineco/multiple_java_installations
Multiple java installations
2 parents 8faf3ef + 7037f14 commit 01d830e

File tree

4 files changed

+1069
-240
lines changed

4 files changed

+1069
-240
lines changed

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
2. [Module Description](#module-description)
77
3. [Setup](#setup)
88
4. [Usage](#usage)
9+
* [Classes and Defined Types](#classes-and-defined-types)
10+
* [Class: oracle_java](#class-oracle_java)
11+
* [Define: oracle_java::installation](#define-oracle_javainstallation)
912
5. [Limitations](#limitations)
1013
6. [Credits](#credits)
1114
7. [To Do](#to-do)
@@ -16,7 +19,7 @@ The oracle_java module allows you to install the Oracle JRE or JDK of your choic
1619

1720
##Module description
1821

19-
This module downloads the desired Java version from Oracle's website and installs it on the target system. On [RPM-based distributions](http://en.wikipedia.org/wiki/List_of_Linux_distributions#RPM-based) the RPM version will be used by default. On all other platforms a tar.gz archive will be retrieved and extracted.
22+
This module downloads the desired Java version from Oracle's website and installs it on the target system. On [RPM-based distributions](http://en.wikipedia.org/wiki/List_of_Linux_distributions#RPM-based) 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.
2023

2124
Java SE archives are available from the Oracle [Java SE Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and Oracle [Java Archive](http://www.oracle.com/technetwork/java/archive-139210.html) pages.
2225

@@ -26,8 +29,8 @@ This module is suitable for pretty much any Linux system. It currently supports
2629

2730
oracle_java will affect the following parts of your system:
2831

29-
* jre/jdk package
30-
* java alternative (and slaves)
32+
* jre/jdk packages and/or archives
33+
* java alternatives (and slaves)
3134

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

@@ -62,6 +65,18 @@ class { 'oracle_java':
6265
}
6366
```
6467

68+
Install multiple Java versions
69+
70+
```puppet
71+
class { 'oracle_java':
72+
version => '8u45',
73+
type => 'jdk'
74+
} ->
75+
oracle_java::installation { '7u65':
76+
type => 'jdk'
77+
}
78+
```
79+
6580
Force installation from standard tar.gz archive
6681

6782
```puppet
@@ -83,9 +98,11 @@ class { 'oracle_java':
8398

8499
##Usage
85100

101+
###Classes and Defined Types
102+
86103
####Class: `oracle_java`
87104

88-
Primary class and entry point of the module.
105+
Primary class and entry point of the module. Installs Java in `/usr/java`
89106

90107
**Parameters within `oracle_java`:**
91108

@@ -110,6 +127,28 @@ Enable checksum validation on downloaded archives. Boolean value. Defaults to `t
110127

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

130+
####Define: `oracle_java::installation`
131+
132+
Installs an extra version of Oracle Java in `/usr/java`
133+
134+
**Parameters within `oracle_java::installation`:**
135+
136+
#####`version`
137+
138+
Namevar. See [oracle_java::version](#version)
139+
140+
#####`type`
141+
142+
See [oracle_java::type](#type)
143+
144+
#####`check_checksum`
145+
146+
See [oracle_java::check_checksum](#check_checksum)
147+
148+
#####`add_alternative`
149+
150+
See [oracle_java::add_alternative](#add_alternative)
151+
113152
##Limitations
114153

115154
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 however.

0 commit comments

Comments
 (0)