Giter Club home page Giter Club logo

Comments (7)

ChrisLundquist avatar ChrisLundquist commented on July 22, 2024

@sfiggins I don't suppose you are familiar with bats tests? https://github.com/sstephenson/bats

Test Kitchen 1.0 / Jamie has that plugin and might make it easy to test, though it would depend on attribute data in .kitchen.yml

from chef-logstash.

ChrisLundquist avatar ChrisLundquist commented on July 22, 2024

Ack I was distracted and missed the ask. If you could whip up a quick bats tests, that would be really helpful!

My best guess is you're looking at something like

@test "when the kibana attributes are set, it should install in that directory" {
  [ -d "/opt/kibana/foo" ]
}

from chef-logstash.

ChrisLundquist avatar ChrisLundquist commented on July 22, 2024

@sfiggins I have been considering switching our kibana integration out for Berkshelf + https://github.com/jbrook/chef-kibana-ruby. Does that implementation get you any further?

from chef-logstash.

ChrisLundquist avatar ChrisLundquist commented on July 22, 2024

Also, for agents, I highly suggest https://github.com/hectcastro/chef-lumberjack, based on https://docs.google.com/spreadsheet/ccc?key=0Aq9liCTsAyzRdDFEcUp2bjJPMTQzU1ZVTndTVzFwV3c#gid=0

from https://twitter.com/jordansissel/status/302294195945738240

from chef-logstash.

sfiggins avatar sfiggins commented on July 22, 2024

I haven't ever used bats. I'm not sure that's what I would want to test in bats though. When the kibana attributes are set it does install in the directory I set. I actually routed around the problem by setting defaults for the kibana directories in my role. (I had to set both ['logstash']['kibana']['basedir'] and ['logstash']['kibana']['home'] )

My expectation was that I would not have to set them if I wanted them to go under my logstash basedir. But when I set ['logstash']['basedir'] in my role defaults or overrides that setting wasn't reflected in kibana's directory attributes.

Somehow I would want to test "if you set ['logstash']['basedir'] in a role or recipe to something other than "/opt/logstash" and do not explicitly set the kibana directories, then kibana should install under the final value of ['logstash']['basedir']/kibana" instead of /opt/logstash/kibana"

My guess is the problem occurs because kibana's directory attributes are set off of the node['logstash']['basedir'] before role or recipe ['logstash']['basedir'] settings have been applied. That may be a chef error, or maybe an error in my expectation that the node value will reflect all these other settings when evaluated instead of just cookbook attribute default values.

from chef-logstash.

bryanwb avatar bryanwb commented on July 22, 2024

Hey Stephen,

I believe this is a chef issue and chef 11 should fix it

On Tue, Feb 19, 2013 at 6:42 PM, Stephen Figgins
[email protected]:

I haven't ever used bats. I'm not sure that's what I would want to test in
bats though. When the kibana attributes are set it does install in the
directory I set. I actually routed around the problem by setting defaults
for the kibana directories in my role. (I had to set both
['logstash']['kibana']['basedir'] and ['logstash']['kibana']['home'] )

My expectation was that I would not have to set them if I wanted them
to go under my logstash basedir. But when I set ['logstash']['basedir'] in
my role defaults or overrides that setting wasn't reflected in kibana's
directory attributes.

Somehow I would want to test "if you set ['logstash']['basedir'] in a role
or recipe to something other than "/opt/logstash" and do not explicitly set
the kibana directories, then kibana should install under the final value of
['logstash']['basedir']/kibana" instead of /opt/logstash/kibana"

My guess is the problem occurs because kibana's directory attributes are
set off of the node['logstash']['basedir'] before role or recipe
['logstash']['basedir'] settings have been applied. That may be a chef
error, or maybe an error in my expectation that the node value will reflect
all these other settings when evaluated instead of just cookbook attribute
default values.


Reply to this email directly or view it on GitHubhttps://github.com//issues/75#issuecomment-13786257.

from chef-logstash.

lusis avatar lusis commented on July 22, 2024

closing this as we've removed kibana.

from chef-logstash.

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.