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

Puppet module fixes #546

Merged
merged 1 commit into from
Mar 1, 2019
Merged
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
10 changes: 6 additions & 4 deletions integrations/puppet-module/sysdig-falco/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
$service_enable = $falco::params::service_enable,
$service_restart = $falco::params::service_restart,
) inherits falco::params {

class { 'falco::repo': }
-> class { 'falco::install': }
-> class { 'falco::config': }
~> class { 'falco::service': }

contain falco::install
contain falco::config
contain falco::service

Class['::falco::install']
-> Class['::falco::config']
~> Class['::falco::service']
}
44 changes: 1 addition & 43 deletions integrations/puppet-module/sysdig-falco/manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,49 +1,7 @@
# == Class: falco::install
class falco::install inherits falco {
case $::osfamily {
'Debian': {
apt::source { 'sysdig':
location => 'http://download.draios.com/stable/deb',
release => 'stable-$(ARCH)/',
repos => '',
key => {
source => 'https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public',
id => 'D27A72F32D867DF9300A241574490FD6EC51E8C4'
},
}

ensure_packages(["linux-headers-${::kernelrelease}"])

$dependencies = [
Apt::Source['sysdig'],
Package["linux-headers-${::kernelrelease}"],
]
}
'RedHat': {
include 'epel'

yumrepo { 'sysdig':
baseurl => 'http://download.draios.com/stable/rpm/$basearch',
descr => 'Sysdig repository by Draios',
enabled => 1,
gpgcheck => 0,
}

ensure_packages(["kernel-devel-${::kernelrelease}"])

$dependencies = [
Yumrepo['sysdig'],
Class['epel']
]
}
default: {
$dependencies = []
}
}

package { 'falco':
ensure => $::falco::package_ensure,
require => $dependencies,
ensure => $::falco::package_ensure,
}

if ($::falco::file_output != undef) {
Expand Down
41 changes: 41 additions & 0 deletions integrations/puppet-module/sysdig-falco/manifests/repo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# == Class: falco::repo
class falco::repo inherits falco {
case $::osfamily {
'Debian': {
include apt::update

Apt::Source [ 'sysdig' ]
-> Class [ 'apt::update' ]

apt::source { 'sysdig':
location => 'http://download.draios.com/stable/deb',
release => 'stable-$(ARCH)/',
repos => '',
key => {
source => 'https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public',
id => 'D27A72F32D867DF9300A241574490FD6EC51E8C4'
},
}

ensure_packages(["linux-headers-${::kernelrelease}"])
}
'RedHat': {
include 'epel'

Yumrepo [ 'sysdig' ]
-> Class [ 'epel' ]

yumrepo { 'sysdig':
baseurl => 'http://download.draios.com/stable/rpm/$basearch',
descr => 'Sysdig repository by Draios',
enabled => 1,
gpgcheck => 0,
}

ensure_packages(["kernel-devel-${::kernelrelease}"])
}
default: {
fail("\"${module_name}\" provides no repository information for OSfamily \"${::osfamily}\"")
}
}
}
4 changes: 0 additions & 4 deletions integrations/puppet-module/sysdig-falco/manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@
enable => $falco::service_enable,
hasstatus => true,
hasrestart => $falco::service_restart,
require => [
Class['falco::install'],
Class['falco::config'],
]
}
}
2 changes: 1 addition & 1 deletion integrations/puppet-module/sysdig-falco/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sysdig-falco",
"version": "0.3.0",
"version": "0.4.0",
"author": "sysdig",
"summary": "Sysdig Falco: Behavioral Activity Monitoring With Container Support",
"license": "Apache-2.0",
Expand Down