|
| 1 | +#java |
| 2 | + |
| 3 | +####Table of Contents |
| 4 | + |
| 5 | +1. [Overview](#overview) |
| 6 | +2. [Module Description - What the module does and why it is useful](#module-description) |
| 7 | +3. [Setup - The basics of getting started with java](#setup) |
| 8 | + * [What java affects](#what-java-affects) |
| 9 | + * [Setup requirements](#setup-requirements) |
| 10 | + * [Beginning with java](#beginning-with-java) |
| 11 | +4. [Usage - Configuration options and additional functionality](#usage) |
| 12 | +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) |
| 13 | +5. [Limitations - OS compatibility, etc.](#limitations) |
| 14 | +6. [Development - Guide for contributing to the module](#development) |
| 15 | + |
| 16 | +##Overview |
| 17 | + |
| 18 | +This is the java module. It allows to install Java OpenJDK and configure the default java alternative. |
| 19 | + |
| 20 | +##Module Description |
| 21 | + |
| 22 | +The module provides classes and defines to install Java OpenJDK and configure the java alternative on Ubuntu platforms. |
| 23 | +It allows to install multiple Java versions on the same node. |
| 24 | + |
| 25 | +##Setup |
| 26 | + |
| 27 | +###What java affects |
| 28 | + |
| 29 | +The module install the OpenJDK package from the repositories and set up the alternative system for the java command. |
| 30 | + |
| 31 | +If hiera defines a value for the parameter `java::java_default_version` the alternative system link for the command java is set to manual mode according to specified version. Otherwise it is left as it is. |
| 32 | + |
| 33 | +###Setup Requirements |
| 34 | + |
| 35 | +The module has no special requirements. |
| 36 | + |
| 37 | +###Beginning with java |
| 38 | + |
| 39 | +The module provides two classes to install Java OpenJDK 6 and 7 respectively. This is done, for example, by declarations as the following: |
| 40 | + |
| 41 | +``` |
| 42 | +include java_7 |
| 43 | +``` |
| 44 | + |
| 45 | +##Usage |
| 46 | + |
| 47 | +It is possible to install multiple versions of Java on a single node and to specify via hiera the default java to be set in the alternative system. An example hiera (JSON) declaration for a node could be as follows: |
| 48 | + |
| 49 | +``` |
| 50 | +{ |
| 51 | + "classes" : [ |
| 52 | + "java::java_6", |
| 53 | + "java::java_7" |
| 54 | + ], |
| 55 | + "java::java_default_version" : "6" |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +##Reference |
| 60 | + |
| 61 | +###`java::java_6` |
| 62 | +Installs OpenJDK-6 from the repositories. |
| 63 | + |
| 64 | +###`java::java_7` |
| 65 | +Installs OpenJDK-6 from the repositories. |
| 66 | + |
| 67 | +####Parameters |
| 68 | + |
| 69 | +#####`java::java_default_version` |
| 70 | +If present in a JSON hiera file allows to set the default java command in the alternative system. |
| 71 | + |
| 72 | +##Limitations |
| 73 | + |
| 74 | +At the moment the module targets only OpenJDK on Ubuntu platforms. Specifically, it is tested only on Ubuntu 10.04 and 12.04 distributions, although probably it will work also on more recent versions. |
| 75 | + |
| 76 | +##Development |
| 77 | + |
| 78 | +If you need some feature please send me a (pull) request or send me an email at: dsestero 'at' gmail 'dot' com. |
| 79 | + |
0 commit comments