Comments (7)
@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.
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.
@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.
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.
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.
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.
closing this as we've removed kibana.
from chef-logstash.
Related Issues (20)
- Unable to install logstash 2.3.2 getting plugin install errors HOT 1
- Problem in Amazon OpsWorks with Ubuntu 16.04 HOT 1
- Support JAVA_STACK variable
- Logstash 2.3.4, 2.3.3 service fails HOT 9
- LWRP "version" property is being ignored HOT 1
- Recipe fails with No resource or method named `logstash_instance' error
- Deprecated? HOT 2
- Version 0.13.0 fails on Chef 12 due to version declaration HOT 3
- failing on linux_user
- plugin guard not working HOT 3
- config not working HOT 1
- Switch to strings for hash keys instead of symbols
- tarball plugin install error minitar HOT 1
- Restart Server only on config change
- logrotate config has invalid path of just "*.log"
- specify init choice for service? HOT 4
- "agent" is not a valid parameter to Logstash anymore HOT 2
- Boolean properties are overriden by default values when set to false HOT 15
- chef/mixin/language incompatible with Chef 14 HOT 3
- logstash_instance fails when installing from source
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-logstash.