Skip to content

Commit

Permalink
Add newer checksums and docs, bump to ES 1.7.2
Browse files Browse the repository at this point in the history
Add a comment for `# sha256` near checksums, to help users. Fixes #351.
Bump to latest Elasticsearch version, since we're figuring out checksums anyway.
  • Loading branch information
martinb3 committed Sep 15, 2015
1 parent 5f57043 commit 68b0c4f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
16 changes: 9 additions & 7 deletions README.md
Expand Up @@ -68,8 +68,9 @@ elasticsearch_install 'my_es_installation' do
owner 'elasticsearch' # user and group to install under
group 'elasticsearch'
tarball_url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.tar.gz"
tarball_checksum "acf572c606552bc446cceef3f8e93814a363ba0d215b323a2864682b3abfbe45"
tarball_url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.2.tar.gz"
# sha256
tarball_checksum "6f81935e270c403681e120ec4395c28b2ddc87e659ff7784608b86beb5223dd2"
action :install # could be :remove as well
end
Expand All @@ -78,24 +79,25 @@ end
```
elasticsearch_install 'my_es_installation' do
type :tarball # type of install
version '1.5.0'
version '1.7.2'
action :install # could be :remove as well
end
```

```
elasticsearch_install 'my_es_installation' do
type :package # type of install
package_url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.deb"
package_checksum "15a02a2bea74da2330bb78718efb3a8f83a2b2e040a6ee859e100a6556981f36"
package_url "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.2.deb"
# sha256
package_checksum "791fb9f2131be2cf8c1f86ca35e0b912d7155a53f89c2df67467ca2105e77ec2"
action :install # could be :remove as well
end
```

```
elasticsearch_install 'my_es_installation' do
type :package # type of install
version "1.5.0"
version "1.7.2"
action :install # could be :remove as well
end
```
Expand Down Expand Up @@ -194,7 +196,7 @@ has to be provided:

```
elasticsearch_plugin 'mobz/elasticsearch-head' do
plugin_dir '/usr/local/awesome/elasticsearch-1.5.0/plugins'
plugin_dir '/usr/local/awesome/elasticsearch-1.7.2/plugins'
end
```
NB: You [may encounter issues on certain distros](http://blog.backslasher.net/java-ssl-crash.html) with NSS 3.16.1 and OpenJDK 7.x.
Expand Down
4 changes: 2 additions & 2 deletions libraries/helpers.rb
Expand Up @@ -18,9 +18,9 @@ def get_package_checksum(new_resource, node)

case node['platform_family']
when 'debian'
'15a02a2bea74da2330bb78718efb3a8f83a2b2e040a6ee859e100a6556981f36'
'791fb9f2131be2cf8c1f86ca35e0b912d7155a53f89c2df67467ca2105e77ec2'
when 'rhel'
'b72a9fb9a2c0471e8fe1a35373cdcfe39d29e72b7281bfccbdc32d03ee0eff70'
'c5410b88494d5cc9fdadf59353430b46c28e58eddc5c610ea4c4516eacc2fa09'
end
end

Expand Down
4 changes: 2 additions & 2 deletions libraries/resource_install.rb
Expand Up @@ -10,7 +10,7 @@ class Resource::ElasticsearchInstall < Resource
default_action :install

attribute(:type, kind_of: Symbol, :equal_to => [:tarball, :package], default: :tarball)
attribute(:version, kind_of: String, default: '1.5.0')
attribute(:version, kind_of: String, default: '1.7.2')

# attributes used by the package-flavor provider
attribute(:package_url, kind_of: String, default: nil)
Expand All @@ -19,7 +19,7 @@ class Resource::ElasticsearchInstall < Resource

# attributes used by the tarball-flavor provider
attribute(:tarball_url, kind_of: String, default: lazy { "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-#{version}.tar.gz" } )
attribute(:tarball_checksum, kind_of: String, default: 'acf572c606552bc446cceef3f8e93814a363ba0d215b323a2864682b3abfbe45')
attribute(:tarball_checksum, kind_of: String, default: '6f81935e270c403681e120ec4395c28b2ddc87e659ff7784608b86beb5223dd2')
attribute(:dir, kind_of: String, default: nil)
attribute(:owner, kind_of: String, default: 'elasticsearch')
attribute(:group, kind_of: String, default: 'elasticsearch')
Expand Down
Expand Up @@ -58,7 +58,7 @@
elasticsearch_plugin 'mobz/elasticsearch-head' do
user 'foo'
group 'bar'
plugin_dir '/usr/local/awesome/elasticsearch-1.5.0/plugins'
plugin_dir '/usr/local/awesome/elasticsearch-1.7.2/plugins'
end

elasticsearch_service 'elasticsearch-crazy' do
Expand Down
4 changes: 2 additions & 2 deletions test/integration/default/serverspec/install_spec.rb
@@ -1,7 +1,7 @@
require_relative 'spec_helper'

# normal elasticsearch install with defaults
describe file('/usr/local/elasticsearch-1.5.0') do
describe file('/usr/local/elasticsearch-1.7.2') do
it { should be_directory }
end

Expand All @@ -11,5 +11,5 @@

describe file('/usr/local/bin/elasticsearch') do
it { should be_symlink }
it { should be_linked_to('/usr/local/elasticsearch-1.5.0/bin/elasticsearch') }
it { should be_linked_to('/usr/local/elasticsearch-1.7.2/bin/elasticsearch') }
end
Expand Up @@ -8,7 +8,7 @@
end

# source install test
describe file('/usr/local/awesome/elasticsearch-1.5.0') do
describe file('/usr/local/awesome/elasticsearch-1.7.2') do
it { should be_directory }
it { should be_owned_by 'foo' }
it { should be_grouped_into 'bar' }
Expand All @@ -20,5 +20,5 @@

describe file('/usr/local/bin/elasticsearch') do
it { should be_symlink }
it { should be_linked_to('/usr/local/awesome/elasticsearch-1.5.0/bin/elasticsearch') }
it { should be_linked_to('/usr/local/awesome/elasticsearch-1.7.2/bin/elasticsearch') }
end

0 comments on commit 68b0c4f

Please sign in to comment.