Compare commits

...

11 Commits
0.0.1 ... 0.1.2

Author SHA1 Message Date
Jeff McCune
d93930d6e3 Update CHANGELOG to 0.1.2 2011-05-26 11:31:33 -07:00
Jeff McCune
b3eb1642ae Merge branch 'comment/master/jre_vs_jdk'
* comment/master/jre_vs_jdk:
  Change jre and jdk booleans to a single string
2011-05-26 11:31:23 -07:00
Jeff McCune
867f8c524a Change jre and jdk booleans to a single string
Dan raised the comment in the previous patch set that it doesn't make
sense to provide two options and four states when there are really only
two possibilities; install the jre or the jdk.

This change removes the jdk and jre class parameters and replaces them
with a single distribution parameters.
2011-05-26 11:29:17 -07:00
Jeff McCune
292503aaf1 Re-version from 1.0.1 to 0.1.1 for semver 2011-05-25 16:31:09 -07:00
Jeff McCune
ef09ed0545 Update CHANGELOG for 1.0.1 2011-05-25 16:09:58 -07:00
Jeff McCune
ac7cdf8cce Merge branch 'feature/master/XXXX_validation'
* feature/master/XXXX_validation:
  Fixup validation for Puppet 2.6.8
  Add basic validation to class parameters
2011-05-25 16:09:31 -07:00
Jeff McCune
993b2e5e4c Fixup validation for Puppet 2.6.8
Anonymous arrays and comparing booleans does not work in 2.6.8 like they
do in master.  In 2.6.8 we cannot compare a true / false variable to a
string inside of Ruby without forcing the function argument to be a
string.
2011-05-25 16:07:10 -07:00
Jeff McCune
5bcc4df0c3 Add basic validation to class parameters 2011-05-25 13:46:10 -07:00
Jeff McCune
85a4f8fb1f Update CHANGELOG for 1.0.0 release 2011-05-24 14:10:13 -07:00
Jeff McCune
46fc64b641 Add JDK 1.6.0_25 as the default package
This adds a new java::jdk_package class and makes
the wrapper class default to this Java runtime.
2011-05-24 14:09:56 -07:00
Jeff McCune
dddbad11a9 Add .DS_Store to gitignore 2011-05-24 13:31:38 -07:00
7 changed files with 84 additions and 9 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
pkg/ pkg/
.DS_Store

View File

@@ -1,2 +1,14 @@
2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2
* Changes JRE/JDK selection class parameter to $distribution
2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1
* Re-did versioning to follow semantic versioning
2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 1.0.1
* Add validation of class parameters
2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 1.0.0
* Default to JDK version 6u25
2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1
* Initial release * Initial release

View File

@@ -1,5 +1,5 @@
name 'puppetlabs-java' name 'puppetlabs-java'
version '0.0.1' version '0.1.2'
source 'git://github.com/puppetlabs/puppetlabs-java' source 'git://github.com/puppetlabs/puppetlabs-java'
author 'puppetlabs' author 'puppetlabs'
license 'Apache' license 'Apache'
@@ -8,4 +8,4 @@ description 'Manage the official Java runtime'
project_page 'https://github.com/puppetlabs/puppetlabs-java' project_page 'https://github.com/puppetlabs/puppetlabs-java'
## Add dependencies, if any: ## Add dependencies, if any:
dependency 'puppetlabs/stdlib', '>= 0.1.2' dependency 'puppetlabs/stdlib', '>= 0.1.3'

View File

@@ -4,3 +4,13 @@ Manage the Java runtime for use with other application software.
Currently this simply deploys the package on Enterprise Linux based systems. Currently this simply deploys the package on Enterprise Linux based systems.
The Java runtime this module is designed to configure are the RPM's provided by Oracle and obtained by extracting them from the "bin" installers.
For example:
./jdk-6u25-linux-x64-rpm.bin -x
Please download the installer from:
* [Java Downloads](http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html)

View File

@@ -12,14 +12,32 @@
# #
# [Remember: No empty lines between comments and class definition] # [Remember: No empty lines between comments and class definition]
class java( class java(
$version='1.6.0_25-fcs' $distribution = 'jdk',
$version = 'installed'
) { ) {
$version_real = $version # Cannot pass anonymous arrays to functions in 2.6.8
$v_distribution = [ '^jre$', '^jdk$' ]
# Must compare string values, not booleans.
validate_re($version, '^[._0-9a-zA-Z:-]+$')
validate_re($distribution, $v_distribution)
class { 'java::jre_package': $version_real = $version
version => $version_real, $distribution_real = $distribution
stage => 'runtime',
case $distribution_real {
jre: {
class { 'java::jre_package':
version => $version_real,
stage => 'runtime',
}
}
jdk: {
class { 'java::jdk_package':
version => $version_real,
stage => 'runtime',
}
}
} }
} }

29
manifests/jdk_package.pp Normal file
View File

@@ -0,0 +1,29 @@
# Class: java:jdk_package
#
# This class installs the Java JDK package
# produced from ./jdk-6u25-linux-x64-rpm.bin -x
#
# This is the "Official" RPM distributed by Oracle
#
# Parameters:
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
class java::jdk_package (
$version
) {
validate_re($version, '^[._0-9a-zA-Z:-]+$')
$version_real = $version
package { 'jdk':
ensure => $version_real,
alias => 'java',
}
}

View File

@@ -11,11 +11,16 @@
# Sample Usage: # Sample Usage:
# #
class java::jre_package ( class java::jre_package (
$version='1.6.0_25-fcs' $version
) { ) {
# statements
validate_re($version, '^[._0-9a-zA-Z:-]+$')
$version_real = $version
package { 'jre': package { 'jre':
ensure => $version_real, ensure => $version_real,
alias => 'java', alias => 'java',
} }
} }