Skip to content

Commit

Permalink
Update default version to 2.4.1 with scala 2.12
Browse files Browse the repository at this point in the history
The old versions are no longer downloadable from the default download location.
Updating to the latest version is a breaking change.
  • Loading branch information
alexjfisher committed Mar 19, 2020
1 parent 3cc9d4a commit 7f08abf
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 71 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Expand Up @@ -10,9 +10,6 @@ script:
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
Expand All @@ -34,7 +31,7 @@ matrix:
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{image=centos:7.6.1810} BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
Expand Down
29 changes: 15 additions & 14 deletions Gemfile
Expand Up @@ -11,9 +11,8 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.6', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
gem 'rspec-puppet-facts', '>= 1.9.5', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
Expand All @@ -23,12 +22,11 @@ group :test do
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
gem 'parallel_tests', :require => false
end

Expand All @@ -44,27 +42,30 @@ group :system_tests do
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 3.9.0', :require => false
gem 'beaker', '>= 4.2.0', :require => false
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.10', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '~> 4', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl-libsodium', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '>= 1.0', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end


Expand All @@ -75,7 +76,7 @@ else
gem 'facter', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 5.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
4 changes: 2 additions & 2 deletions manifests/params.pp
Expand Up @@ -14,8 +14,8 @@
unless $facts['os']['family'] =~ /(RedHat|Debian)/ {
warning("${facts['os']['family']} is not supported")
}
$version = '0.11.0.3'
$scala_version = '2.11'
$version = '2.4.1'
$scala_version = '2.12'
$install_dir = "/opt/kafka-${scala_version}-${version}"
$config_dir = '/opt/kafka/config'
$bin_dir = '/opt/kafka/bin'
Expand Down
11 changes: 6 additions & 5 deletions spec/acceptance/broker_spec.rb
Expand Up @@ -3,7 +3,7 @@
describe 'kafka::broker' do
zookeeper = <<-EOS
if $::osfamily == 'RedHat' {
class { 'java': }
include java
exec { 'create pid dir':
command => '/bin/mkdir -p /var/run/',
Expand All @@ -20,10 +20,11 @@ class { 'zookeeper':
repo => 'cloudera',
cdhver => '5',
initialize_datastore => true,
service_provider => 'systemd',
}
} else {
class { 'zookeeper': }
include zookeeper
}
EOS

Expand Down Expand Up @@ -78,14 +79,14 @@ class { 'kafka::broker':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.12-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.1') }
end

describe file('/opt/kafka/config') do
Expand Down Expand Up @@ -156,7 +157,7 @@ class { 'kafka::broker':

pp = <<-EOS
class { 'kafka::broker':
version => '1.1.0',
version => '2.4.0',
config => {
'zookeeper.connect' => 'localhost:2181',
},
Expand Down
29 changes: 12 additions & 17 deletions spec/acceptance/consumer_spec.rb
Expand Up @@ -3,11 +3,10 @@
describe 'kafka::consumer' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::consumer':
service_config => {
topic => 'demo',
zookeeper => 'localhost:2181',
topic => 'demo',
bootstrap-server => 'localhost:9092',
},
}
EOS
Expand All @@ -20,11 +19,10 @@ class { 'kafka::consumer':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::consumer':
service_config => {
topic => 'demo',
zookeeper => 'localhost:2181',
topic => 'demo',
bootstrap-server => 'localhost:9092',
},
}
EOS
Expand All @@ -48,14 +46,14 @@ class { 'kafka::consumer':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.12-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.1') }
end

describe file('/opt/kafka/config') do
Expand All @@ -76,11 +74,10 @@ class { 'kafka::consumer':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::consumer':
service_config => {
topic => 'demo',
zookeeper => 'localhost:2181',
topic => 'demo',
bootstrap-server => 'localhost:9092',
},
}
EOS
Expand All @@ -100,11 +97,10 @@ class { 'kafka::consumer':
context 'with custom config_dir' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::consumer':
service_config => {
topic => 'demo',
zookeeper => 'localhost:2181',
topic => 'demo',
bootstrap-server => 'localhost:9092',
},
config_dir => '/opt/kafka/custom_config',
}
Expand All @@ -125,11 +121,10 @@ class { 'kafka::consumer':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::consumer':
service_config => {
topic => 'demo',
zookeeper => 'localhost:2181',
topic => 'demo',
bootstrap-server => 'localhost:9092',
},
}
EOS
Expand Down
20 changes: 10 additions & 10 deletions spec/acceptance/init_spec.rb
Expand Up @@ -36,14 +36,14 @@ class { 'kafka': }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.12-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.1') }
end

describe file('/opt/kafka/config') do
Expand All @@ -63,7 +63,7 @@ class { 'kafka': }
it 'works with no errors' do
pp = <<-EOS
class { 'kafka':
version => '1.1.0',
version => '2.4.0',
}
EOS

Expand All @@ -86,14 +86,14 @@ class { 'kafka':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-1.1.0') do
describe file('/opt/kafka-2.12-2.4.0') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-1.1.0') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.0') }
end

describe file('/opt/kafka/config') do
Expand All @@ -113,7 +113,7 @@ class { 'kafka':
it 'works with no errors' do
pp = <<-EOS
class { 'kafka':
scala_version => '2.11',
scala_version => '2.13',
}
EOS

Expand All @@ -136,14 +136,14 @@ class { 'kafka':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.13-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.13-2.4.1') }
end

describe file('/opt/kafka/config') do
Expand Down Expand Up @@ -186,14 +186,14 @@ class { 'kafka':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.12-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.1') }
end

describe file('/opt/kafka/custom_config') do
Expand Down
12 changes: 3 additions & 9 deletions spec/acceptance/mirror_spec.rb
Expand Up @@ -3,7 +3,6 @@
describe 'kafka::mirror' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
consumer_config => {
'group.id' => 'kafka-mirror',
Expand All @@ -23,7 +22,6 @@ class { 'kafka::mirror':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
consumer_config => {
'group.id' => 'kafka-mirror',
Expand Down Expand Up @@ -54,14 +52,14 @@ class { 'kafka::mirror':
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka-2.11-0.11.0.3') do
describe file('/opt/kafka-2.12-2.4.1') do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'kafka' }
it { is_expected.to be_grouped_into 'kafka' }
end

describe file('/opt/kafka') do
it { is_expected.to be_linked_to('/opt/kafka-2.11-0.11.0.3') }
it { is_expected.to be_linked_to('/opt/kafka-2.12-2.4.1') }
end

describe file('/opt/kafka/config') do
Expand All @@ -82,7 +80,6 @@ class { 'kafka::mirror':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
consumer_config => {
'group.id' => 'kafka-mirror',
Expand Down Expand Up @@ -113,7 +110,6 @@ class { 'kafka::mirror':
context 'with custom config_dir' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
consumer_config => {
'group.id' => 'kafka-mirror',
Expand Down Expand Up @@ -145,9 +141,8 @@ class { 'kafka::mirror':
context 'with specific version' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
version => '0.11.0.3',
version => '2.4.0',
consumer_config => {
'group.id' => 'kafka-mirror',
'zookeeper.connect' => 'localhost:2181',
Expand Down Expand Up @@ -179,7 +174,6 @@ class { 'kafka::mirror':
context 'with default parameters' do
it 'works with no errors' do
pp = <<-EOS
class { 'zookeeper': } ->
class { 'kafka::mirror':
consumer_config => {
'group.id' => 'kafka-mirror',
Expand Down

0 comments on commit 7f08abf

Please sign in to comment.