From 37368f43d0224eeca6272f37fabbd19bf52252e8 Mon Sep 17 00:00:00 2001 From: Virender Khatri Date: Fri, 12 Oct 2018 16:07:52 +0530 Subject: [PATCH 1/2] #148 Updated cookbook and bug fixes --- .kitchen.dokken.yml | 21 ++---- .kitchen.yml | 27 +++---- .travis.yml | 2 - CHANGELOG.md | 18 +++++ README.md | 43 +++++++++-- libraries/helper.rb | 115 ++++++++++++++++-------------- resources/config.rb | 8 ++- resources/install.rb | 6 +- resources/install_preview.rb | 8 ++- resources/prospector.rb | 32 ++++++--- resources/runit_service.rb | 12 ++-- resources/service.rb | 20 +++--- spec/unit/recipes/default_spec.rb | 12 ++-- test/smoke/v5/default.rb | 35 --------- test/smoke/v6/default.rb | 2 +- 15 files changed, 197 insertions(+), 164 deletions(-) delete mode 100644 test/smoke/v5/default.rb diff --git a/.kitchen.dokken.yml b/.kitchen.dokken.yml index d8db3d4..4d1a257 100644 --- a/.kitchen.dokken.yml +++ b/.kitchen.dokken.yml @@ -90,18 +90,9 @@ platforms: - RUN yum install -y net-tools initscripts suites: - - name: chef12 - driver: - chef_version: 12.22.5 - verifier: - inspec_tests: - - test/smoke/v6 - run_list: - - recipe[filebeat_test::defaultv6] - - name: chef13 driver: - chef_version: 13.9.4 + chef_version: 13.11.3 verifier: inspec_tests: - test/smoke/v6 @@ -110,24 +101,24 @@ suites: - name: chef14 driver: - chef_version: 14.2.0 + chef_version: 14.5.33 verifier: inspec_tests: - test/smoke/v6 run_list: - recipe[filebeat_test::defaultv6] - - name: chef13runit + - name: chef14runit driver: - chef_version: 13.9.4 + chef_version: 14.5.33 verifier: inspec_tests: - test/smoke/v6runit run_list: - recipe[filebeat_test::defaultv6runit] - - name: chef13-preview + - name: chef14preview driver: - chef_version: 13.9.4 + chef_version: 14.5.33 run_list: - recipe[filebeat_test::defaultv6preview] diff --git a/.kitchen.yml b/.kitchen.yml index 7cddc4f..2805296 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -36,20 +36,9 @@ platforms: platform: windows suites: - - name: chef12 - driver: - require_chef_omnibus: 12.22.5 - verifier: - inspec_tests: - - test/smoke/v6 - excludes: - - windows-2012R2 - run_list: - - recipe[filebeat_test::defaultv6] - - name: chef13 driver: - require_chef_omnibus: 13.9.4 + require_chef_omnibus: 13.11.3 verifier: inspec_tests: - test/smoke/v6 @@ -60,7 +49,7 @@ suites: - name: chef14 driver: - require_chef_omnibus: 14.2.0 + require_chef_omnibus: 14.5.33 verifier: inspec_tests: - test/smoke/v6 @@ -69,9 +58,9 @@ suites: run_list: - recipe[filebeat_test::defaultv6] - - name: chef13win + - name: chef14win driver: - require_chef_omnibus: 13.9.4 + require_chef_omnibus: 14.5.33 verifier: inspec_tests: - test/smoke/v6windows @@ -80,17 +69,17 @@ suites: includes: - windows-2012R2 - - name: chef13runit + - name: chef14runit driver: - require_chef_omnibus: 13.9.4 + require_chef_omnibus: 14.5.33 excludes: - windows-2012R2 run_list: - recipe[filebeat::default] - - name: chef13preview + - name: chef14preview driver: - chef_version: 13.9.4 + require_chef_omnibus: 14.5.33 verifier: inspec_tests: - test/smoke/v6 diff --git a/.travis.yml b/.travis.yml index b168b0d..7146e63 100755 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,6 @@ env: - INSTANCE=chef13-fedora26 - INSTANCE=chef13-ubuntu14 - INSTANCE=chef13-ubuntu16 - - INSTANCE=chef13-debian8 - - INSTANCE=chef13-debian9 - INSTANCE=chef13-amazon - INSTANCE=chef13-amazon2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f62f79..be4e154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,24 @@ filebeat CHANGELOG ================== +2.2.0 +----- + +- Luke Waite - Correct default file path for `filebeat_config` lwrp + +- Piotr Kantyka - Updated logging.files path config only when empty + +- Virender Khatri - Updated filebeat version to v6.4.2 + +- Virender Khatri - Updated Kitchen Test for recent Chef Version + +- Virender Khatri - Removed v5 / Chef12 configuration references + +- Virender Khatri - Rename helper method purge_prospectors_dir to purge_prospectors_config in favor of filebeat_service resource + +- Virender Khatri - Wrapped helper methods into a module Filebeat::Helpers + + 2.1.0 ----- diff --git a/README.md b/README.md index 053f957..3e4f41a 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,8 @@ Also works on Solaris zones given a physical Solaris 11.2 server. For that, use - `filebeat_service` - filebeat service resource +- `filebeat_runit_service` - filebeat service resource using runit + - `filebeat_prospector` - filebeat prospector resource @@ -146,12 +148,10 @@ end - *filebeat_install_resource_name* (optional, String) - default `default`, filebeat_install/filebeat_install_preview resource name, set this attribute if LWRP resource name is other than `default` - *service_name* (optional, String) - default `filebeat`, filebeat service name, must be common across resources - *disable_service* (optional, Boolean) - default `false`, set to `true`, to disable filebeat service -- *notify_restart* (optional, Boolean) - default `true`, set to `false`, to ignore filebeat service restart notify - *purge_prospectors_dir* (optional, Boolean) - default `false`, set to `true`, to purge prospectors -- *runit_filebeat_cmd_options* (optional, Boolean) - default `''`, set to `true`, runit filebeat service command line options -- *ignore_failure* (optional, Boolean) - default `false`, set to `true`, to ignore filebeat service failures -- *retries* (optional, Integer) - default `2`, filebeat service resource attribute -- *retry_delay* (optional, Integer) - default `0`, filebeat service resource attribute +- *service_ignore_failure* (optional, Boolean) - default `false`, set to `true`, to ignore filebeat service failures +- *service_retries* (optional, Integer) - default `2`, filebeat service resource attribute +- *service_retry_delay* (optional, Integer) - default `0`, filebeat service resource attribute ## LWRP filebeat_config @@ -204,7 +204,7 @@ filebeat.config_dir: "/etc/filebeat/conf.d" - *action* (optional) - default `:create`, options: :create, :delete - *filebeat_install_resource_name* (optional, String) - default `default`, filebeat_install/filebeat_install_preview resource name, set this attribute if LWRP resource name is other than `default` - *config* (Hash) - default `{}` filebeat configuration options -- *sensitive* (optional, Boolean) - default `false`, filebeat configuration file chef resource attribute +- *config_sensitive* (optional, Boolean) - default `false`, filebeat configuration file chef resource attribute - *service_name* (optional, String) - default `filebeat`, filebeat service name, must be common across resources - *conf_file* (optional, String, NilClass) - default `nil`, filebeat configuration file, this attribute is derived by helper method - *disable_service* (optional, Boolean) - default `false`, set to `true`, to disable filebeat service @@ -250,17 +250,46 @@ filebeat: - *action* (optional) - default `:create`, options: :create, :delete - *filebeat_install_resource_name* (optional, String) - default `default`, filebeat_install/filebeat_install_preview resource name, set this attribute if LWRP resource name is other than `default` - *config* (Hash) - default `{}` filebeat configuration options -- *sensitive* (optional, Boolean) - default `false`, filebeat configuration file chef resource attribute +- *config_sensitive* (optional, Boolean) - default `false`, filebeat configuration file chef resource attribute - *service_name* (optional, String) - default `filebeat`, filebeat service name, must be common across resources - *disable_service* (optional, Boolean) - default `false`, set to `true`, to disable filebeat service - *notify_restart* (optional, Boolean) - default `true`, set to `false`, to ignore filebeat service restart notify +## LWRP filebeat_runit_service + +LWRP `filebeat_runit_service` configures `filebeat` service using `runit`. + + +**LWRP example** + +```ruby +filebeat_runit_service 'default' do + [options ..] +end +``` + +**LWRP Options** + +- *action* (optional) - default `:create`, options: :create, :delete +- *filebeat_install_resource_name* (optional, String) - default `default`, filebeat_install/filebeat_install_preview resource name, set this attribute if LWRP resource name is other than `default` +- *service_name* (optional, String) - default `filebeat`, filebeat service name, must be common across resources +- *disable_service* (optional, Boolean) - default `false`, set to `true`, to disable filebeat service +- *purge_prospectors_dir* (optional, Boolean) - default `false`, set to `true`, to purge prospectors +- *runit_filebeat_cmd_options* (optional, Boolean) - default `''`, set to `true`, runit filebeat service command line options +- *service_ignore_failure* (optional, Boolean) - default `false`, set to `true`, to ignore filebeat service failures + + ## How to Create Filebeat LWRP Resources via Node Attribute Check out filebeat test cookbook [filebeat_test](test/cookbooks/filebeat_test). +## TODO + +- Add other platforms support to install_preview resource + + ## Contributing 1. Fork the repository on Github diff --git a/libraries/helper.rb b/libraries/helper.rb index bba2135..29d4b3b 100644 --- a/libraries/helper.rb +++ b/libraries/helper.rb @@ -1,68 +1,77 @@ require 'fileutils' -def purge_prospectors_dir(prospectors_dir) - valid_prospectors = [] +module Filebeat + # Filebeat Helper Module + module Helpers + def purge_prospectors_config(prospectors_dir) + valid_prospectors = [] - # collect lwrp filebeat_prospector prospectors - run_context.resource_collection.select { |resource| valid_prospectors.push("lwrp-prospector-#{resource.name}.yml") if resource.resource_name == :filebeat_prospector } + # collect lwrp filebeat_prospector prospectors + run_context.resource_collection.select { |resource| valid_prospectors.push("lwrp-prospector-#{resource.name}.yml") if resource.resource_name == :filebeat_prospector } - # prospectors yml files to clean up - extra_prospectors = Dir.entries(prospectors_dir).reject { |a| valid_prospectors.include?(a) || a.match(/^custom-prospector-.*yml$/) }.sort - extra_prospectors -= ['.', '..'] + # prospectors yml files to clean up + extra_prospectors = Dir.entries(prospectors_dir).reject { |a| valid_prospectors.include?(a) || a.match(/^custom-prospector-.*yml$/) }.sort + extra_prospectors -= ['.', '..'] - extra_prospectors.each do |prospector| - prospector_file = ::File.join(prospectors_dir, prospector) - FileUtils.rm prospector_file - Chef::Log.warn("deleted filebeat prospector configuration file #{prospector_file}") - end + extra_prospectors.each do |prospector| + prospector_file = ::File.join(prospectors_dir, prospector) + FileUtils.rm prospector_file + Chef::Log.warn("deleted filebeat prospector configuration file #{prospector_file}") + end - Chef::Log.info("\n could not find any filebeat prospector configuration file to purge") if extra_prospectors.empty? -end + Chef::Log.info("\n could not find any filebeat prospector configuration file to purge") if extra_prospectors.empty? + end -def machine_arch - node['kernel']['machine'] =~ /x86_64/ ? 'x86_64' : 'x86' -end + def machine_arch + node['kernel']['machine'] =~ /x86_64/ ? 'x86_64' : 'x86' + end -def win_package_url(version, package_url) - package_url = if version < '5.0' - package_url == 'auto' ? "https://download.elastic.co/beats/filebeat/filebeat-#{version}-windows.zip" : package_url - else - package_url == 'auto' ? "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-#{version}-windows-#{machine_arch}.zip" : package_url - end - package_url -end + def win_package_url(version, package_url) + package_url = if version < '5.0' + package_url == 'auto' ? "https://download.elastic.co/beats/filebeat/filebeat-#{version}-windows.zip" : package_url + else + package_url == 'auto' ? "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-#{version}-windows-#{machine_arch}.zip" : package_url + end + package_url + end -def default_config_dir(version, windows_base_dir) - conf_dir = if node['platform'] == 'windows' - if version < '5.0' - "#{windows_base_dir}/filebeat-#{version}-windows" - else - "#{windows_base_dir}/filebeat-#{version}-windows-#{machine_arch}" - end - else - '/etc/filebeat' - end - conf_dir -end + def default_config_dir(version, windows_base_dir) + conf_dir = if node['platform'] == 'windows' + if version < '5.0' + "#{windows_base_dir}/filebeat-#{version}-windows" + else + "#{windows_base_dir}/filebeat-#{version}-windows-#{machine_arch}" + end + else + '/etc/filebeat' + end + conf_dir + end -def default_conf_file(conf_dir) - node['platform'] == 'windows' ? "#{conf_dir}/filebeat.yml" : ::File.join(conf_dir, 'filebeat.yml') -end + def default_conf_file(conf_dir) + node['platform'] == 'windows' ? "#{conf_dir}/filebeat.yml" : ::File.join(conf_dir, 'filebeat.yml') + end -def default_prospectors_dir(conf_dir) - node['platform'] == 'windows' ? "#{conf_dir}/conf.d" : ::File.join(conf_dir, 'conf.d') -end + def default_prospectors_dir(conf_dir) + node['platform'] == 'windows' ? "#{conf_dir}/conf.d" : ::File.join(conf_dir, 'conf.d') + end -def check_beat_resource(run_context, resource_type, resource_name = 'default') - run_context.resource_collection.find(resource_type => resource_name) -rescue StandardError - nil -end + def check_beat_resource(run_context, resource_type, resource_name = 'default') + run_context.resource_collection.find(resource_type => resource_name) + rescue StandardError + nil + end -def find_beat_resource(run_context, resource_type, resource_name = 'default') - run_context.resource_collection.find(resource_type => resource_name) -end + def find_beat_resource(run_context, resource_type, resource_name = 'default') + run_context.resource_collection.find(resource_type => resource_name) + end -def default_log_dir(conf_dir) - node['platform'] == 'windows' ? "#{conf_dir}/logs" : '/var/log/filebeat' + def default_log_dir(conf_dir) + node['platform'] == 'windows' ? "#{conf_dir}/logs" : '/var/log/filebeat' + end + end end + +# ::Chef::Recipe.send(:include, Filebeat::Helpers) +# ::Chef::Resource.send(:include, Filebeat::Helpers) +# ::Chef::Provider.send(:include, Filebeat::Helpers) diff --git a/resources/config.rb b/resources/config.rb index fedf881..5b62c3d 100755 --- a/resources/config.rb +++ b/resources/config.rb @@ -13,7 +13,7 @@ property :conf_file, [String, NilClass], default: nil property :disable_service, [TrueClass, FalseClass], default: false property :notify_restart, [TrueClass, FalseClass], default: true -property :sensitive, [TrueClass, FalseClass], default: false +property :config_sensitive, [TrueClass, FalseClass], default: false default_action :create @@ -42,7 +42,7 @@ content JSON.parse(config.to_json).to_yaml.lines.to_a[1..-1].join notifies :restart, "service[#{new_resource.service_name}]" if new_resource.notify_restart && !new_resource.disable_service mode 0o600 - sensitive new_resource.sensitive + sensitive new_resource.config_sensitive end # ...and put this back the way we found them. @@ -57,3 +57,7 @@ action :delete end end + +action_class do + include ::Filebeat::Helpers +end diff --git a/resources/install.rb b/resources/install.rb index 9e6681d..ab36f5c 100755 --- a/resources/install.rb +++ b/resources/install.rb @@ -5,7 +5,7 @@ resource_name :filebeat_install -property :version, String, default: '6.3.0' +property :version, String, default: '6.4.2' property :release, String, default: '1' property :setup_repo, [TrueClass, FalseClass], default: true property :ignore_package_version, [TrueClass, FalseClass], default: false @@ -163,3 +163,7 @@ recursive true end end + +action_class do + include ::Filebeat::Helpers +end diff --git a/resources/install_preview.rb b/resources/install_preview.rb index c25d036..14ef89b 100755 --- a/resources/install_preview.rb +++ b/resources/install_preview.rb @@ -57,7 +57,9 @@ provider Chef::Provider::Package::Dpkg if node['platform_family'] == 'debian' end - directory new_resource.log_dir + directory new_resource.log_dir do + mode 0o755 + end prospectors_dir_action = new_resource.delete_prospectors_dir ? %i[delete create] : %i[create] @@ -83,3 +85,7 @@ recursive true end end + +action_class do + include ::Filebeat::Helpers +end diff --git a/resources/prospector.rb b/resources/prospector.rb index 39058a3..8fa68dd 100755 --- a/resources/prospector.rb +++ b/resources/prospector.rb @@ -8,9 +8,11 @@ property :service_name, String, default: 'filebeat' property :filebeat_install_resource_name, String, default: 'default' property :config, [Array, Hash], default: {} +property :cookbook_file_name, [String, NilClass], default: nil +property :cookbook_file_name_cookbook, [String, NilClass], default: nil property :disable_service, [TrueClass, FalseClass], default: false property :notify_restart, [TrueClass, FalseClass], default: true -property :sensitive, [TrueClass, FalseClass], default: false +property :config_sensitive, [TrueClass, FalseClass], default: false default_action :create @@ -35,13 +37,23 @@ # ...and put this back the way we found them. YAML::ENGINE.yamler = defaultengine if Psych::VERSION.start_with?('1') - file "prospector_#{new_resource.name}" do - path ::File.join(filebeat_install_resource.prospectors_dir, "lwrp-prospector-#{new_resource.name}.yml") - content file_content - notifies :restart, "service[#{new_resource.service_name}]" if new_resource.notify_restart && !new_resource.disable_service - mode 0o600 - sensitive new_resource.sensitive - action action + if new_resource.cookbook_file_name && new_resource.cookbook_file_name_cookbook + cookbook_file "prospector_#{new_resource.name}" do + path ::File.join(filebeat_install_resource.prospectors_dir, "lwrp-prospector-#{new_resource.name}.yml") + source new_resource.cookbook_file_name + cookbook new_resource.cookbook_file_name_cookbook + notifies :restart, "service[#{new_resource.service_name}]" if new_resource.notify_restart && !new_resource.disable_service + mode 0o600 + sensitive new_resource.config_sensitive + end + else + file "prospector_#{new_resource.name}" do + path ::File.join(filebeat_install_resource.prospectors_dir, "lwrp-prospector-#{new_resource.name}.yml") + content file_content + notifies :restart, "service[#{new_resource.service_name}]" if new_resource.notify_restart && !new_resource.disable_service + mode 0o600 + sensitive new_resource.config_sensitive + end end end @@ -52,3 +64,7 @@ action :delete end end + +action_class do + include ::Filebeat::Helpers +end diff --git a/resources/runit_service.rb b/resources/runit_service.rb index 2e6ec97..7e3b0ba 100755 --- a/resources/runit_service.rb +++ b/resources/runit_service.rb @@ -10,11 +10,7 @@ property :disable_service, [TrueClass, FalseClass], default: false property :purge_prospectors_dir, [TrueClass, FalseClass], default: false property :runit_filebeat_cmd_options, String, default: '' -property :ignore_failure, [TrueClass, FalseClass], default: false - -property :retries, Integer, default: 2 -property :retry_delay, Integer, default: 0 -property :notify_restart, [TrueClass, FalseClass], default: false +property :service_ignore_failure, [TrueClass, FalseClass], default: false default_action :create @@ -59,10 +55,14 @@ ) default_logger true action service_action - ignore_failure new_resource.ignore_failure + ignore_failure new_resource.service_ignore_failure cookbook 'filebeat' end end action :delete do end + +action_class do + include ::Filebeat::Helpers +end diff --git a/resources/service.rb b/resources/service.rb index 5bf0ead..0d8ad8c 100755 --- a/resources/service.rb +++ b/resources/service.rb @@ -9,10 +9,10 @@ property :filebeat_install_resource_name, String, default: 'default' property :disable_service, [TrueClass, FalseClass], default: false property :purge_prospectors_dir, [TrueClass, FalseClass], default: false -property :ignore_failure, [TrueClass, FalseClass], default: false -property :retries, Integer, default: 2 -property :retry_delay, Integer, default: 0 +property :service_ignore_failure, [TrueClass, FalseClass], default: false +property :service_retries, Integer, default: 2 +property :service_retry_delay, Integer, default: 0 default_action :create @@ -31,7 +31,7 @@ with_run_context(:root) do ruby_block 'purge_prospectors_dir' do block do - purge_prospectors_dir(filebeat_install_resource.prospectors_dir) + purge_prospectors_config(filebeat_install_resource.prospectors_dir) end only_if { new_resource.purge_prospectors_dir } action :nothing @@ -45,17 +45,21 @@ not_if { new_resource.disable_service } end - service_action = new_resource.disable_service ? %i[disable stop] : %i[enable nothing] + service_action = new_resource.disable_service ? %i[disable stop] : %i[enable] service new_resource.service_name do provider Chef::Provider::Service::Solaris if node['platform_family'] == 'solaris2' - retries new_resource.retries - retry_delay new_resource.retry_delay + retries new_resource.service_retries + retry_delay new_resource.service_retry_delay supports :status => true, :restart => true action service_action - ignore_failure new_resource.ignore_failure + ignore_failure new_resource.service_ignore_failure end end action :delete do end + +action_class do + include ::Filebeat::Helpers +end diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb index bebbbe3..a841bac 100644 --- a/spec/unit/recipes/default_spec.rb +++ b/spec/unit/recipes/default_spec.rb @@ -78,12 +78,12 @@ let(:node) { chef_run.node } - it 'create prospector directory C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/conf.d' do - expect(chef_run).to create_directory('C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/conf.d') + it 'create prospector directory C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/conf.d' do + expect(chef_run).to create_directory('C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/conf.d') end - it 'create prospector directory C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/logs' do - expect(chef_run).to create_directory('C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/logs') + it 'create prospector directory C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/logs' do + expect(chef_run).to create_directory('C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/logs') end it 'download filebeat package file' do @@ -204,8 +204,8 @@ # # let(:node) { chef_run.node } # - # it 'configure C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/filebeat.yml' do - # expect(chef_run).to create_file('C:/opt/filebeat/filebeat-6.3.0-windows-x86_64/filebeat.yml') + # it 'configure C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/filebeat.yml' do + # expect(chef_run).to create_file('C:/opt/filebeat/filebeat-6.4.2-windows-x86_64/filebeat.yml') # end # end end diff --git a/test/smoke/v5/default.rb b/test/smoke/v5/default.rb deleted file mode 100644 index f4f10ea..0000000 --- a/test/smoke/v5/default.rb +++ /dev/null @@ -1,35 +0,0 @@ -# # encoding: utf-8 - -# Inspec test for recipe elastic_beats_repo::v5 - -# The Inspec reference, with examples and extensive documentation, can be -# found at http://inspec.io/docs/reference/resources/ - -if %w[redhat fedora amazon].include?(os[:family]) - describe file('/etc/yum.repos.d/elastic5.repo') do - its('content') { should match %r{https://artifacts.elastic.co/packages/5.x/yum} } - end -else - describe file('/etc/apt/sources.list.d/elastic5.list') do - its('content') { should match %r{https://artifacts.elastic.co/packages/5.x/apt} } - end -end - -describe package('filebeat') do - it { should be_installed } - its('version') { should match '5.6.9' } -end - -if %w[16.04 2 7].include?(os[:release]) - describe systemd_service('filebeat') do - it { should be_installed } - it { should be_enabled } - it { should be_running } - end -else - describe service('filebeat') do - it { should be_installed } - it { should be_enabled } - it { should be_running } - end -end diff --git a/test/smoke/v6/default.rb b/test/smoke/v6/default.rb index cf75c3e..0294d9c 100644 --- a/test/smoke/v6/default.rb +++ b/test/smoke/v6/default.rb @@ -17,7 +17,7 @@ describe package('filebeat') do it { should be_installed } - its('version') { should match '6.3.0' } + its('version') { should match '6.4.2' } end if %w[16.04 2 7].include?(os[:release]) From 86331f148817530949120b33960139779eb664ba Mon Sep 17 00:00:00 2001 From: Virender Khatri Date: Fri, 12 Oct 2018 16:16:17 +0530 Subject: [PATCH 2/2] [ci skip] Release v2.2.0 --- README.md | 4 ++-- metadata.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e4f41a..a575031 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,14 @@ This is a [Chef] cookbook to manage [Filebeat]. ## Most Recent Release ```ruby -cookbook 'filebeat', '~> 2.1.0' +cookbook 'filebeat', '~> 2.2.0' ``` ## From Git ```ruby -cookbook 'filebeat', github: 'vkhatri/chef-filebeat', tag: 'v2.1.0' +cookbook 'filebeat', github: 'vkhatri/chef-filebeat', tag: 'v2.2.0' ``` diff --git a/metadata.rb b/metadata.rb index 8275896..204c262 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache-2.0' description 'Installs/Configures Elastic Filebeat' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.1.0' +version '2.2.0' source_url 'https://github.com/vkhatri/chef-filebeat' if respond_to?(:source_url) issues_url 'https://github.com/vkhatri/chef-filebeat/issues' if respond_to?(:issues_url) chef_version '>= 12.14' if respond_to?(:chef_version)