diff --git a/.travis.yml b/.travis.yml index 4dea8ed4..8b275be0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -29,7 +29,7 @@ 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: @@ -37,58 +37,32 @@ env: - 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 diff --git a/Gemfile b/Gemfile index 22af19d7..8cbe3d54 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Vagrantfile.d/manifests/site.pp b/Vagrantfile.d/manifests/site.pp index d2d0eaae..fdf0e1b0 100644 --- a/Vagrantfile.d/manifests/site.pp +++ b/Vagrantfile.d/manifests/site.pp @@ -32,5 +32,5 @@ } logstash::plugin { 'logstash-input-mysql': - environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'] + environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'], } diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 23799b66..41049f2c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -48,7 +48,7 @@ Exec { path => '/bin:/usr/bin', - cwd => '/tmp', + cwd => $logstash::home_dir, user => $logstash::logstash_user, timeout => 1800, environment => $environment, @@ -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}$", } } diff --git a/metadata.json b/metadata.json index 693c9257..59ba3817 100644 --- a/metadata.json +++ b/metadata.json @@ -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", @@ -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": [ diff --git a/spec/acceptance/class_plugin_spec.rb b/spec/acceptance/class_plugin_spec.rb index b9fdd2f3..264e0004 100644 --- a/spec/acceptance/class_plugin_spec.rb +++ b/spec/acceptance/class_plugin_spec.rb @@ -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 @@ -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" diff --git a/spec/acceptance/nodesets/centos-6-docker.yml b/spec/acceptance/nodesets/centos-6-docker.yml deleted file mode 100644 index 27c8a17b..00000000 --- a/spec/acceptance/nodesets/centos-6-docker.yml +++ /dev/null @@ -1,17 +0,0 @@ -HOSTS: - centos-6-x64: - roles: [agent, database, dashboard, master] - platform: el-6-x86_64 - image: library/centos:6 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - rm /etc/init/tty.conf - - yum install -y wget ntpdate redhat-lsb-core redhat-lsb rubygems ruby-augeas ruby-devel augeas-devel logrotate - - touch /etc/sysconfig/network - - 'cd / && wget -q --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jre-8u131-linux-x64.rpm"' - - 'cd / && yum localinstall -y jre-8u131-linux-x64.rpm' - docker_preserve_image: true -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/centos-6-vagrant.yml b/spec/acceptance/nodesets/centos-6-vagrant.yml deleted file mode 100644 index 45646cdb..00000000 --- a/spec/acceptance/nodesets/centos-6-vagrant.yml +++ /dev/null @@ -1,8 +0,0 @@ -HOSTS: - centos-6-x64: - platform: el-6-x86_64 - box: puppetlabs/centos-6.6-64-nocm - hypervisor: vagrant -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/centos-6.yml b/spec/acceptance/nodesets/centos-6.yml deleted file mode 120000 index 2aced8ba..00000000 --- a/spec/acceptance/nodesets/centos-6.yml +++ /dev/null @@ -1 +0,0 @@ -centos-6-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/debian-7-docker.yml b/spec/acceptance/nodesets/debian-7-docker.yml deleted file mode 100644 index 727c1284..00000000 --- a/spec/acceptance/nodesets/debian-7-docker.yml +++ /dev/null @@ -1,33 +0,0 @@ -HOSTS: - debian-7: - roles: [agent, database, dashboard, master] - platform: debian-7-amd64 - image: debian:7 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - # The base image contains a stub shell script in place of '/sbin/initctl' which - # confuses the heck out of Pleaserun when installing Logstash. - # REF: https://github.com/jordansissel/pleaserun/blob/master/lib/pleaserun/detector.rb - - rm /sbin/initctl - - - apt-get update - - apt-get -y upgrade - - apt-get install -yq apt-transport-https lsb-release wget net-tools ruby rubygems ruby1.8-dev libaugeas-dev libaugeas-ruby ntpdate locales-all logrotate procps - - # Install Oracle Java 8 - - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list - - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list - - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 - - apt-get -y update - - 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-get install -yq oracle-java8-installer - - apt-get install -yq oracle-java8-set-default - - - REALLY_GEM_UPDATE_SYSTEM=1 gem update --system --no-ri --no-rdoc - docker_preserve_image: true - -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/debian-7-vagrant.yml b/spec/acceptance/nodesets/debian-7-vagrant.yml deleted file mode 100644 index 3af37c1b..00000000 --- a/spec/acceptance/nodesets/debian-7-vagrant.yml +++ /dev/null @@ -1,9 +0,0 @@ -HOSTS: - debian-7: - roles: [agent, database, dashboard, master] - platform: debian-7-amd64 - box: puppetlabs/debian-7.8-64-nocm - hypervisor: vagrant -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/debian-7.yml b/spec/acceptance/nodesets/debian-7.yml deleted file mode 120000 index 098c1b6a..00000000 --- a/spec/acceptance/nodesets/debian-7.yml +++ /dev/null @@ -1 +0,0 @@ -debian-7-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/ubuntu-1204-docker.yml b/spec/acceptance/nodesets/ubuntu-1204-docker.yml deleted file mode 100644 index 1cda899b..00000000 --- a/spec/acceptance/nodesets/ubuntu-1204-docker.yml +++ /dev/null @@ -1,31 +0,0 @@ -HOSTS: - ubuntu-12-04: - roles: - - master - - database - - dashboard - platform: ubuntu-12.04-amd64 - image: library/ubuntu:12.04 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - # The base image disables Upstart, which is the "right thing" to do for - # containers. However, we actually want Upstart, because we are trying - # to simulate a full system. Thus, we undo the magic from upstream's - # Dockerfile. - # REF: https://github.com/tianon/docker-brew-ubuntu-core/blob/aec74cf404240664b289d28948d9284a4afd1181/precise/Dockerfile#L14 - - rm /sbin/initctl - - dpkg-divert --rename --remove /sbin/initctl - - - apt-get install -yq apt-transport-https ruby1.8-dev libaugeas-dev libaugeas-ruby ruby rubygems lsb-release wget net-tools curl python-software-properties - - # 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 - docker_preserve_image: true -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/ubuntu-1204.yml b/spec/acceptance/nodesets/ubuntu-1204.yml deleted file mode 120000 index 6489cd84..00000000 --- a/spec/acceptance/nodesets/ubuntu-1204.yml +++ /dev/null @@ -1 +0,0 @@ -ubuntu-1204-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/ubuntu-1404-docker.yml b/spec/acceptance/nodesets/ubuntu-1404-docker.yml index 63e6c7b1..36ca4caa 100644 --- a/spec/acceptance/nodesets/ubuntu-1404-docker.yml +++ b/spec/acceptance/nodesets/ubuntu-1404-docker.yml @@ -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: diff --git a/spec/acceptance/nodesets/ubuntu-1604.yml b/spec/acceptance/nodesets/ubuntu-1604.yml index 54896dbb..8082f54c 100644 --- a/spec/acceptance/nodesets/ubuntu-1604.yml +++ b/spec/acceptance/nodesets/ubuntu-1604.yml @@ -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