Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash 7 #394

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 29 additions & 55 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
language: ruby

rvm:
- 2.3.4
- 2.4.1

script:
- docker run --privileged -d polarbearlabs/haveged:1.9.1 # https://github.com/elastic/logstash/issues/5507
Expand All @@ -29,66 +29,40 @@ script:

env:
global:
- LOGSTASH_VERSION=6.1.3
- LOGSTASH_VERSION=7.3.0
- BEAKER_PE_DIR=spec/fixtures/artifacts
- CI_SPEC_OPTIONS='--format documentation'
matrix:
# Do linting once.
- TRAVIS_LINT=true

# Run the puppet-rspec synthetic/unit tests.
- PUPPET_VERSION=4.6.2 TRAVIS_UNIT=true
- PUPPET_VERSION=4.8.2 TRAVIS_UNIT=true
- PUPPET_VERSION=4.9.4 TRAVIS_UNIT=true
- PUPPET_VERSION=4.10.8 TRAVIS_UNIT=true
- PUPPET_VERSION=5.0.1 TRAVIS_UNIT=true
- PUPPET_VERSION=5.1.0 TRAVIS_UNIT=true
- PUPPET_VERSION=5.2.0 TRAVIS_UNIT=true
- PUPPET_VERSION=5.3.3 TRAVIS_UNIT=true
- PUPPET_VERSION=4.10.12 TRAVIS_UNIT=true
- PUPPET_VERSION=5.5.16 TRAVIS_UNIT=true
- PUPPET_VERSION=6.0.10 TRAVIS_UNIT=true

# Then run the acceptance tests across the matrix.
- PUPPET_VERSION=4.6.2 BEAKER_set=centos-6
- PUPPET_VERSION=4.8.2 BEAKER_set=centos-6
- PUPPET_VERSION=4.8.2 BEAKER_set=centos-6 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=4.6.2 BEAKER_set=centos-7
- PUPPET_VERSION=4.7.0 BEAKER_set=centos-7
- PUPPET_VERSION=4.8.2 BEAKER_set=centos-7
- PUPPET_VERSION=4.9.4 BEAKER_set=centos-7
- PUPPET_VERSION=4.10.8 BEAKER_set=centos-7
- PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=5.3.3 BEAKER_set=centos-7
- PUPPET_VERSION=5.3.3 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=4.8.2 BEAKER_set=debian-7 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=4.6.2 BEAKER_set=debian-8
- PUPPET_VERSION=4.8.2 BEAKER_set=debian-8
- PUPPET_VERSION=4.9.4 BEAKER_set=debian-8
- PUPPET_VERSION=4.10.8 BEAKER_set=debian-8
- PUPPET_VERSION=4.10.8 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=5.3.3 BEAKER_set=debian-8
- PUPPET_VERSION=5.3.3 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=4.6.2 BEAKER_set=ubuntu-1404
- PUPPET_VERSION=4.8.2 BEAKER_set=ubuntu-1404
- PUPPET_VERSION=4.9.4 BEAKER_set=ubuntu-1404
- PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404
- PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404
- PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=4.6.2 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=4.8.2 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=4.9.4 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4

- PUPPET_VERSION=5.0.1 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=5.1.0 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=5.2.0 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4
- PUPPET_VERSION=4.10.12 BEAKER_set=centos-7
- PUPPET_VERSION=4.10.12 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=5.5.16 BEAKER_set=centos-7
- PUPPET_VERSION=5.5.16 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=6.0.10 BEAKER_set=centos-7
- PUPPET_VERSION=6.0.10 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2

- PUPPET_VERSION=4.10.12 BEAKER_set=debian-8
- PUPPET_VERSION=4.10.12 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=5.5.16 BEAKER_set=debian-8
- PUPPET_VERSION=5.5.16 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=6.0.10 BEAKER_set=debian-8
- PUPPET_VERSION=6.0.10 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2

# Logstash 7 and Puppet 6 are not supported on 14.04 (which is EOL).
- PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=6.8.2

- PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2
- PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604
- PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.3.4'
ruby '2.4.1'

puppetversion = ENV['PUPPET_VERSION'] || '4.10.7'
puppetversion = ENV['PUPPET_VERSION'] || '6.0.10'
gem 'puppet', puppetversion, :require => false

gem 'beaker', '3.15.0'
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile.d/manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
}

logstash::plugin { 'logstash-input-mysql':
environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g']
environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'],
}
4 changes: 2 additions & 2 deletions manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

Exec {
path => '/bin:/usr/bin',
cwd => '/tmp',
cwd => $logstash::home_dir,
user => $logstash::logstash_user,
timeout => 1800,
environment => $environment,
Expand Down Expand Up @@ -116,7 +116,7 @@
'absent': {
exec { "remove-${name}":
command => "${exe} remove ${name}",
onlyif => "${exe} list | grep -q ^${name}$",
onlyif => "${exe} list --installed | grep -q ^${name}$",
}
}

Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elastic-logstash",
"version": "6.1.5",
"version": "7.0.0",
"source": "https://github.com/elastic/puppet-logstash",
"author": "elastic",
"license": "Apache-2.0",
Expand All @@ -14,7 +14,7 @@
},
{
"name": "elastic/elastic_stack",
"version_requirement": ">=6.0.0 <7.0.0"
"version_requirement": ">=7.0.0 <8.0.0"
}
],
"operatingsystem_support": [
Expand Down
20 changes: 6 additions & 14 deletions spec/acceptance/class_plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ def remove(plugin)
end

context 'when a plugin is not installed' do
plugin = "logstash-output-riemann"
before(:each) do
remove('logstash-input-sqs')
remove(plugin)
end

it 'will not remove it again' do
log = ensure_plugin('absent', 'logstash-input-sqs').stdout
expect(log).to_not contain('remove-logstash-input-sqs')
log = ensure_plugin('absent', plugin).stdout
expect(log).to_not contain("remove-#{plugin}")
end

it 'can install it from rubygems' do
ensure_plugin('present', 'logstash-input-sqs')
expect(installed_plugins).to contain('logstash-input-sqs')
ensure_plugin('present', plugin)
expect(installed_plugins).to contain(plugin)
end
end

Expand All @@ -57,15 +58,6 @@ def remove(plugin)
end
end

if Gem::Version.new(LS_VERSION) >= Gem::Version.new('5.2.0')
it 'can install x-pack from an https url' do
plugin = 'x-pack'
source = "https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-#{LS_VERSION}.zip"
ensure_plugin('present', plugin, "source => '#{source}'")
expect(installed_plugins).to contain(plugin)
end
end

it 'can install a plugin from a "puppet://" url' do
plugin = 'logstash-output-cowthink'
source = "puppet:///modules/logstash/#{plugin}-5.0.0.gem"
Expand Down
17 changes: 0 additions & 17 deletions spec/acceptance/nodesets/centos-6-docker.yml

This file was deleted.

8 changes: 0 additions & 8 deletions spec/acceptance/nodesets/centos-6-vagrant.yml

This file was deleted.

1 change: 0 additions & 1 deletion spec/acceptance/nodesets/centos-6.yml

This file was deleted.

33 changes: 0 additions & 33 deletions spec/acceptance/nodesets/debian-7-docker.yml

This file was deleted.

9 changes: 0 additions & 9 deletions spec/acceptance/nodesets/debian-7-vagrant.yml

This file was deleted.

1 change: 0 additions & 1 deletion spec/acceptance/nodesets/debian-7.yml

This file was deleted.

31 changes: 0 additions & 31 deletions spec/acceptance/nodesets/ubuntu-1204-docker.yml

This file was deleted.

1 change: 0 additions & 1 deletion spec/acceptance/nodesets/ubuntu-1204.yml

This file was deleted.

10 changes: 3 additions & 7 deletions spec/acceptance/nodesets/ubuntu-1404-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@ HOSTS:
docker_image_commands:
- apt-get update
- apt-get install -yq apt-transport-https ruby ruby1.9.1-dev libaugeas-dev libaugeas-ruby lsb-release wget net-tools curl software-properties-common

# Install Oracle Java 8
- echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections
- echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections
- apt-add-repository ppa:webupd8team/java
- add-apt-repository ppa:openjdk-r/ppa
- apt-get update
- apt-get install -yq oracle-java8-installer
- apt-get install -yq oracle-java8-set-default
- apt-get install -yq openjdk-8-jdk-headless

docker_preserve_image: true

CONFIG:
Expand Down
9 changes: 1 addition & 8 deletions spec/acceptance/nodesets/ubuntu-1604.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ HOSTS:
docker_image_commands:
- apt-get update
- apt-get install -yq apt-transport-https ruby-dev libaugeas-dev ruby rubygems lsb-release wget net-tools curl software-properties-common

# Install Oracle Java 8
- echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections
- echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections
- apt-add-repository ppa:webupd8team/java
- apt-get update
- apt-get install -yq oracle-java8-installer
- apt-get install -yq oracle-java8-set-default
- apt-get install -yq openjdk-8-jdk-headless
docker_preserve_image: true
CONFIG:
type: foss
Expand Down