From e12b34f9e8ad06153ad8ecc3e50114fca7f2bc29 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Tue, 28 Jul 2015 11:25:00 -0300 Subject: [PATCH 01/12] Update init.pp Define timeout (1800s) in wget --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 8ea4cd8..2eeb014 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -143,7 +143,7 @@ exec { 'get_jdk_installer': cwd => $install_dir, creates => "${install_dir}/${installerFilename}", - command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", + command => "wget -c -T 1800 --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", timeout => 600, require => Package['wget'], } From d3f99df65a0b56a830608a7707c650c69f4a6826 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Tue, 28 Jul 2015 13:27:31 -0300 Subject: [PATCH 02/12] Update init.pp Add param for download timeout --- manifests/init.pp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 2eeb014..13662d8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,17 +42,22 @@ # String. Specifies if jdk should be installed or absent # Defaults to installed. # +# [* download_timeout *] +# Integer. Timeout for download (wget) in seconds +# Defaults to 600 seconds. +# class jdk_oracle( - $version = hiera('jdk_oracle::version', '8' ), - $version_update = hiera('jdk_oracle::version_update', 'default' ), - $version_build = hiera('jdk_oracle::version_build', 'default' ), - $install_dir = hiera('jdk_oracle::install_dir', '/opt' ), - $use_cache = hiera('jdk_oracle::use_cache', false ), - $cache_source = 'puppet:///modules/jdk_oracle/', - $platform = hiera('jdk_oracle::platform', 'x64' ), - $jce = hiera('jdk_oracle::jce', false ), - $default_java = hiera('jdk_oracle::default_java', true ), - $ensure = 'installed' + $version = hiera('jdk_oracle::version', '8' ), + $version_update = hiera('jdk_oracle::version_update', 'default' ), + $version_build = hiera('jdk_oracle::version_build', 'default' ), + $install_dir = hiera('jdk_oracle::install_dir', '/opt' ), + $use_cache = hiera('jdk_oracle::use_cache', false ), + $cache_source = 'puppet:///modules/jdk_oracle/', + $platform = hiera('jdk_oracle::platform', 'x64' ), + $jce = hiera('jdk_oracle::jce', false ), + $default_java = hiera('jdk_oracle::default_java', true ), + $ensure = 'installed', + $download_timeout = hiera('jdk_oracle::download_timeout', 600 ), ) { $default_8_update = '11' @@ -143,8 +148,8 @@ exec { 'get_jdk_installer': cwd => $install_dir, creates => "${install_dir}/${installerFilename}", - command => "wget -c -T 1800 --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", - timeout => 600, + command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", + timeout => ${download_timeout}, require => Package['wget'], } From 411a2de2533d6ffe0e7b0da98381422b7e87c062 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Tue, 28 Jul 2015 13:30:53 -0300 Subject: [PATCH 03/12] Update README.md Update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3b5e86a..fe13a1a 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,5 @@ site.pp: * Boolean to indicate if the installed java version is linked as the default java, javac etc... * ensure * Boolean to disable anything from happening (absent/removal not supported yet) +* download_timeout + * Integer Timeout for download (wget) in seconds. Default is 600s From 70cc47225b6b7ea811041bfba0695de8b5ac0b18 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Tue, 28 Jul 2015 16:46:28 -0300 Subject: [PATCH 04/12] Update init.pp Change set download_timeout --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 13662d8..4261ffd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -149,7 +149,7 @@ cwd => $install_dir, creates => "${install_dir}/${installerFilename}", command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", - timeout => ${download_timeout}, + timeout => $download_timeout, require => Package['wget'], } From 036786604937ca484b442e90c1413bc1e0823a14 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Tue, 28 Jul 2015 17:34:26 -0300 Subject: [PATCH 05/12] Update init.pp Defined timeout when cache = true --- manifests/init.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 4261ffd..abf6c27 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,7 +9,7 @@ # Defaults to 8. # # [*version_update*] -# String. Java Version Update to install +# String. Java Version Updatwe to install # Defaults to Defaults based on major version. # # [*version_build*] @@ -289,8 +289,8 @@ exec { 'get_jce_package': cwd => $install_dir, creates => "${install_dir}/${jceFilename}", - command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", - timeout => 600, + command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", + timeout => $download_timeout, require => Package['wget'], } From f01726dd57cb77436b3237a0200f55f5fe156050 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Wed, 29 Jul 2015 09:29:44 -0300 Subject: [PATCH 06/12] Update init.pp Set last update/build for Java 7/8 --- manifests/init.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index abf6c27..29ee440 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -60,10 +60,10 @@ $download_timeout = hiera('jdk_oracle::download_timeout', 600 ), ) { - $default_8_update = '11' - $default_8_build = '12' - $default_7_update = '67' - $default_7_build = '01' + $default_8_update = '51' + $default_8_build = '16' + $default_7_update = '80' + $default_7_build = '15' $default_6_update = '45' $default_6_build = '06' From ab0635592736e636f3987a3449f67a55ad3c71f7 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Wed, 29 Jul 2015 09:30:17 -0300 Subject: [PATCH 07/12] Update init.pp --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 29ee440..eca028b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,7 +9,7 @@ # Defaults to 8. # # [*version_update*] -# String. Java Version Updatwe to install +# String. Java Version Update to install # Defaults to Defaults based on major version. # # [*version_build*] From 4fa0280e5befe7966e49464208d001477b34c7cd Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Thu, 6 Aug 2015 10:39:05 -0300 Subject: [PATCH 08/12] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0c6445..ee62717 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ matrix: gemfile: .gemfile notifications: email: - - travisci@tylerwalts.com + - eurides.baptistella@gmail.com From c570ad03a90ef56d8838225498df1b50b5587106 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Thu, 6 Aug 2015 10:46:20 -0300 Subject: [PATCH 09/12] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ee62717..85b7957 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: ruby rvm: - 1.9.3 - ruby-head +bundler_args: --without development script: - "bundle exec rake lint" - "bundle exec rake spec SPEC_OPTS='--format documentation'" From 0c24a930f29e786d7e0880665aa7609e1a40aa75 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Thu, 6 Aug 2015 11:15:52 -0300 Subject: [PATCH 10/12] Update init.pp --- manifests/init.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index eca028b..afb0648 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,7 +43,7 @@ # Defaults to installed. # # [* download_timeout *] -# Integer. Timeout for download (wget) in seconds +# String. Timeout for download (wget) in seconds # Defaults to 600 seconds. # class jdk_oracle( @@ -57,7 +57,7 @@ $jce = hiera('jdk_oracle::jce', false ), $default_java = hiera('jdk_oracle::default_java', true ), $ensure = 'installed', - $download_timeout = hiera('jdk_oracle::download_timeout', 600 ), + $download_timeout = hiera('jdk_oracle::download_timeout', '600' ), ) { $default_8_update = '51' From 2495acf7ca559d411544b7ad73093953058630e5 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Thu, 6 Aug 2015 11:19:15 -0300 Subject: [PATCH 11/12] Update init.pp --- manifests/init.pp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index afb0648..2952034 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -148,8 +148,7 @@ exec { 'get_jdk_installer': cwd => $install_dir, creates => "${install_dir}/${installerFilename}", - command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", - timeout => $download_timeout, + command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", require => Package['wget'], } @@ -289,8 +288,7 @@ exec { 'get_jce_package': cwd => $install_dir, creates => "${install_dir}/${jceFilename}", - command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", - timeout => $download_timeout, + command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", require => Package['wget'], } From 0f8eb325413ab60a594c4510f84661f7358384d2 Mon Sep 17 00:00:00 2001 From: Eurides Baptistella Date: Thu, 6 Aug 2015 11:21:33 -0300 Subject: [PATCH 12/12] Update init.pp --- manifests/init.pp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 2952034..eca028b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,7 +43,7 @@ # Defaults to installed. # # [* download_timeout *] -# String. Timeout for download (wget) in seconds +# Integer. Timeout for download (wget) in seconds # Defaults to 600 seconds. # class jdk_oracle( @@ -57,7 +57,7 @@ $jce = hiera('jdk_oracle::jce', false ), $default_java = hiera('jdk_oracle::default_java', true ), $ensure = 'installed', - $download_timeout = hiera('jdk_oracle::download_timeout', '600' ), + $download_timeout = hiera('jdk_oracle::download_timeout', 600 ), ) { $default_8_update = '51' @@ -148,7 +148,8 @@ exec { 'get_jdk_installer': cwd => $install_dir, creates => "${install_dir}/${installerFilename}", - command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", + command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${javaDownloadURI}\" -O ${installerFilename}", + timeout => $download_timeout, require => Package['wget'], } @@ -288,7 +289,8 @@ exec { 'get_jce_package': cwd => $install_dir, creates => "${install_dir}/${jceFilename}", - command => "wget -c --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", + command => "wget -c -T ${download_timeout} --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com\" --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"${jceDownloadURI}\" -O ${jceFilename}", + timeout => $download_timeout, require => Package['wget'], }