20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ matrix:
bundler_args:
script: bundle exec rake beaker
stage: acceptance
- rvm: 2.4.5
services: docker
env: BEAKER_set="centos-8" BEAKER_PUPPET_COLLECTION=puppet5
bundler_args:
script: bundle exec rake beaker
stage: acceptance
- rvm: 2.5.7
services: docker
env: BEAKER_set="centos-8" BEAKER_PUPPET_COLLECTION=puppet6
bundler_args:
script: bundle exec rake beaker
stage: acceptance
- rvm: 2.5.7
services: docker
env: BEAKER_sensu_ci_build=yes BEAKER_set="centos-8" BEAKER_PUPPET_COLLECTION=puppet6
bundler_args:
script: bundle exec rake beaker
stage: acceptance
- rvm: 2.4.5
services: docker
env: BEAKER_set="debian-9" BEAKER_PUPPET_COLLECTION=puppet5
Expand Down Expand Up @@ -260,6 +278,8 @@ matrix:
env: BEAKER_sensu_ci_build=yes BEAKER_set="centos-7" BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_sensu_full=yes
- rvm: 2.5.7
env: BEAKER_sensu_ci_build=yes BEAKER_set="centos-7-cluster" BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_sensu_cluster=yes
- rvm: 2.5.7
env: BEAKER_sensu_ci_build=yes BEAKER_set="centos-8" BEAKER_PUPPET_COLLECTION=puppet6
- rvm: 2.5.7
env: BEAKER_sensu_ci_build=yes BEAKER_set="debian-9" BEAKER_PUPPET_COLLECTION=puppet6
- rvm: 2.5.7
Expand Down
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [v4.5.0](https://github.com/sensu/sensu-puppet/tree/v4.5.0) (2020-02-07)

[Full Changelog](https://github.com/sensu/sensu-puppet/compare/v4.4.1...v4.5.0)

### Added

- Update puppet-strings examples for composite names [\#1211](https://github.com/sensu/sensu-puppet/pull/1211) ([treydock](https://github.com/treydock))
- Support EL8 [\#1208](https://github.com/sensu/sensu-puppet/pull/1208) ([treydock](https://github.com/treydock))

## [v4.4.1](https://github.com/sensu/sensu-puppet/tree/v4.4.1) (2020-02-01)

[Full Changelog](https://github.com/sensu/sensu-puppet/compare/v4.4.0...v4.4.1)
Expand Down Expand Up @@ -239,12 +248,6 @@
### Added

- \(GH-1111\) Remove Ubuntu 14.04 LTS as it is end of life \(EOL\) [\#1112](https://github.com/sensu/sensu-puppet/pull/1112) ([ghoneycutt](https://github.com/ghoneycutt))
- Add Windows support for Sensu Go agent [\#1108](https://github.com/sensu/sensu-puppet/pull/1108) ([treydock](https://github.com/treydock))

### Fixed

- Fix repo path for EL vagrant [\#1110](https://github.com/sensu/sensu-puppet/pull/1110) ([treydock](https://github.com/treydock))
- Fix cluster tests to work with Sensu Go 5.7 [\#1109](https://github.com/sensu/sensu-puppet/pull/1109) ([treydock](https://github.com/treydock))

## [v3.2.0](https://github.com/sensu/sensu-puppet/tree/v3.2.0) (2019-05-06)

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ end

group :system_tests do
gem 'beaker', :require => false
gem 'beaker-docker', :require => false
gem "beaker-docker", :require => false
gem 'beaker-module_install_helper', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1085,9 +1085,10 @@ Linux.

* EL 6
* EL 7
* EL 8
* Debian 8
* Debian 9
* Debian 10 (Puppet 6 only)
* Debian 10
* Ubuntu 16.04 LTS
* Ubuntu 18.04 LTS
* Amazon 2018.03
Expand Down
25 changes: 25 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,15 @@ sensu_asset { 'test':
}
```

##### Create an asset with composite name in `dev` namespace

```puppet
sensu_asset { 'test in dev':
ensure => 'present',
builds => ...
}
```

#### Properties

The following properties are available in the `sensu_asset` type.
Expand Down Expand Up @@ -1435,6 +1444,14 @@ sensu_bonsai_asset { 'sensu/sensu-pagerduty-handler':
}
```

##### Install a bonsai asset into `dev` namespace using composite names

```puppet
sensu_bonsai_asset { 'sensu/sensu-pagerduty-handler in dev':
ensure => 'present',
}
```

#### Properties

The following properties are available in the `sensu_bonsai_asset` type.
Expand Down Expand Up @@ -1773,6 +1790,14 @@ sensu_cluster_federation_member { 'http://10.0.0.1:8080':
}
```

##### Add to a federated cluster to `us-west-2a` cluster using composite name

```puppet
sensu_cluster_federation_member { 'http://10.0.0.1:8080 in us-west-2a':
ensure => 'present',
}
```

#### Properties

The following properties are available in the `sensu_cluster_federation_member` type.
Expand Down
12 changes: 12 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
backend.vm.provision :shell, :inline => "puppet apply /vagrant/tests/sensu-backend-federated-cluster.pp"
end

config.vm.define "el8-agent", autostart: true do |agent|
agent.vm.box = "centos/8"
# TODO: Using specific box until CentOS 8.1 box is used for centos/8
# https://github.com/dotless-de/vagrant-vbguest/issues/367
agent.vm.box_url = "http://cloud.centos.org/centos/8/x86_64/images/CentOS-8-Vagrant-8.1.1911-20200113.3.x86_64.vagrant-virtualbox.box"
agent.vm.hostname = 'el8-agent.example.com'
agent.vm.network :private_network, ip: "192.168.52.32"
agent.vm.provision :shell, :path => "tests/provision_basic_el.sh"
agent.vm.provision :shell, :inline => "puppet apply /vagrant/tests/sensu-agent.pp"
agent.vm.provision :shell, :inline => "facter --custom-dir=/vagrant/lib/facter sensu_agent"
end

config.vm.define "el7-agent", autostart: true do |agent|
agent.vm.box = "centos/7"
agent.vm.hostname = 'el7-agent.example.com'
Expand Down
6 changes: 6 additions & 0 deletions lib/puppet/type/sensu_asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
],
}
@example Create an asset with composite name in `dev` namespace
sensu_asset { 'test in dev':
ensure => 'present',
builds => ...
}
**Autorequires**:
* `Package[sensu-go-cli]`
* `Service[sensu-backend]`
Expand Down
5 changes: 5 additions & 0 deletions lib/puppet/type/sensu_bonsai_asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
version => 'latest',
}
@example Install a bonsai asset into `dev` namespace using composite names
sensu_bonsai_asset { 'sensu/sensu-pagerduty-handler in dev':
ensure => 'present',
}
**Autorequires**:
* `Package[sensu-go-cli]`
* `Service[sensu-backend]`
Expand Down
5 changes: 5 additions & 0 deletions lib/puppet/type/sensu_cluster_federation_member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
cluster => 'us-west-2a',
}
@example Add to a federated cluster to `us-west-2a` cluster using composite name
sensu_cluster_federation_member { 'http://10.0.0.1:8080 in us-west-2a':
ensure => 'present',
}
**Autorequires**:
* `Package[sensu-go-cli]`
* `Service[sensu-backend]`
Expand Down
13 changes: 13 additions & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
sslcacert => '/etc/pki/tls/certs/ca-bundle.crt',
metadata_expire => 300,
}
if String($repo_release) == '8' {
# This exec ensures GPG key is added without errors
# Initial GPG download for dnf appears to return no exit code, tries=2 is workaround
# This is method used by upstream Package Cloud scripts and will download GPG key
# https://packagecloud.io/sensu/stable/install#bash-rpm
exec { 'dnf makecache sensu':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
command => "dnf -q makecache -y --disablerepo='*' --enablerepo='sensu'",
refreshonly => true,
tries => 2,
subscribe => Yumrepo['sensu'],
}
}
}
if $facts['os']['family'] == 'Debian' {
apt::source { 'sensu':
Expand Down
13 changes: 13 additions & 0 deletions manifests/repo/community.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@
sslcacert => '/etc/pki/tls/certs/ca-bundle.crt',
sslverify => 1,
}
if String($repo_release) == '8' {
# This exec ensures GPG key is added without errors
# Initial GPG download for dnf appears to return no exit code, tries=2 is workaround
# This is method used by upstream Package Cloud scripts and will download GPG key
# https://packagecloud.io/sensu/stable/install#bash-rpm
exec { 'dnf makecache sensu_community':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
command => "dnf -q makecache -y --disablerepo='*' --enablerepo='sensu_community'",
refreshonly => true,
tries => 2,
subscribe => Yumrepo['sensu_community'],
}
}
}
if $facts['os']['family'] == 'Debian' {
apt::source { 'sensu_community':
Expand Down
8 changes: 5 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sensu-sensu",
"version": "4.4.1",
"version": "4.5.0",
"author": "sensu",
"summary": "A module to install the Sensu monitoring framework",
"license": "MIT",
Expand All @@ -18,14 +18,16 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/04_plugins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
if fact_on(agent, 'operatingsystem') == 'Debian'
skip("TODO: package is missing on Debian - See https://github.com/sensu/sensu-plugins-omnibus/issues/3")
end
if fact_on(agent, 'os.family') == 'RedHat' && fact_on(agent, 'os.release.major') == '8'
skip("TODO: package is missing on EL8 - See https://github.com/sensu/sensu-plugins-omnibus/issues/5")
end
end
context 'on agent' do
it 'should work without errors and be idempotent' do
Expand Down
35 changes: 35 additions & 0 deletions spec/acceptance/nodesets/centos-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
HOSTS:
sensu_agent:
roles:
- agent
- sensu_agent
platform: el-8-x86_64
hypervisor: docker
image: centos:8
docker_preserve_image: true
docker_cmd:
- '/usr/sbin/init'
docker_image_commands:
- 'dnf install -y wget which initscripts iproute'
docker_container_name: 'sensu-agent-el8'
sensu_backend:
roles:
- agent
- sensu_backend
- puppetserver
- default
platform: el-8-x86_64
hypervisor: docker
image: centos:8
docker_preserve_image: true
docker_cmd:
- '/usr/sbin/init'
docker_image_commands:
- 'dnf install -y wget which initscripts iproute'
docker_container_name: 'sensu-backend-el8'
CONFIG:
log_level: debug
type: foss
ssh:
password: root
auth_methods: ["password"]
2 changes: 1 addition & 1 deletion spec/classes/agent_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::agent', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
let(:node) { 'localhost' }
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/api_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::api', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
let(:node) { 'test.example.com' }
Expand Down
4 changes: 1 addition & 3 deletions spec/classes/backend_datastore_postgresql_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
require 'spec_helper'

describe 'sensu::backend::datastore::postgresql', :type => :class do
on_supported_os({
facterversion: '3.8.0',
}).each do |os, facts|
on_supported_os.each do |os, facts|
if facts[:os]['family'] == 'windows'
next
end
Expand Down
1 change: 0 additions & 1 deletion spec/classes/backend_default_resources_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

describe 'sensu::backend::default_resources', :type => :class do
on_supported_os({
facterversion: '3.8.0',
supported_os: [{ 'operatingsystem' => 'RedHat', 'operatingsystemrelease' => ['7'] }]
}).each do |os, facts|
context "on #{os}" do
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/backend_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::backend', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
# Windows is not supported for backend
if facts[:os]['family'] == 'windows'
next
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/cli_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::cli', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
let(:node) { 'test.example.com' }
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/common_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::common', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
context 'with default values for all parameters' do
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
context 'with default values for all parameters' do
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/plugins_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe 'sensu::plugins', :type => :class do
on_supported_os({facterversion: '3.8.0'}).each do |os, facts|
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
if facts[:os]['family'] == 'windows'
Expand Down
Loading