Skip to content

Commit

Permalink
Add support for ES 5.0
Browse files Browse the repository at this point in the history
- Drop support for ES < 5.0
  * Remove the shield/watcher plugin installs, since they have become x-pack in ES 5.0
  * Remove hashes and different download URLs, other logic that distinguishes between 1.x and 2.x.
  * Update README.md to reflect that this change drops support for < 5.0 (too many changes)

- elasticsearch_install:
  * Drop warnings for installing as root under ES < 2.0

- elasticsearch_configure:
  * Replace logging.yml with new log4j2.properties file, add template for this
  * Update variables that are allowed in /etc/sysconfig/elasticsearch or /etc/default/elasticsearch
  * Drop ES_JAVA_OPTS and introduce option 'jvm_options' with new template for /etc/elasticsearch/jvm.options
  * Add new restart_on_upgrade option, drop thread_stack_size, drop env_options, drop gc_settings
  * Drop some of the defaults in elasticsearch.yml that are no longer present in upstream packaging

- elasticsearch_plugin:
  * change bin/plugin to bin/elasticsearch-plugin when managing plugins
  * Remove the shield/watcher plugin installs, since they have become x-pack in ES 5.0
  * Add new `options` parameter/attribute so that you can pass things like `--batch` to this resource

- elasticsearch_service:
  * Introduce systemd unit files for distros that support them
  * Guard on which init systems based on presence of /etc/init.d or /usr/lib/systemd/system directories

Fixes #424.
Fixes #478.
Fixes #503.
  • Loading branch information
martinb3 committed Oct 28, 2016
1 parent 23094b9 commit a9c60af
Show file tree
Hide file tree
Showing 22 changed files with 547 additions and 279 deletions.
9 changes: 0 additions & 9 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,3 @@ suites:
run_list:
- recipe[java]
- recipe[elasticsearch_test::default_with_plugins]

- name: shieldwatcher # install licensed plugins for testing
require_chef_omnibus: true
run_list:
- recipe[java]
- recipe[elasticsearch_test::shieldwatcher]
attributes:
elasticsearch:
install_type: package
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[Java Runtime](https://www.java.com/en/) - This cookbook requires java, but does not provide it. Please install Java before using any recipe in this cookbook. Please also note that Elasticsearch itself has [specific minimum Java version requirements](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html#jvm-version). We recommend [this cookbook](https://github.com/agileorbit-cookbooks/java) to install Java.

[Elasticsearch](https://www.elastic.co/products/elasticsearch) - This cookbook is being written and tested to support Elasticsearch 2.x and greater. If you must have a cookbook that works with older versions of Elasticsearch, please test and then pin to a specific, older `major.minor` version of this cookbook and only leave the patch release to float.
[Elasticsearch](https://www.elastic.co/products/elasticsearch) - This cookbook is being written and tested to support Elasticsearch 5.x and greater. If you must have a cookbook that works with older versions of Elasticsearch, please test and then pin to a specific, older `major.minor` version of this cookbook and only leave the patch release to float. Older versions can be found via [Git tags](https://github.com/elastic/cookbook-elasticsearch/tags) or on [Chef Supermarket](https://supermarket.chef.io/cookbooks/elasticsearch). We also maintain bugfix branches for major released lines (0.x, 1.x, 2.x) of this cookbook so that we can still release fixes for older cookbooks.

[Chef](https://www.chef.io/) - The latest release of this cookbook is intended to support the three most recent releases of Chef, and tests against those. Earlier versions may also be supported, though we suggest that you use Chef 12.x at a minimum. It implements support for CI as well as more modern testing with chefspec and test-kitchen. It no longer supports some of the more extraneous features such as discovery (use [chef search](https://docs.chef.io/chef_search.html) in your wrapper cookbook) or EBS device creation (use [the aws cookbook](https://github.com/chef-cookbooks/aws)).

Expand All @@ -24,7 +24,7 @@ the version parameter as a string into your download_url.

|Name|Default|Other values|
|----|-------|------------|
|`default['elasticsearch']['version']`|`'2.4.1'`|[See list](attributes/default.rb).|
|`default['elasticsearch']['version']`|`'5.0.0'`|[See list](attributes/default.rb).|
|`default['elasticsearch']['install_type']`|`:package`|`:tarball`|
|`default['elasticsearch']['download_urls']['debian']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|
|`default['elasticsearch']['download_urls']['rhel']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|
Expand Down
89 changes: 7 additions & 82 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,90 +1,15 @@
# elasticsearch version & install type
default['elasticsearch']['version'] = '2.4.1'
default['elasticsearch']['version'] = '5.0.0'
default['elasticsearch']['install_type'] = :package

# platform_family keyed download URLs
default['elasticsearch']['download_urls'] = {
'debian' => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-%s.deb',
'rhel' => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-%s.noarch.rpm',
'tar' => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-%s.tar.gz'
}

default['elasticsearch']['download_urls_v2'] = {
'debian' => 'https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/%s/elasticsearch-%s.deb',
'rhel' => 'https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/rpm/elasticsearch/%s/elasticsearch-%s.rpm',
'tar' => 'https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/%s/elasticsearch-%s.tar.gz'
'debian' => 'https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-%s.deb',
'rhel' => 'https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-%s.rpm',
'tar' => 'https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-%s.tar.gz'
}

# platform_family keyed download sha256 checksums
default['elasticsearch']['checksums']['1.4.5']['debian'] = '68dce951181e9802e94fd83b894f4b628394fc44bb01c77eb61fdbd1940d94b5'
default['elasticsearch']['checksums']['1.4.5']['rhel'] = '29b005c4148036556f78d6bd01a5e7c8e4ea60e2c20f82b63d8362ab46d83a19'
default['elasticsearch']['checksums']['1.4.5']['tar'] = 'dc28aa9e441cbc3282ecc9cb498bea219355887b102aac872bdf05d5977356e2'
default['elasticsearch']['checksums']['1.5.0']['debian'] = '15a02a2bea74da2330bb78718efb3a8f83a2b2e040a6ee859e100a6556981f36'
default['elasticsearch']['checksums']['1.5.0']['rhel'] = 'b72a9fb9a2c0471e8fe1a35373cdcfe39d29e72b7281bfccbdc32d03ee0eff70'
default['elasticsearch']['checksums']['1.5.0']['tar'] = 'acf572c606552bc446cceef3f8e93814a363ba0d215b323a2864682b3abfbe45'
default['elasticsearch']['checksums']['1.6.2']['debian'] = 'da22c2df44ade970c7d8ec346fd37a440ed40f9e73fb3427b9eacf44baf298c2'
default['elasticsearch']['checksums']['1.6.2']['rhel'] = '60c75a6f386bd729c6af2995af0a5290dd0ed6286673d435fc52620721815d91'
default['elasticsearch']['checksums']['1.6.2']['tar'] = 'b7ef3aae0a263c2312bd1a25b191c3c108c92d5413c3527d776587e582c518d0'
default['elasticsearch']['checksums']['1.7.1']['debian'] = '5832808f2a4c77de5af225db11da00138d9ea07a17f7b9212f4d2aac5317169d'
default['elasticsearch']['checksums']['1.7.1']['rhel'] = '9b083f441490b32f98f9bf654e5e8ddec885838128726691103cfda5068423bc'
default['elasticsearch']['checksums']['1.7.1']['tar'] = '86a0c20eea6ef55b14345bff5adf896e6332437b19180c4582a346394abde019'
default['elasticsearch']['checksums']['1.7.2']['debian'] = '791fb9f2131be2cf8c1f86ca35e0b912d7155a53f89c2df67467ca2105e77ec2'
default['elasticsearch']['checksums']['1.7.2']['rhel'] = 'c5410b88494d5cc9fdadf59353430b46c28e58eddc5c610ea4c4516eacc2fa09'
default['elasticsearch']['checksums']['1.7.2']['tar'] = '6f81935e270c403681e120ec4395c28b2ddc87e659ff7784608b86beb5223dd2'
default['elasticsearch']['checksums']['1.7.3']['debian'] = '52950c688cb3d6a13686753b4e8b1c80183e81174059924ee08b2df172afbb1c'
default['elasticsearch']['checksums']['1.7.3']['rhel'] = '2380343487ffafc6a7a834cf51d2abbfb7c5ad9d9d45301671adebf97abc632a'
default['elasticsearch']['checksums']['1.7.3']['tar'] = 'af517611493374cfb2daa8897ae17e63e2efea4d0377d316baa351c1776a2bca'
default['elasticsearch']['checksums']['1.7.4']['debian'] = 'f46a2892e454030d267f087db1be6bd9ae556bb1708a12cf94eeb4180951bf1f'
default['elasticsearch']['checksums']['1.7.4']['rhel'] = 'a3469fa93e05029ae4ba9dd7ddf80828095b850bc5764c24bae4dafc2346ef1f'
default['elasticsearch']['checksums']['1.7.4']['tar'] = '395f3417c26a6b36125f6a062c1129b454a961efea09151c692adc63562e5a94'
default['elasticsearch']['checksums']['1.7.5']['debian'] = '4e5a4d29f5fbd737d203e7049f2e18515c3443f9e01e193583e2b5c60779cc0f'
default['elasticsearch']['checksums']['1.7.5']['rhel'] = '4e0a4ff1ae76337308ebed977fb29c2f2d1251b2780f751676e3b18a1d7db00f'
default['elasticsearch']['checksums']['1.7.5']['tar'] = '0aa58947d66b487488e86059352deb7c6cab5da4accdff043cce9fed7c3d2fa7'
default['elasticsearch']['checksums']['2.0.0-rc1']['debian'] = '6ba92f96676932756ff7113f42d8946679e9be2144acece59bd79367568eb712'
default['elasticsearch']['checksums']['2.0.0-rc1']['rhel'] = '4dd4bdd1b4333f221bc5d2a2638bdc89282d57923842ce4c76607497abafb44d'
default['elasticsearch']['checksums']['2.0.0-rc1']['tar'] = 'cfd97bba0c49000a2799fffd359ec351f0ca7ef5f0a8c160920137db6b057784'
default['elasticsearch']['checksums']['2.0.0']['debian'] = 'f846cab2b7e99159650d38767249275c2fd5d3574fe700ef199cd1cb06ef28bf'
default['elasticsearch']['checksums']['2.0.0']['rhel'] = '6bd2d7840447836450d8781fffa9e296dfb257b523598c6e55433850e37feb25'
default['elasticsearch']['checksums']['2.0.0']['tar'] = 'b25f13f615337c2072964fd9fc5c7250f8a2a983b22198daf93548285d5d16df'
default['elasticsearch']['checksums']['2.0.1']['debian'] = '815a7b7d3bbd862c3ec136aa7bfb1adec272bdecdae45233d9ffdf61d307e86c'
default['elasticsearch']['checksums']['2.0.1']['rhel'] = '69957ef5ee6a142adf02c1065faa29bda7e2cf7f2d5c56edad4852b7f644345a'
default['elasticsearch']['checksums']['2.0.1']['tar'] = '7be4a6c717002057e422073ca8e957df8b4cb198bf2399a0d79f42121e34798b'
default['elasticsearch']['checksums']['2.1.0']['debian'] = '099fdeb7b3903ce8cea7d39b577ed6445b78b64d14dd2664fd2ca1e0896691dd'
default['elasticsearch']['checksums']['2.1.0']['rhel'] = 'a79c1985224c1b57479275794b258f4eba973e0b65f5c62b1c38e02738a1ce71'
default['elasticsearch']['checksums']['2.1.0']['tar'] = '8a4e85bcb506daa369651506af1cbc55c09fd7ff387d111142ae14d0a85d4d14'
default['elasticsearch']['checksums']['2.1.1']['debian'] = '097400b0b46c826c6a8be837739ade0c0c326b47d38ef54df7bd48de9e9e9995'
default['elasticsearch']['checksums']['2.1.1']['rhel'] = '22fc646aed2b6900116589a5712ac9324682470336bbbb025b4a607efb735e5a'
default['elasticsearch']['checksums']['2.1.1']['tar'] = 'ebd69c0483f20ba7e51caa9606d4e3ce5fe2667e1216c799f0cdbb815c317ce6'
default['elasticsearch']['checksums']['2.2.0']['debian'] = 'c97ac75303a7ba042c45adff74e27c3584d64d8e0f6f24c43afdcbff484b43d5'
default['elasticsearch']['checksums']['2.2.0']['rhel'] = '13fe3717e7761f23cd41a148a31ee49496cbdb45f44bfaeb3ba5538a41fdd79a'
default['elasticsearch']['checksums']['2.2.0']['tar'] = 'ed70cc81e1f55cd5f0032beea2907227b6ad8e7457dcb75ddc97a2cc6e054d30'
default['elasticsearch']['checksums']['2.2.1']['debian'] = 'cb89f880e03276624b3529506c9d2ed6b537968d1c819026e087117cd4c60c7c'
default['elasticsearch']['checksums']['2.2.1']['rhel'] = 'ddb5e1545e90b45e2b9495c35d5336a40fc63e09d8ac9cac73079888405df7f4'
default['elasticsearch']['checksums']['2.2.1']['tar'] = '7d43d18a8ee8d715d827ed26b4ff3d939628f5a5b654c6e8de9d99bf3a9b2e03'
default['elasticsearch']['checksums']['2.2.2']['debian'] = '5d44d4151430e5c87455f8efba41475a50a228131711a803b7ba7e271764bd9c'
default['elasticsearch']['checksums']['2.2.2']['rhel'] = '988d1b3c9aef94b8ea74daef14889690000c9fd6c80b0cf032039b4d26c252a6'
default['elasticsearch']['checksums']['2.2.2']['tar'] = 'c706db594f1feb5051d90697c6c412eadd60e00a9ec3b4f345a122801183af69'
default['elasticsearch']['checksums']['2.3.0']['debian'] = '2645e341587f636edaca1ee1380eeb76596d99b596bf17e03e2c37c697523efd'
default['elasticsearch']['checksums']['2.3.0']['rhel'] = '7469808bc64bca0b2e1a9fe258ff04ba4acde6c86d13a5cd19d623966fecfffd'
default['elasticsearch']['checksums']['2.3.0']['tar'] = 'd68482c7633f2986263bc5f11f93b8a58c54c6cf5e337b615446d0a7c6fdcd8b'
default['elasticsearch']['checksums']['2.3.1']['debian'] = 'ff22da40b60ae216761c7f6148e12760f34e0e51bc2198d5022934dc520b7d6c'
default['elasticsearch']['checksums']['2.3.1']['rhel'] = '841946dfe9220a4fdae7bbd491114a0eccbcc6d096bf4343d02e7c6e7abb704f'
default['elasticsearch']['checksums']['2.3.1']['tar'] = 'f0092e73038e0472fcdd923e5f2792e13692ea0f09ca034a54dd49b217110ebb'
default['elasticsearch']['checksums']['2.3.2']['debian'] = '3d474b0123ec8ad4ebfa089f8cde607033e6cbef28a6a0df318bdc3d2a546cd8'
default['elasticsearch']['checksums']['2.3.2']['rhel'] = '7bc84521921af8e43089c4fd64eced9eb68167d73fc14c102732f78750dfc607'
default['elasticsearch']['checksums']['2.3.2']['tar'] = '04c4d3913d496d217e038da88df939108369ae2e78eea29cb1adf1c4ab3a000a'
default['elasticsearch']['checksums']['2.3.3']['debian'] = 'fa90c6aefc5e82e0e19cb0ec546b9a64fec354ede201cf24658ddcfe01762d92'
default['elasticsearch']['checksums']['2.3.3']['rhel'] = '9aef1abe334d3143d8347144d69a35f449c5ecd8eebc3d7277f224d18679585a'
default['elasticsearch']['checksums']['2.3.3']['tar'] = '5fe0a6887432bb8a8d3de2e79c9b81c83cfa241e6440f0f0379a686657789165'
default['elasticsearch']['checksums']['2.3.4']['debian'] = 'abf6ce899cb7f2d9fc6eae0ecba148a191093e62afd1e242ba0bb1a7c2686074'
default['elasticsearch']['checksums']['2.3.4']['rhel'] = '781af05407d88a7bf4cf743d49e8b595d9494ba7334794ed2e2f8f9e64b67e71'
default['elasticsearch']['checksums']['2.3.4']['tar'] = '371e0c5f4ded0a8548f1cce55faff3efebcfd5f895c2c816f220146521f6f06e'
default['elasticsearch']['checksums']['2.3.5']['debian'] = '9fd12eca701ccd7a1ae5767187882327262717154ba1fb7eab3c3a653874d3fb'
default['elasticsearch']['checksums']['2.3.5']['rhel'] = 'ad869bb0d91cdf97391f85832c7309d44684e867d7c74263808e4687c4ab8789'
default['elasticsearch']['checksums']['2.3.5']['tar'] = '1119a8c18620b98c4b85261318663a1f26dea92a26f34dfeb7f813fb7cbb468a'
default['elasticsearch']['checksums']['2.4.0']['debian'] = '5edf1ac795d6950781b20ecc8db992d6dc95e55abb1ff66e6b1234d85bd68514'
default['elasticsearch']['checksums']['2.4.0']['rhel'] = 'aa75abe581685cb5767ce91a042b8b395290d966bcb575ff2e3d1cf1fd06ff7f'
default['elasticsearch']['checksums']['2.4.0']['tar'] = '3ae01140ae7bcbb91436feef381fbed774e36ef6d1e8e6a3153640db82acf4c9'
default['elasticsearch']['checksums']['2.4.1']['debian'] = 'cdf94b84cbf3024961cd09a689957fe39df6da9afcfe76ceba20dbfb50b92945'
default['elasticsearch']['checksums']['2.4.1']['rhel'] = 'c8a275d12876165da532ebfde1eeb6a502613bda919d95516f30f6495ae5086d'
default['elasticsearch']['checksums']['2.4.1']['tar'] = '23a369ef42955c19aaaf9e34891eea3a055ed217d7fbe76da0998a7a54bbe167'
default['elasticsearch']['checksums']['5.0.0']['debian'] = '0a4f8842a1f7d7bd3015118298284383efcd4c25f9591c46bb5ab68189815268'
default['elasticsearch']['checksums']['5.0.0']['rhel'] = 'fb502a9754f2162f27590125aecc6b68fa999738051d8f230c4da4ed6deb8d62'
default['elasticsearch']['checksums']['5.0.0']['tar'] = 'a866534f0fa7428e980c985d712024feef1dee04709add6e360fc7b73bb1e7ae'
13 changes: 4 additions & 9 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,18 @@ def determine_download_url(new_resource, node)
platform_family = node['platform_family']
install_type = determine_install_type(new_resource, node)
version = determine_version(new_resource, node)
newer_url_style = version.to_f >= 2.0

# v2 and greater has a different set of URLs
url_hash_key = newer_url_style ? 'download_urls_v2' : 'download_urls'

url_string = nil
if new_resource.download_url
url_string = new_resource.download_url
elsif install_type.to_s == 'tar' || install_type.to_s == 'tarball'
url_string = node['elasticsearch'][url_hash_key]['tar']
elsif install_type.to_s == 'package' && node['elasticsearch'][url_hash_key][platform_family]
url_string = node['elasticsearch'][url_hash_key][platform_family]
url_string = node['elasticsearch']['download_urls']['tar']
elsif install_type.to_s == 'package' && node['elasticsearch']['download_urls'][platform_family]
url_string = node['elasticsearch']['download_urls'][platform_family]
end

if url_string && version
# v2 and greater has two %s entries for version
return (newer_url_style ? format(url_string, version, version) : format(url_string, version))
return format(url_string, version)
elsif url_string
return url_string
end
Expand Down
60 changes: 37 additions & 23 deletions libraries/provider_configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,29 @@ def whyrun_supported?
new_resource.updated_by_last_action(true) if d.updated_by_last_action?
end

# Create elasticsearch shell variables file
#
# Valid values in /etc/sysconfig/elasticsearch or /etc/default/elasticsearch
# ES_HOME CONF_DIR CONF_FILE DATA_DIR LOG_DIR WORK_DIR PID_DIR
# ES_HEAP_SIZE ES_HEAP_NEWSIZE ES_DIRECT_SIZE ES_JAVA_OPTS
# ES_RESTART_ON_UPGRADE ES_GC_LOG_FILE ES_STARTUP_SLEEP_TIME
# ES_USER ES_GROUP MAX_OPEN_FILES MAX_LOCKED_MEMORY MAX_MAP_COUNT
# ES_HOME JAVA_HOME CONF_DIR DATA_DIR LOG_DIR PID_DIR ES_JAVA_OPTS
# RESTART_ON_UPGRADE ES_USER ES_GROUP ES_STARTUP_SLEEP_TIME MAX_OPEN_FILES
# MAX_LOCKED_MEMORY MAX_MAP_COUNT
#
# We provide these values as resource attributes/parameters directly

params = {}
params[:ES_HOME] = new_resource.path_home[es_install.type]
params[:JAVA_HOME] = new_resource.java_home
params[:CONF_DIR] = new_resource.path_conf[es_install.type]
params[:DATA_DIR] = new_resource.path_data[es_install.type]
params[:LOG_DIR] = new_resource.path_logs[es_install.type]
params[:PID_DIR] = new_resource.path_pid[es_install.type]

params[:ES_STARTUP_SLEEP_TIME] = new_resource.startup_sleep_seconds.to_s
params[:RESTART_ON_UPGRADE] = new_resource.restart_on_upgrade
params[:ES_USER] = es_user.username
params[:ES_GROUP] = es_user.groupname

params[:JAVA_HOME] = new_resource.java_home
params[:ES_HEAP_SIZE] = new_resource.allocated_memory
params[:ES_STARTUP_SLEEP_TIME] = new_resource.startup_sleep_seconds.to_s
params[:MAX_OPEN_FILES] = new_resource.nofile_limit
params[:MAX_LOCKED_MEMORY] = new_resource.memlock_limit

params[:ES_JAVA_OPTS] = '"'
params[:ES_JAVA_OPTS] << '-server '
params[:ES_JAVA_OPTS] << '-Djava.awt.headless=true '
params[:ES_JAVA_OPTS] << "-Xss#{new_resource.thread_stack_size} "
params[:ES_JAVA_OPTS] << "#{new_resource.gc_settings.tr("\n", ' ').strip.squeeze(' ')} " if new_resource.gc_settings
params[:ES_JAVA_OPTS] << '-Dfile.encoding=UTF-8 '
params[:ES_JAVA_OPTS] << '-Djna.nosys=true'
params[:ES_JAVA_OPTS] << " #{new_resource.env_options}" if new_resource.env_options
params[:ES_JAVA_OPTS] << '"'
params[:MAX_MAP_COUNT] = new_resource.memlock_limit

default_config_name = es_svc.service_name || es_svc.instance_name || new_resource.instance_name || 'elasticsearch'

Expand All @@ -110,12 +103,31 @@ def whyrun_supported?
shell_template.run_action(:create)
new_resource.updated_by_last_action(true) if shell_template.updated_by_last_action?

# Create jvm.options file
#
jvm_options_template = template 'jvm_options' do
path "#{new_resource.path_conf[es_install.type]}/jvm.options"
source new_resource.template_jvm_options
cookbook new_resource.cookbook_jvm_options
owner es_user.username
group es_user.groupname
mode 0644
variables(jvm_options: [
"-Xms#{new_resource.allocated_memory}",
"-Xmx#{new_resource.allocated_memory}",
new_resource.jvm_options
].flatten.join("\n"))
action :nothing
end
jvm_options_template.run_action(:create)
new_resource.updated_by_last_action(true) if jvm_options_template.updated_by_last_action?

# Create ES logging file
#
logging_template = template 'logging.yml' do
path "#{new_resource.path_conf[es_install.type]}/logging.yml"
source new_resource.template_logging_yml
cookbook new_resource.cookbook_logging_yml
logging_template = template 'log4j2_properties' do
path "#{new_resource.path_conf[es_install.type]}/log4j2.properties"
source new_resource.template_log4j2_properties
cookbook new_resource.cookbook_log4j2_properties
owner es_user.username
group es_user.groupname
mode 0644
Expand All @@ -125,6 +137,8 @@ def whyrun_supported?
logging_template.run_action(:create)
new_resource.updated_by_last_action(true) if logging_template.updated_by_last_action?

# Create ES elasticsearch.yml file
#
merged_configuration = default_configuration.merge(new_resource.configuration.dup)

# warn if someone is using symbols. we don't support.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def install_tarball_wrapper_action
owner es_user.username
group es_user.groupname
version determine_version(new_resource, node)
has_binaries ['bin/elasticsearch', 'bin/plugin']
has_binaries ['bin/elasticsearch', 'bin/elasticsearch-plugin']
checksum determine_download_checksum(new_resource, node)
prefix_root new_resource.dir[new_resource.type]
prefix_home new_resource.dir[new_resource.type]
Expand Down
Loading

0 comments on commit a9c60af

Please sign in to comment.