From ae4899f9b028fbb7c46781caf38bc8bdd927fb0f Mon Sep 17 00:00:00 2001 From: Jacob Dearing Date: Thu, 15 Oct 2015 12:50:06 -0500 Subject: [PATCH 1/3] update demon cookbook to handle log permissions --- test/cookbooks/ellktest/recipes/default.rb | 11 +++++++++++ test/integration/data_bags/secrets/logstash.json | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/test/cookbooks/ellktest/recipes/default.rb b/test/cookbooks/ellktest/recipes/default.rb index 53a2cef..1d95988 100644 --- a/test/cookbooks/ellktest/recipes/default.rb +++ b/test/cookbooks/ellktest/recipes/default.rb @@ -46,10 +46,12 @@ logstash_key = Base64.decode64(secrets['key']) file '/tmp/logstash.key' do content logstash_key + sensitive true end logstash_crt = Base64.decode64(secrets['certificate']) file '/tmp/logstash.crt' do content logstash_crt + sensitive true end # install ELASTICSEARCH 1.7.1 instead of the default of 1.7.0 @@ -98,6 +100,15 @@ } } +logs.each do |conf| + conf['paths'].each do |log| + file log do + group 'logstash' + ignore_failure true + end + end +end + ## Install the forwarder and configure it to ship everything in logs up to this point. logstash_forwarder 'default' do crt_location '/tmp/logstash.crt' diff --git a/test/integration/data_bags/secrets/logstash.json b/test/integration/data_bags/secrets/logstash.json index 577f79c..3c91816 100755 --- a/test/integration/data_bags/secrets/logstash.json +++ b/test/integration/data_bags/secrets/logstash.json @@ -1,5 +1,5 @@ { "id": "logstash", - "certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1VENDQWMyZ0F3SUJB\nZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFVTVJJd0VBWURWUVFEREFsc2Iy\nTmgKYkdodmMzUXdIaGNOTVRVd09EQTNNakl4TURVMFdoY05NVFV3T0RBM01q\nTXhNRFUwV2pBVU1SSXdFQVlEVlFRRApEQWxzYjJOaGJHaHZjM1F3Z2dFaU1B\nMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRREtwaGY2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\nSkcvL2JralVVdW5GYUFVSgoxYUtnL0hwTmVISm9GLzdOaFRVeWo5WTdhUXBQ\nRGU3QU1kWUlsczFFcXVZQXpkclV2SWVwSkczOTkvSHRWbU05Ck1OZTc1WXZk\nemEzWUJIbmtXc0NFazY2YTlheWw1V3FnMUVaTnRua0NnWUIrTitQbEUwdFEw\nZy9ZaWxGVzM0cW0KZFBQYVo1VDBMWmMvazFxNHlIZUExV1I5SjVyTUxRbjda\nMnlkSk00QVBsRkswSFB3Y0JTUFB3aVRXVk1RY2JXYgpqQWJHV1k0THQzZ2N6\nRDNzYXpISHN1N3VqWDNlVXhoZ0lQRXZqcE9mdDJpZE83VktrSXpiQVVHUGtm\nT1R2UEdBCk9USTRSNFBpeW5CdmdXb0RDUUlPc1FLQmdBTW5vOXNEL1lCZ3RT\naUFoNnhBV2ltZUx5MjNKQWlJdWpzNXMwZy8KK1htNTN0eWlMVDZsME1VZEdi\nQ0crUVg4amwwNkw4WE5wd2RWU211YW1UMUN4Yi9VZE9WSW5LRUNMUFZTSE1q\neQo3aUxlWnE3Tm5kZThKMWlHY09lSjd1ZVpoYjZ4VU82NXBIS0JTM1FzejJh\nTFFYK0V3T1BTcE8wNUNWNXAxUUovCnZvWXBBb0dCQUpUcXNPcGRSZ1JrMEhK\ncVNsWmtYdFdkS2hsc2lqZGYrYU1LdWVhaUtBOGRiTUZnV25KWHNudjEKZlhr\nSW1MZktvdW5QZWJMRGQwNnJJaGIvMy9PWFpsZUpkeHNWaUVabW9FRURBdjF1\nNE5sNlpwU2NwS24rQmJZSQp5akJoWjVrUzIyR0tnT29RQVhiMjYwZGhzc21n\nV2VsZnpTdGlSUno2Q0x1Nk5oTjdPVWY2Ci0tLS0tRU5EIFJTQSBQUklWQVRF\nIEtFWS0tLS0tCg==\n" } \ No newline at end of file From d09b41c33b935de72d8fea812fb1a0022c4924c3 Mon Sep 17 00:00:00 2001 From: Jacob Dearing Date: Thu, 15 Oct 2015 12:50:36 -0500 Subject: [PATCH 2/3] update cookbook version and remove runit pinning --- Berksfile | 3 ++- README.md | 4 ++++ metadata.rb | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Berksfile b/Berksfile index b42da70..c57764f 100644 --- a/Berksfile +++ b/Berksfile @@ -2,7 +2,8 @@ source 'https://supermarket.chef.io' metadata +cookbook 'runit', '~> 1.7.4' + group :integration do cookbook 'ellktest', path: './test/cookbooks/ellktest' - cookbook 'runit' end diff --git a/README.md b/README.md index 406e444..c54e73a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Published - [releases] - [supermarket] +A note on RUNIT +--------------- +Runit has gone through some design changes and the releases between 1.5.18 and 1.7 would create inconsistent responses when polling the state of a service. In order to prevent this from breaking integration tests and create false problems for consumers, I pinned this cookbook to v1.5.18. Since v0.3.5 I have released this pinning and advice the consumer to decide which version of runit they want to run. + About ------------ This cookbook provides a modern Chef approach to installing and configuring the four [elastic] products that make up an ELK stack with the company's binary artifacts. Using [ark] to fetch those remote artifacts and [runit] to handle the service allows us to side step the nuanced vulgarity of competing package managers, driving down the complexity of this cookbook. This means faster updates, less angles for bugs and a guard against feature creep. So the flexibity is that this library won't be upset if you don't use the whole stack or any combination within. Call what you need, configure how you like and get back to [#chefops], your way. diff --git a/metadata.rb b/metadata.rb index 14c812b..e1c7218 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,11 +4,11 @@ license 'MIT' description 'Library to handle Elasticsearch, Logstash, Logstash-Forwarder & Kibana' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.3.4' +version '0.3.5' %w(ubuntu debian centos redhat amazon scientific oracle enterpriseenterprise).each do |os| supports os end depends 'ark' -depends 'runit', '= 1.5.18' +depends 'runit' From a754fbce3982e27728db5fd9a6301422f18498cf Mon Sep 17 00:00:00 2001 From: Jacob Dearing Date: Thu, 15 Oct 2015 12:51:26 -0500 Subject: [PATCH 3/3] update changelog for v0.3.5 --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8338459..f1ab3b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # ELLK changelog - -## [unreleased] +## [v0.3.5] #### Changed +- update ellktest demo cookbook for permission handling of logs +- removed pinning of runit 1.5.18 - [mohitsethi] added elasticsearch plugin support - added Thorfile with certificate helpers @@ -26,7 +27,7 @@ ## [v0.3.1] #### Submission for feedback -[unreleased]: https://github.com/dearing/ellk/compare/v0.3.4...HEAD +[v0.3.5]: https://github.com/dearing/ellk/compare/v0.3.4...v0.3.5 [v0.3.4]: https://github.com/dearing/ellk/compare/v0.3.3...v0.3.4 [v0.3.3]: https://github.com/dearing/ellk/compare/v0.3.2...v0.3.3 [v0.3.2]: https://github.com/dearing/ellk/compare/v0.3.1...v0.3.2