Giter Site home page Giter Site logo

puppet-jdk_oracle's People

Contributors

bitdeli-chef avatar boorad avatar cinderhaze avatar davehewy avatar dploeger avatar fraenki avatar jrevillard avatar madhusudhanane avatar markslater avatar modestymaster avatar oeudtinsanmie avatar pulquero avatar sharumpe avatar thejoecarroll avatar tstibbs avatar tylerwalts avatar vfoucault avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

puppet-jdk_oracle's Issues

wget timeout

I have problems with time limit on the wget command.
Debug: Executing 'wget -c --no-cookies --no-check-certificate --header "Cookie:
gpw_e24=http%3A%2F%2Fwww.oracle.com" --header "Cookie: oraclelicense=accept-secu
rebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u11-b12/jdk-8u11-
linux-x64.tar.gz" -O jdk-8u11-linux-x64.tar.gz'
Error: Command exceeded timeout
Error: /Stage[main]/Jdk_oracle/Exec[get_jdk_installer]/returns: change from notr
un to 0 failed: Command exceeded timeout

How do I avoid the error?

Travis test failing on Unsupported OS error

Nothing has changed here, but the tests are failing. Found some search results of others having similar issue. It seems to be resolved here:

I tried without success to update the test to work with the latest rspec.

Resolution: It should be fairly obvious when the puppet run fails for unsupported OS versions, so I'm just going to remove the test for failure.

Consider supporting the Oracle RPMs

Hi,
I've forked the module in order to bake in support for the RPM bundles which Oracle is shipping and seem to be more up-to-date than the current tgz bundle. As a side effect I've removed compatibility support for non-rpm OS'es and JDK6 as its not in my requirement scope and I was not quite sure how can I make both tgz and rpm work together without a more extensive puppet refactoring. Use code from here if interested
https://github.com/schrepfler/puppet-jdk_oracle

RHEL 7.3 - Never updates

I have JDK 1.8 update 111 installed already on the server and this module will not upgrade Java to update 131? How can I make it always install the default Java 8 version?

Support alternative paths to update-alternatives

Ubuntu 14.04 LTS comes with update-alternatives installed in /usr/bin/ instead of /usr/sbin/ (which is where is it was in 12.04!), causing your module to fail because of the hard-coded path. Please fix this so your module works with the current version of Ubuntu Server.

Generated url does not work

Hello,
Please tell me if I do smth wrong I tried to define versions/build/package. Generated url is not valid one.
Most simple use -> class { 'jdk_oracle': }

output: (puppet)
Error: Execution of '/usr/bin/curl http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz -o /tmp/jdk-8u121-linux-x64.tar.gz_20171024-2558-1wu6zvy -fsSL --max-redirs 5 --cookie oraclelicense=accept-securebackup-cookie' returned 22: curl: (22) The requested URL returned error: 404 Not Found
Error: /Stage[main]/Jdk_oracle/Jdk_oracle::Install[jdk_oracle]/Archive[/opt/jdk-8u121-linux-x64.tar.gz]/ensure: change from absent to present failed: Execution of '/usr/bin/curl http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz -o /tmp/jdk-8u121-linux-x64.tar.gz_20171024-2558-1wu6zvy -fsSL --max-redirs 5 --cookie oraclelicense=accept-securebackup-cookie' returned 22: curl: (22) The requested URL returned error: 404 Not Found

manually the same -> $ /usr/bin/curl http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz -o /tmp/jdk-8u121-linux-x64.tar.gz_20171024-2558-1wu6zvy -fsSL --max-redirs 5 --cookie oraclelicense=accept-securebackup-cookie
curl: (22) The requested URL returned error: 404 Not Found

Thank you in advance
Best Regards
Atanas

Update README and examples with working Hash values

With PR #79 responding to Oracle's change to the download site to add hashes to the URL, we now all have to be aware of the Oracle hash string (in addition to the build numbers).

This task is to:

  • Update README overview with the reason why
  • Update code examples to include hash values
  • Ensure the hash values are actual values that work, from Oracle site.
    • Start with latest stable versions

Notes:

  • This will change over time, every time Oracle makes a release.
  • Nothing guarantees that Oracle won't re-publish all the artifacts again with some different hashes in the future.

Install with non-root user

looks like there are many changes needed if I want to install at a custom location with non-root user owning the files. This is not really an issue but would like to have a feature request.

ty

Invalid relationship: Exec[get_jdk_installer] { require => Package[wget] }

Hi Tyler,

         Thanks for the great module , i believe this is an issue correct me if i am wrong . I am using tylerwalts-jdk_oracle (v1.2.1) and once i execute this class in my agent, it throws the below error and i had to comment out the "require => Package['wget'],"  in line no 85, to successfully  execute the module. I did this as i know wget was already there in my agent.  I don't find any Package["wget"] resource in the manifests, so either it needs to be added or removed from the require . 

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Exec[get_jdk_installer] { require => Package[wget] }, because Package[wget] doesn't seem to be in the catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

New dependency breaks the builds

As of yesterday there is a new dependency: puppet-archive

The problem with puppet-archive is that it dropped support for ruby 1.8 in version 1.0.0

Which is the version in CentOS 6.

That means that this module effectively dropped support of CentOS 6 as well.

Which is fine, as long as it is documented.

P.S. We have pinned version to 1.5.0 to get around it

Latest version of Java8 has a different URL structure

See this stackoverflow post:
http://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead

The wget command to download jdk-8u121 has this new random string in the URL: e9e7ea248e2c4826b92b3f075a80e441

wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz

8u121 breaks build

Manifest:

  class { 'jdk_oracle':
    package        => 'jre',
    default_java   => true,
    version_build  => '13',
    version_update => '121',
  }

Breaks because of:

Error: Execution of '/usr/bin/curl http://download.oracle.com/otn-pub/java/jdk/8u121-b13/jre-8u121-linux-x64.tar.gz -o /tmp/jre-8u121-linux-x64.tar.gz_20170405-21633-50990y -fsSL --max-redirs 5 --cookie oraclelicense=accept-securebackup-cookie' returned 22: curl: (22) The requested URL returned error: 404 Not Found
Error: /Stage[main]/Jdk_oracle/Jdk_oracle::Install[jdk_oracle]/Archive[/opt/jre-8u121-linux-x64.tar.gz]/ensure: change from absent to present failed: Execution of '/usr/bin/curl http://download.oracle.com/otn-pub/java/jdk/8u121-b13/jre-8u121-linux-x64.tar.gz -o /tmp/jre-8u121-linux-x64.tar.gz_20170405-21633-50990y -fsSL --max-redirs 5 --cookie oraclelicense=accept-securebackup-cookie' returned 22: curl: (22) The requested URL returned error: 404 Not Found

Suggested Fix:
Add the path where it's located

diff --git a/manifests/install.pp b/manifests/install.pp
index 7377d7c..bfc239b 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -53,9 +53,15 @@ define jdk_oracle::install(
         $pkg_name = "${package}-${version}u${version_u}-linux-${plat_filename}.tar.gz"
         # useful to set alternatives priority
         $int_version = "1${version}0${version_u}"
-        $java_download_uri = "${jdk_oracle::download_url}/jdk/${version}u${version_u}-b${version_b}/${pkg_name}"
-        $java_home = "${install_dir}/${package_home}1.${version}.0_${version_u}"
-        $jdc_download_uri = "${jdk_oracle::download_url}/jce/8/jce_policy-8.zip"
+        if ($version_u == '121'){
+          $java_download_uri = "${jdk_oracle::download_url}/jdk/${version}u${version_u}-b${version_b}/e9e7ea248e2c4826b92b3f075a80e441/${pkg_name}"
+          $java_home = "${install_dir}/${package_home}1.${version}.0_${version_u}"
+          $jdc_download_uri = "${jdk_oracle::download_url}/jce/8/jce_policy-8.zip"
+        } else {
+          $java_download_uri = "${jdk_oracle::download_url}/jdk/${version}u${version_u}-b${version_b}/${pkg_name}"
+          $java_home = "${install_dir}/${package_home}1.${version}.0_${version_u}"
+          $jdc_download_uri = "${jdk_oracle::download_url}/jce/8/jce_policy-8.zip"
+        }
       }

Probably worth investigating other repos for the other permutations of build > path.

Need an option to satisfy package manager dependencies

While Java is available etc when installed through, some packages (specifically installed through dpkg, and likely rpm too) may require have their dependency populated with default-jre, default-jre-headless amongst other java packages. This means that when installed, dpkg will resolve this as OpenJDK and therefore can result in both OpenJDK and Oracle JDK.

To solve this (at least for dpkg, I'm not sure about other package managers), we can add a new option (potentially set the default to true) which would do the following:

  • Install the equivs packages (and any dependencies it requires, shouldn't many if there are)
  • Use/generate a custom control file and run equivs on it.
    There's plenty of control files created by others, we can take inspiration from them, or even just copy them (however note, when I had to do this at my old place, these seemed to be outdated a little). Examples:
  • Run equivs on the generated control file.
    This should generate a Debian package.
  • Run dpkg -i {file.deb} to install
  • Clean up
    • Remove equivs if not installed prior to this operation
    • Remove generated Debian package and generated control file

How can I get value of $java_home in my modules?

$::jdk_oracle::java_home
$::jdk_oracle::install::java_home

None provide the value of $java_home, as seen in the install.pp file.

Example:

# a Jaspersoft module which relies on tomcat, which relies on java
tomcat::setenv::entry { 'JAVA_HOME':
  value => $java_home,
}

Suse subclass has variable name diff

This was caught by running lint tests:

manifests/suse.pp - WARNING: top-scope variable being used without an explicit namespace on line 154
manifests/suse.pp - WARNING: top-scope variable being used without an explicit namespace on line 180

There is a variable declared near the top for "java_home_basename" but references are trying to use "java_home_loc_basename", not finding it and trying to look at top scope.

Need to update reference name.

Removal of params in suse.pp breaks jdk_oracle::suse

It looks like the cleanup in 7ac8c41 got rid of the parameter declaration, which breaks jdk_oracle::suse, resulting in:

Invalid parameter version on Class[Jdk_oracle::Suse] at /etc/puppet/environments/production/modules/jdk_oracle/manifests/init.pp:251

unable to update to newer version of java8

I started using this module to install Oracle Java 8 instead of 7 and the first pass was fine. Today, I tried updating to version 66 from 62 and it looks like puppet is installing the newer version but not setting the new version to the system default (it remains 62). It correctly installs version 66 on new nodes that did not have the previous version. Any ideas? Any help would be appreciated.

Here is what I'm using:

class { 'jdk_oracle':

      version        => '8',

      default_java   => true,

      install_dir    => '/usr/lib/jvm',

      version_update => '66',

      version_build  => '17',

      platform       => 'x64',

    }

Missing utilization of RHEL/CentOS 'alternatives' and 'profile.d'

I'd add a branch and just submit our changes but that doesn't seem to be allowed, so I'll just file this as a defect report. At FICO, we're using a modified version of your project that correctly handles RHEL and CentOS alternatives and profile.d management.

ISSUE: Symbolic links are being used on RHEL and CentOS hosts by the jdk_oracle module to manage what the native alternatives solution is already responsible for, leaving alternatives in an inconsistent state. In addition, JAVA_HOME is not being properly set by this module, leaving Java application developers to find their own way to set this important environment variable.

PROPOSED SOLUTION: We've modified the init.pp file thusly:

    # Set links depending on osfamily or operating system fact
    case $::osfamily {
      RedHat, Linux: {
        # Modified by William W. Kimball, Jr. MBA MSIS of Fair Isaac Corporation
        # on 14 AUG 2014 to properly utilize the RedHat alternatives and profile
        # systems.
        $javaBinDir = "${java_home}/bin"
        exec { 'install-java-alternative':
          unless  => "alternatives --display java | grep link | grep -o '${javaBinDir}/java'",
          command => "alternatives --install /usr/bin/java java ${javaBinDir}/java ${version}${version_u}${version_b} --slave /usr/bin/javac javac ${javaBinDir}/javac --slave /usr/bin/jar jar ${javaBinDir}/jar --slave /usr/bin/javadoc javadoc ${javaBinDir}/javadoc --slave /usr/bin/keytool keytool ${javaBinDir}/keytool --slave /usr/bin/orbd orbd ${javaBinDir}/orbd --slave /usr/bin/pack200 pack200 ${javaBinDir}/pack200 --slave /usr/bin/rmid rmid ${javaBinDir}/rmid --slave /usr/bin/rmiregistry rmiregistry ${javaBinDir}/rmiregistry --slave /usr/bin/servertool servertool ${javaBinDir}/servertool --slave /usr/bin/tnameserv tnameserv ${javaBinDir}/tnameserv --slave /usr/bin/unpack200 unpack200 ${javaBinDir}/unpack200 --slave /usr/bin/rmiregistry rmiregistry ${javaBinDir}/rmiregistry",
          require => Exec['extract_jdk'],
        } -> exec { 'set-java-alternative':
          unless  => "alternatives --display java | grep link | grep -o '${javaBinDir}/java'",
          command => "alternatives --set java ${javaBinDir}/java",
        }
        file { '/etc/profile.d/java.sh':
          ensure  => present,
          content => "export JAVA_HOME=${java_home}",
          require => Exec['extract_jdk'],
        }
        file { "${install_dir}/java_home":
          ensure  => link,
          target  => $java_home,
          require => Exec['extract_jdk'],
        }
        file { "${install_dir}/jdk-${version}":
          ensure  => link,
          target  => $java_home,
          require => Exec['extract_jdk'],
        }
      }
      ... etc ...

Please consider adopting our proposed solution or allowing me to branch/commit the changes to your repository. Thank you very much for providing this module; it has proven to be very useful for our environments!

Abandonware?

Since the master branch is 19 commits behind (and some of those include important bug fixes), and there is no response to #36, I'm contemplating forking and releasing this on my own in order to let people access those bug fixes.

Let me know if this is a problem and I'll hold off.

Option to create symlink

It would be nice to have the option to create a symlink to the specific version of java installed

ie. /opt/jdk-6 -> /opt/jdk1.6.0_45

Tag a release

Running your module from the forge site results in a lot of errors that aren't in the master, as there have been a lot of bugfixes, particularly in relation to Ubuntu.

Please tag a new release when you get a chance.

Unknown function hiera

I get the following exception. As I am new to Puppet I am not exactly sure what is going on. Its happening when I add include jdk_oracle to my puppet script so it must be something with puppet-jdk_oracle...

==> default: debug: importing '/tmp/vagrant-puppet/modules-d209e7929ea56e9154d59552ff29e2a2/jdk_oracle/manifests/init.pp' in environment production
==> default: debug: Automatically imported jdk_oracle from jdk_oracle into production
==> default: Unknown function hiera at /tmp/vagrant-puppet/modules-d209e7929ea56e9154d59552ff29e2a2/jdk_oracle/manifests/init.pp:53 on node 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.