Forge Home

jre_install

Install JRE without package system. This module install any jre version

10,279 downloads

10,279 latest version

1.9 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

  • 0.0.1 (latest)
released Nov 6th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'fhuertas-jre_install', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fhuertas-jre_install
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fhuertas-jre_install --version 0.0.1

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, jre

Documentation

fhuertas/jre_install — version 0.0.1 Nov 6th 2013

Java JRE Installation module

Overview

Author: Francisco Huertas Ferrer francisco.huertas@centeropenmiddleware.com

Center: Center for Open Middleware, Universidad Politecnica de Madrid

License: Apache 2.0

Version: 0.0.1

Module description

This module installs Java-JRE in a System using Puppet. This installation does not use the package system of the OS system.

This version supports Debian OS family. To support new OS families, it creates

Support to new OS families

To create support other OS families, must be performed the following steps:

  • Create a new script that creates a structure of directories. The name of the script must be mkdir-'OS Family'.sh.erb. E.g.: mkdir-redhat.sh.erb. The fact used in the template is dir. (See mkdir-Debian.sh.erb for more information)
  • Create a new script that checks if the version of JDK has changed and if it has changed, it extracts the the tar file. The name of the script must be 'OS Family'-checkversion.sh.erb. E.g.: redhat-checkversion.sh.erb. The facts used in the template are jre_filename, jre_package and java_home. (See Debiancheckversion-checkversion.sh.erb for more information).

Module information

puppet directories:

Puppet_base_dir
| - hieradata # data folder
|   | - jre_module # It stores the yaml files. It must be configured in hiera.yaml and can be different
| - module # Module folder
|   | - files # It stores the files, the jre package must be in this directory
|   | - manifest # It stores the manifest, 
|   | - templates # It stores the templates. The scripts are in this directory

Requisites

  • Puppet core version: >= 3.2
  • OS Family supported: Debian (Ubuntu is supported too)
  • Enable the Experimental parser for 3.2.X version.
  • Install and configure hiera. Installation guide

NOTE: How to enable experimental parser (Only for 3.2.X core version): Edit the puppet.conf file in the master node, that is in the puppet directory, and add this line parser=future in the master tag.

[master]
... 
...
...
parser=future
...

Installation:

  • Copy the module directory in the modules folder.

Setup

  • Includes in the manifest the module definition include jre_installation or class { 'jre_installation' : }
  • Create and fill the data files: the hierarchy are defined in the heira.yaml in the puppet directory.
  • Put the jre package in the file folder. It should be in tar format

Variables description

It need to define the following variables:

  • persistent_dir: A persistent folder in the agent node
  • tmp_dir: a temporal folder in the agent node.
  • jre_filename: The name of the jre with extesions
  • installation_path: the path where the jre must be installed. E.g: /usr/lib
  • installation_directory: the folder name where the jre must be installed. E.g. jre
  • java_home: the full path of java directory /usr/lib/jre

Example:

jre_filename           : 'jre-7u40-linux-x64.tar.gz'
tmp_dir                : '/tmp'
persistent_dir         : '/var/lib/puppet'
installation_path      : &installation_path '/usr/lib'
installation_directory : &installation_directory 'jre'
java_home              :
 - *installation_path
 - '/'
 - *installation_directory