Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ java::download { 'jdk8' :
}
```

## AdoptOpenJDK

The defined type `java::adopt` installs one or more versions of AdoptOpenJDK Java. `java::adopt` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).

```puppet
Expand All @@ -70,7 +72,7 @@ java::adopt { 'jdk11' :
java => 'jdk',
}
```
#TODO

To install a specific release of a AdoptOpenJDK Java version, e.g. 8u202-b08, provide both parameters `version_major` and `version_minor` as follows:

```puppet
Expand Down Expand Up @@ -105,6 +107,58 @@ java::adopt { 'jdk8' :
}
```

## SAP Java (sapjvm / sapmachine)

SAP also offers JVM distributions. They are mostly required for their SAP products. In earlier versions it is called "sapjvm", in newer versions they call it "sapmachine".

The defined type `java::sap` installs one or more versions of sapjvm (if version 7 or 8) or sapmachine (if version > 8) Java. `java::sap` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive).
By using this defined type with versions 7 or 8 you agree with the EULA presented at https://tools.hana.ondemand.com/developer-license-3_1.txt!

```puppet
java::sap { 'sapjvm8' :
ensure => 'present',
version => '8',
java => 'jdk',
}

java::sap { 'sapmachine11' :
ensure => 'present',
version => '11',
java => 'jdk',
}
```

To install a specific release of a SAP Java version, e.g. sapjvm 8.1.063, provide parameter `version_full`:

```puppet
java::sap { 'jdk8' :
ensure => 'present',
version_full => '8.1.063',
java => 'jdk',
}
```

To install SAP Java to a non-default basedir (defaults: /usr/lib/jvm for Debian; /usr/java for RedHat):
```puppet
java::adopt { 'sapjvm8' :
ensure => 'present',
version_full => '8.1.063',
java => 'jdk',
basedir => '/custom/java',
}
```

To ensure that a custom basedir is a directory before SAP Java is installed (note: manage separately for custom ownership or perms):
```puppet
java::adopt { 'sapjvm8' :
ensure => 'present',
version_full => '8.1.063',
java => 'jdk',
manage_basedir => true,
basedir => '/custom/java',
}
```

## Reference

For information on the classes and types, see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-java/blob/master/REFERENCE.md). For information on the facts, see below.
Expand Down Expand Up @@ -161,6 +215,17 @@ AdoptOpenJDK Java is supported on:
* Amazon Linux
* Debian

SAP Java 7 and 8 (=sapjvm) are supported (by SAP) on:

* SLES 12, 15
* Oracle Linux 7, 8
* Red Hat Enterprise Linux (RHEL) 7, 8

(however installations on other distributions mostly also work well)

For SAP Java > 8 (=sapmachine) please refer to the OpenJDK list as it is based on OpenJDK and has no special requirements.


### Known issues

Where Oracle change the format of the URLs to different installer packages, the curl to fetch the package may fail with a HTTP/404 error. In this case, passing a full known good URL using the `url` parameter will allow the module to still be able to install specific versions of the JRE/JDK. Note the `version_major` and `version_minor` parameters must be passed and must match the version downloaded using the known URL in the `url` parameter.
Expand Down
91 changes: 91 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ options, even though those are not in the package repositories.

* [`java::adopt`](#javaadopt): Install one or more versions of AdoptOpenJDK Java.
* [`java::download`](#javadownload): Installs Java from a url location.
* [`java::sap`](#javasap): Install one or more versions of SAPJVM or Sapmachine

## Classes

Expand Down Expand Up @@ -342,3 +343,93 @@ The name for the optional symlink in the installation directory.

Default value: `undef`

### java::sap

Defined Type java::sap

#### Parameters

The following parameters are available in the `java::sap` defined type.

##### `ensure`

Data type: `Any`

Install or remove the package.

Default value: 'present'

##### `version`

Data type: `Any`

Version of Java to install, e.g. '8' or '9'. Default values for full versions will be used.

Default value: '8'

##### `version_full`

Data type: `Any`

Major version which should be installed, e.g. '8.1.063' or '11.0.7'. If used, "version" parameter is ignored.

Default value: `undef`

##### `java`

Data type: `Any`

Type of Java Edition to install, jdk or jre.

Default value: 'jdk'

##### `proxy_server`

Data type: `Any`

Specify a proxy server, with port number if needed. ie: https://example.com:8080. (passed to archive)

Default value: `undef`

##### `proxy_type`

Data type: `Any`

Proxy server type (none|http|https|ftp). (passed to archive)

Default value: `undef`

##### `basedir`

Data type: `Any`

Directory under which the installation will occur. If not set, defaults to
/usr/lib/jvm for Debian and /usr/java for RedHat.

Default value: `undef`

##### `manage_basedir`

Data type: `Any`

Whether to manage the basedir directory. Defaults to false.
Note: /usr/lib/jvm is managed for Debian by default, separate from this parameter.

Default value: `true`

##### `manage_symlink`

Data type: `Any`

Whether to manage a symlink that points to the installation directory. Defaults to false.

Default value: `false`

##### `symlink_name`

Data type: `Any`

The name for the optional symlink in the installation directory.

Default value: `undef`

Loading