GithubHelp home page GithubHelp logo

Comments (15)

electrical avatar electrical commented on July 20, 2024

Thank you for using the puppet module and your full report.
With this puppet module by default i assume elasticsearch is available via some repository.
When that's not possible for some reason you can supply the .deb. or .rpm package via 'pkg_source' variable option; for example:

class { 'elasticsearch':
  pkg_source => 'puppet:///path/to/elasticsearch-0.90.2.deb'
}

Hope this makes it more clearer for you?

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

Thanks, that really helps a lot!

Can I also point to some URL (e.g. the official elasticsearch download location)?

from puppet-elasticsearch.

electrical avatar electrical commented on July 20, 2024

I'm afraid an URL won't work, its a possible feature though but think it will barely be used.
You can best put the package in the vagrant dir and use that.

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

Ok, thanks for your help. Maybe you should also add the above option as example to the README?

from puppet-elasticsearch.

electrical avatar electrical commented on July 20, 2024

Good point :-) will put it on my todo list. Thanks.

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

Sorry, it's still not quite working.

I've put the file under vagrant/modules/elasticsearch/files/elasticsearch-0.90.2.deb and configured your module like

class { 'elasticsearch' :
  pkg_source => 'puppet:///modules/elasticsearch/files/elasticsearch-0.90.2.deb'
}

The error then is

err: /Stage[main]/Elasticsearch::Package/File[/tmp/elasticsearch-0.90.2.deb]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/elasticsearch/files/elasticsearch-0.90.2.deb at /tmp/vagrant-puppet/modules-0/elasticsearch/manifests/package.pp:65

What's wrong?

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

I also found this link where they suggest to create an empty lib directory in any puppet module. So i created vagrant/modules/elasticsearch/lib but no difference. Still get the same error message.

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

Ok, after learning more about puppets file serving i changed the configuration to:

class { 'elasticsearch' :
  pkg_source => 'puppet:///modules/elasticsearch/elasticsearch-0.90.2.deb'
}

Note the missing files. Now it almost works. I get another error that the service could not be started. But i'll open another issue, as this is not related to installation anymore.

Sorry for the noise :)

from puppet-elasticsearch.

mikehaertl avatar mikehaertl commented on July 20, 2024

It finally works. I had to install java. So i downloaded the java module from here and added

class { 'java': }
class { 'elasticsearch' :
  pkg_source => 'puppet:///modules/elasticsearch/elasticsearch-0.90.2.deb'
}

to my puppet config. I'm not sure if this is the right way, but at least it works.

@electrical
If you think I could improve that setup i'm happy to hear about it. :)

from puppet-elasticsearch.

electrical avatar electrical commented on July 20, 2024

Hi, that can work fine yeah.
In the module it self i also provide a way to install java ( not completely documented yet )
But using an other module is usually better :-)

Glad its working now.

from puppet-elasticsearch.

yonromai avatar yonromai commented on July 20, 2024

I had the same problem on ubuntu 12.04. Worked like a charm!
Thanks a ton mike!

from puppet-elasticsearch.

philfreo avatar philfreo commented on July 20, 2024

So what's the recommended approach in Puppet to get the elasticsearch-0.90.3.deb file downloaded locally from wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.3.deb so that it can be installed? Rather than checking the a 17MB file into the puppetmaster config source control repo.

from puppet-elasticsearch.

philfreo avatar philfreo commented on July 20, 2024

In case this helps somebody else, here's how I installed ElasticSearch 0.90.3 on Ubuntu 12.04 LTS with Puppet + this module:

class our_elasticsearch($version='0.90.3') {

  # We couldn't simply rely on the 'elasticsearch' module from:
  # https://github.com/elasticsearch/puppet-elasticsearch because it requires your desired
  # version to be in your package manager, but ours isn't.

  exec { "download_elasticsearch":
    command => "/usr/bin/wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${version}.deb -O /tmp/elasticsearch-${version}.deb",
    creates => "/tmp/elasticsearch-${version}.deb"
  }

  package { 'openjdk-7-jre-headless': ensure => present }

  class { 'elasticsearch':
    pkg_source  => "/tmp/elasticsearch-${version}.deb",
    require     => [ Package['openjdk-6-jre-headless'], Exec['download_elasticsearch'] ],
    autoupgrade => true,
  }

}

from puppet-elasticsearch.

eddiejaoude avatar eddiejaoude commented on July 20, 2024

Thanks @philfreo

from puppet-elasticsearch.

electrical avatar electrical commented on July 20, 2024

@eddiejaoude @philfreo im working on a re-write of the module which will provide different ways of getting the package installed.
It will contain the following options:
repository install ( default ) http, https, ftp downloads. puppet:// file resource or file: ( localfile ) resource )

Hope this will help in future deployments.

from puppet-elasticsearch.

Related Issues (20)

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.