Skip to content

Commit

Permalink
Resolve EE Download location with 2.0.8 versions and higher (#191)
Browse files Browse the repository at this point in the history
* Change version check logic for new Enterprise download location with version 2.0.8 forward.  Fixes #190

* Update CHANGELOG and version information

* Uprev Kitchen test dependencies.

* Update travis to use ruby 2.3.1 to resolve nio4r issue

* Resolve Debian Link changes to using code name for later package releases

* Updated test kitchen and vagrant to latest
Updated image reference locations for supported platforms
Removed FreeBSD 9.3 platform due to FreeBSD EOL
  • Loading branch information
mikedotson authored Mar 13, 2017
1 parent 7e5fffa commit 5b26e4f
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .kitchen.cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ url = "http://s3.amazonaws.com/downloads.basho.com/riak/#{maj}.#{min}"

provisioner:
name: chef_zero
require_chef_omnibus: 12.3.0
require_chef_omnibus: 12.6.0

platforms:
- name: amazon-2014.09.01
Expand Down
28 changes: 7 additions & 21 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ url = "http://s3.amazonaws.com/downloads.basho.com/riak/#{maj}.#{min}"
---
driver:
name: vagrant
require_chef_omnibus: 12.3.0
require_chef_omnibus: 12.6.0
customize:
memory: 512

Expand Down Expand Up @@ -41,15 +41,15 @@ platforms:
package:
local:
url: "<%= url %>/<%= version %>/debian/7"
- name: centos-7.1
- name: centos-7.3
run_list:
- recipe[yum-epel]
attributes:
riak:
package:
local:
url: "<%= url %>/<%= version %>/rhel/7"
- name: centos-6.6
- name: centos-6.8
run_list:
- recipe[yum-epel]
attributes:
Expand All @@ -65,28 +65,14 @@ platforms:
package:
local:
url: "<%= url %>/<%= version %>/rhel/5"
- name: freebsd-10.1
driver:
guest: ":freebsd"
vagrantfile_erb: vagrantfile_bsd.erb
- name: freebsd-10.3
run_list:
- recipe[freebsd::portsnap]
attributes:
riak:
package:
local:
url: "<%= url %>/<%= version %>/freebsd/10"
- name: freebsd-9.3
driver:
guest: ":freebsd"
vagrantfile_erb: vagrantfile_bsd.erb
run_list:
- recipe[freebsd::portsnap]
attributes:
riak:
package:
local:
url: "<%= url %>/<%= version %>/freebsd/9.2"
suites:
- name: default
run_list:
Expand All @@ -113,7 +99,7 @@ suites:
incremental: <%= inc %>
config:
search.top_level: "on"
excludes: ["freebsd-10.1", "freebsd-9.3"]
excludes: ["freebsd-10.3"]
- name: enterprise
run_list:
- recipe[riak::sysctl]
Expand Down Expand Up @@ -146,8 +132,8 @@ suites:
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
excludes: ["freebsd-10.1", "freebsd-9.3"]
excludes: ["freebsd-10.3"]
- name: sysctl
run_list:
- recipe[riak::sysctl]
excludes: ["freebsd-10.1", "freebsd-9.3"]
excludes: ["freebsd-10.3"]
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: ruby

rvm:
- 2.1.0
- 2.3.1

bundler_args: --jobs 7 --without kitchen_vagrant --without development

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v3.1.4

* Fix URL location for new EE package locations

## v3.1.3

* Fix config content to be lazily evaluated
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ group :lint do
end

group :unit do
gem 'berkshelf', '~> 3.2.3'
gem 'berkshelf', '~> 4.0'
gem 'chefspec', '~> 4.0'
end

group :kitchen_common do
gem 'test-kitchen', '~> 1.3.1'
gem 'test-kitchen', '~> 1.16.0'
end

group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.15'
gem 'kitchen-vagrant', '~> 1.0.2'
end

group :kitchen_cloud do
Expand Down
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
require 'bundler/setup'

module TempFixForRakeLastComment
def last_comment
last_description
end
end
Rake::Application.send :include, TempFixForRakeLastComment

# Style tests. Rubocop and Foodcritic
namespace :style do
require 'rubocop/rake_task'
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'Installs and configures Riak distributed data store'
version '3.1.3'
version '3.1.4'

recipe 'riak', 'Installs Riak from a package'
recipe 'riak::source', 'Installs Erlang and Riak from source'
Expand Down
6 changes: 3 additions & 3 deletions recipes/java.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#

node.default['java']['install_flavor'] = 'oracle'
node.default['java']['jdk_version'] = 7
node.default['java']['jdk']['7']['x86_64']['url'] = 'http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-x64.tar.gz'
node.default['java']['jdk']['7']['x86_64']['checksum'] = '83ba05e260813f7a9140b76e3d37ea33'
node.default['java']['jdk_version'] = 8
node.default['java']['jdk']['8']['x86_64']['url'] = 'http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz'
node.default['java']['jdk']['8']['x86_64']['checksum'] = '97e30203f1aef324a07c94d9d078f5d19bb6c50e638e4492722debca588210bc'
node.default['java']['oracle']['accept_oracle_download_terms'] = true

include_recipe 'java'
11 changes: 9 additions & 2 deletions recipes/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
install_method = node['platform'] == 'freebsd' || oss_or_ee == 'riak-ee' ? 'custom_package' : node['riak']['install_method']
plat_ver_int = node['platform_version'].to_i

# Enterprise download URL changed with release of 2.1
if major_minor.to_f >= 2.1
# Enterprise download URL changed with release of 2.0.8 and greater
if Gem::Version.new(version_str) >= Gem::Version.new('2.0.8')
ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{version_str}"
else
ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{major_minor}/#{version_str}"
Expand Down Expand Up @@ -69,6 +69,13 @@
when 'debian'
package_file = "#{oss_or_ee}_#{package_version}_amd64.deb"
ee_url_suffix = "/debian/#{plat_ver_int}/#{package_file}"
if Gem::Version.new(version_str) >= Gem::Version.new('2.2.0')
ee_url_suffix = "/debian/#{node['lsb']['codename']}/#{package_file}"
end
if Gem::Version.new(version_str) >= Gem::Version.new('2.0.8') &&
Gem::Version.new(version_str) < Gem::Version.new('2.1.0')
ee_url_suffix = "/debian/#{node['lsb']['codename']}/#{package_file}"
end
when 'ubuntu'
package_file = "#{oss_or_ee}_#{package_version}_amd64.deb"
ee_url_suffix = "/ubuntu/#{node['lsb']['codename']}/#{package_file}"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/search/serverspec/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
end

describe command('java -version') do
its(:stdout) { is_expected.to match(/java version "1.7.0_25"/) }
its(:stderr) { is_expected.to match(/java version "1.8.0_121"/) }
end

describe process('java') do
Expand Down

0 comments on commit 5b26e4f

Please sign in to comment.