New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding node['java']['tarball'] #172

Closed
kevinmeredith opened this Issue Apr 23, 2014 · 6 comments

Comments

Projects
None yet
4 participants
@kevinmeredith

kevinmeredith commented Apr 23, 2014

Reading the docs:

* `node['java']['tarball']` - Name of the tarball to retrieve from your 
internal repository, default `jdk1.6.0_29_i386.tar.gz

I'm confused as to the "internal repository" part. How would I set this attribute if I wanted to use:

* c:\users\Kevin\Downloads\jdk-7u55-linux-x64.gz?

@kevinmeredith kevinmeredith changed the title from Understanding ` to Understanding `node['java']['tarball'] Apr 23, 2014

@kevinmeredith kevinmeredith changed the title from Understanding `node['java']['tarball'] to Understanding `node['java']['tarball']` Apr 23, 2014

@kevinmeredith kevinmeredith changed the title from Understanding `node['java']['tarball']` to Understanding node['java']['tarball'] Apr 23, 2014

@kowal

This comment has been minimized.

kowal commented Apr 24, 2014

I think the docs are outdated. There are no node['java']['tarball'] usage anywhere in the code. There is however node['java']['jdk']['6'][arch]['url'] which ends up being tarball url (not name).

@damacus

This comment has been minimized.

Member

damacus commented Apr 24, 2014

@kman007us we use a wrapper cookbook that specifies the following:

node.override[:java][:jdk_version] = '7'
node.override[:java][:install_flavor] = 'oracle'

node.default['java']['jdk']['7']['x86_64']['url'] = 'http://some-awesome-artifact-repo/jdk-7u51-linux-x64.tar.gz'
node.default['java']['jdk']['7']['x86_64']['checksum'] = 'check-sum-i-got-from-the-file' (sha256sum)

@kevinmeredith

This comment has been minimized.

kevinmeredith commented Apr 24, 2014

Hi @damacus.

I updated my test-kitchen .kitchen.yml attributes per @kowal's post - #166 (comment) to retrieve the tarball from a file:

      'java': {
        'jdk_version': '7',
        'install_flavor': 'oracle',
        'jdk': {
          '7': {
            'x86_64': {
              'url': 'file:///C:/Users/Kevin/jdk-7u55-linux-x64.tar.gz'
            }
          }
        }
      },

Chrome recognizes that file if I copy/paste it into the browser.

However, provisioning gives me this error.

[2014-04-24T14:13:13+00:00] ERROR: java_ark[jdk] (java::oracle line 53) had an error: Errno::ENOENT: remote_file[/tmp/kitchen/cache/jdk-7u55-linux-x64.tar.gz] (/tmp/kitchen/cookbooks/java/providers/ark.rb line 123) had an error: Errno
::ENOENT: No such file or directory - /C:/Users/Kevin/jdk-7u55-linux-x64.tar.gz
[2014-04-24T14:13:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@damacus

This comment has been minimized.

Member

damacus commented Apr 24, 2014

You'll need to put the file on an actual artifact repo (Nexus/Atrifactory) that you can access via curl as that's how the Java cookbook get the file (take a look at the arc resource)

@kevinmeredith

This comment has been minimized.

kevinmeredith commented Apr 25, 2014

Thanks, @damacus.

As an aside, when I set my tarball url to : http://path/to/file/jdk-7u55-linux.x64.gz,

I got an error:

[2014-04-24T18:42:17+00:00] ERROR: Option url's value http://path/to/file/jdk-7u55-linux-x64.gz does not match regular expression /^(file|https?):\/\/.*(tar.gz|tgz|bin|zip)$/

From this ark error message, I need to use a .tar.gz file that has https. I'm curious why HTTP isn't allowed.

@carmstrong

This comment has been minimized.

Contributor

carmstrong commented Apr 28, 2014

@kman007us That was likely an oversight when it was written (I wasn't the author, so I'm not sure). I'd be okay with merging a pull request if you feel like making the change (and adding appropriate tests)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment