From 5b26e4f090410ce44cd6334be7d0fb4a458d2ee4 Mon Sep 17 00:00:00 2001 From: Mike Dotson Date: Mon, 13 Mar 2017 08:50:53 -0600 Subject: [PATCH] Resolve EE Download location with 2.0.8 versions and higher (#191) * 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 --- .kitchen.cloud.yml | 2 +- .kitchen.yml | 28 +++++-------------- .travis.yml | 2 +- CHANGELOG.md | 4 +++ Gemfile | 6 ++-- Rakefile | 7 +++++ metadata.rb | 2 +- recipes/java.rb | 6 ++-- recipes/package.rb | 11 ++++++-- .../search/serverspec/search_spec.rb | 2 +- 10 files changed, 37 insertions(+), 33 deletions(-) diff --git a/.kitchen.cloud.yml b/.kitchen.cloud.yml index 959d9dc..8962b4b 100644 --- a/.kitchen.cloud.yml +++ b/.kitchen.cloud.yml @@ -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 diff --git a/.kitchen.yml b/.kitchen.yml index 9bffb66..d5756f9 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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 @@ -41,7 +41,7 @@ platforms: package: local: url: "<%= url %>/<%= version %>/debian/7" -- name: centos-7.1 +- name: centos-7.3 run_list: - recipe[yum-epel] attributes: @@ -49,7 +49,7 @@ platforms: package: local: url: "<%= url %>/<%= version %>/rhel/7" -- name: centos-6.6 +- name: centos-6.8 run_list: - recipe[yum-epel] attributes: @@ -65,10 +65,7 @@ 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: @@ -76,17 +73,6 @@ platforms: 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: @@ -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] @@ -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"] diff --git a/.travis.yml b/.travis.yml index f61eaaa..ed45274 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: ruby rvm: - - 2.1.0 + - 2.3.1 bundler_args: --jobs 7 --without kitchen_vagrant --without development diff --git a/CHANGELOG.md b/CHANGELOG.md index 77f9a72..8faea83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Gemfile b/Gemfile index 5ec1814..edbefea 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Rakefile b/Rakefile index c321d90..4cea8ef 100644 --- a/Rakefile +++ b/Rakefile @@ -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' diff --git a/metadata.rb b/metadata.rb index a6164a0..33f605b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -22,7 +22,7 @@ maintainer_email 'riak@basho.com' 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' diff --git a/recipes/java.rb b/recipes/java.rb index c17ea28..011d165 100644 --- a/recipes/java.rb +++ b/recipes/java.rb @@ -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' diff --git a/recipes/package.rb b/recipes/package.rb index 465285a..36542a0 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -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}" @@ -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}" diff --git a/test/integration/search/serverspec/search_spec.rb b/test/integration/search/serverspec/search_spec.rb index 4ddc0b7..fa78355 100644 --- a/test/integration/search/serverspec/search_spec.rb +++ b/test/integration/search/serverspec/search_spec.rb @@ -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