Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tripwire/chef-tripwire_agent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: Tripwire/chef-tripwire_agent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 20, 2019

  1. Update README.md

    Fix syntax errors in Chef examples
    
    The example uses what is normally valid Ruby literal Hash syntax, but in context Ruby believes it's the beginning of a script block and errors out. Update it to remove the curly braces, which makes Ruby properly recognize it as a Hash.
    pfaffle authored May 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    78634c9 View commit details
  2. Merge pull request #38 from Tripwire/pfaffle-patch-1

    Update README.md
    bespokebob authored May 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b5ed1dc View commit details

Commits on Aug 14, 2020

  1. Axon recipe is selecting the wrong driver (Issue #37)

    This change addresses following issues :
    
    1. the recent TGZ from Tripwire contains drivers for DKMS, RHEL and SUSE. The code on line 151 of axon.rb appears to select the first matching entry in the directory, which is SUSE,
    
    2. additionally, 'use_dkms_driver' attribute was not handled in 'axon_agent' recipe. Due to which, it always picked the default value i.e. 'false',
    pbisht-lab committed Aug 14, 2020
    Copy the full SHA
    9d70e09 View commit details
  2. Merge pull request #39 from pbisht-lab/pankaj/issue37_wrong-axon-driver

    Axon recipe is selecting the wrong eg-driver (Issue #37)
    kraigstrong authored Aug 14, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a2cbf3d View commit details

Commits on Oct 21, 2020

  1. added support for Oracle UEK

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Oct 21, 2020
    Copy the full SHA
    6a54255 View commit details
  2. handle for rhck and uek

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Oct 21, 2020
    Copy the full SHA
    165857a View commit details

Commits on Oct 23, 2020

  1. address review comments

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Oct 23, 2020
    Copy the full SHA
    d482881 View commit details
  2. Merge pull request #40 from abhardwaj-lab/abhardwaj_add_support_for_U…

    …EK_axon_agent
    
    Abhardwaj add support to install axon agent on Orcale UEK
    kraigstrong authored Oct 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ca1ab0e View commit details

Commits on Oct 30, 2020

  1. handled code to install axonagent on suse12

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Oct 30, 2020
    Copy the full SHA
    2c347c4 View commit details
  2. upgraded version in metedata.rb file

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Oct 30, 2020
    Copy the full SHA
    1eddddb View commit details

Commits on Nov 2, 2020

  1. Merge pull request #41 from abhardwaj-lab/add_support_for_suse12

    Handled code to install axonagent on suse12
    kraigstrong authored Nov 2, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c9da170 View commit details

Commits on Nov 5, 2020

  1. Fix cookbook for lin32 bit installer

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Nov 5, 2020
    Copy the full SHA
    8f0daa7 View commit details

Commits on Nov 7, 2020

  1. Merge pull request #42 from abhardwaj-lab/fix_issue_for_lin32

    Fix cookbook for lin32 bit installer
    kraigstrong authored Nov 7, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e459c14 View commit details

Commits on Mar 1, 2021

  1. added support to install dkms package for debian 10 or greater

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Mar 1, 2021
    Copy the full SHA
    3eedab0 View commit details
  2. changed version

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Mar 1, 2021
    Copy the full SHA
    9115195 View commit details

Commits on Mar 2, 2021

  1. handeled for debian

    Aakansha Bhardwaj authored and Aakansha Bhardwaj committed Mar 2, 2021
    Copy the full SHA
    3f49854 View commit details
  2. Merge pull request #44 from abhardwaj-lab/add_support_to_install_dkms…

    …_in_debian
    
    Add support to install dkms in debian
    kraigstrong authored Mar 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2b6e1df View commit details

Commits on Aug 26, 2022

  1. added some basic handling for suse to be able to install Axon. more

    optimization to follow
    pbisht-lab committed Aug 26, 2022
    Copy the full SHA
    d4c8958 View commit details

Commits on Aug 29, 2022

  1. cleanup

    pbisht-lab committed Aug 29, 2022
    Copy the full SHA
    2f1e6c3 View commit details
  2. Copy the full SHA
    6e3baa8 View commit details

Commits on Sep 2, 2022

  1. Merge pull request #45 from pbisht-lab/pankaj_axon-install-issue-2

    Fix Axon installation issue on Suse 15.x
    brc0x1 authored Sep 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ae4b335 View commit details
Showing with 63 additions and 11 deletions.
  1. +3 −3 README.md
  2. +1 −1 metadata.rb
  3. +1 −0 recipes/axon_agent.rb
  4. +58 −7 resources/axon.rb
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ tripwire_agent_axon 'Installing the Tripwire Axon Agent' do
eg_service_installer '/mnt/share/tripwire/tw-eg-service.x86_64.rpm'
bridge 'tw-console.example.com'
registration_key 'PaS5w0rd!_K3y'
tags {"Platform": "Red Hat", "Policy": ["PCI", "SOX"], "Importance": "High", "Org": ["Payment", "Sales", "Production"]}
tags "Platform" => "Red Hat", "Policy" => ["PCI", "SOX"], "Importance" => "High", "Org" => ["Payment", "Sales", "Production"]
end
```

@@ -157,7 +157,7 @@ tripwire_agent_axon 'Installing the Tripwire Axon Agent' do
installer '/mnt/share/tripwire/axon-agent-installer-linux-x64.tgz'
bridge 'tw-console.example.com'
registration_key 'PaS5w0rd!_K3y'
tags {"Platform": "Red Hat", "Policy": ["PCI", "SOX"], "Importance": "High", "Org": ["Payment", "Sales", "Production"]}
tags "Platform" => "Red Hat", "Policy" => ["PCI", "SOX"], "Importance" => "High", "Org" => ["Payment", "Sales", "Production"]
end
```

@@ -178,7 +178,7 @@ tripwire_agent_java 'Install Tripwire Java Agent' do
installer '/mnt/share/tripwire/te_agent.bin'
console 'tw-console.example.com'
services_password 'Pas5W0rd!_C0mp13x!Ty^'
tags {"Platform": "Red Hat", "Policy": ["PCI", "SOX"], "Importance": "High", "Org": ["Payment", "Sales", "Production"]}
tags "Platform" => "Red Hat", "Policy" => ["PCI", "SOX"], "Importance" => "High", "Org" => ["Payment", "Sales", "Production"]
end
```

2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
license 'Apache-2.0'
description 'Installs/Configures tripwire_agent'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.1.0'
version '1.1.6'
chef_version '>= 13' if respond_to?(:chef_version)

source_url 'https://github.com/Tripwire/chef-tripwire_agent'
1 change: 1 addition & 0 deletions recipes/axon_agent.rb
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
tripwire_agent_axon 'Install Tripwire Axon agent' do
installer node['tripwire_agent']['installer']
eg_install node['tripwire_agent']['axon']['eg_install']
use_dkms_driver node['tripwire_agent']['axon']['use_dkms_driver']
eg_driver_installer node['tripwire_agent']['axon']['eg_driver_installer']
eg_service_installer node['tripwire_agent']['axon']['eg_service_installer']
install_directory node['tripwire_agent']['axon']['install_directory']
65 changes: 58 additions & 7 deletions resources/axon.rb
Original file line number Diff line number Diff line change
@@ -58,12 +58,43 @@

# Set platform specific variables
case node['platform']
when 'centos', 'redhat', 'suse', 'oraclelinux', 'oracle', 'amazon'
when 'centos', 'redhat', 'suse', 'oraclelinux', 'amazon'
ext = '.rpm'
eg_service_name = 'tw-eg-service'
when 'oracle'
ext = '.rpm'
eg_service_name = 'tw-eg-service'
# for Oracle UEK, need to run few extra commands as pre-requisites
if node["hostnamectl"]["kernel"].include?('uek')
case node['platform_version'].split('.')[0]
when '7'
pre_requisite_cmds = "yum -y install kernel-uek-devel-`uname -r` && sudo yum install yum-utils -y && "\
"sudo curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && "\
"sudo yum clean metadata dbcache && sudo yum install epel-release-latest-7.noarch.rpm -y && "\
"sudo yum-config-manager --disable epel && sudo yum --enablerepo=epel install dkms -y"
when '8'
pre_requisite_cmds = "yum -y install kernel-uek-devel-`uname -r` && sudo yum install yum-utils -y && "\
"sudo curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && "\
"sudo yum clean metadata dbcache && sudo yum install epel-release-latest-8.noarch.rpm -y && "\
"sudo yum-config-manager --disable epel && sudo yum --enablerepo=epel install dkms -y"
else
raise("unsupported version")
end

execute 'Install dkms prerequisites' do
command pre_requisite_cmds
end
end
when 'debian', 'ubuntu'
ext = '.deb'
eg_service_name = 'tw-eg-service'
platform_version = node['platform_version'].split('.')[0]
if platform_version.to_i >= 10
pre_requisite_cmd = "sudo apt-get install linux-headers-$(uname -r) -y"
execute 'Install dkms prerequisites for debian' do
command pre_requisite_cmd
end
end
when 'windows'
ext = '.msi'
eg_service_name = 'TripwireEventGeneratorService'
@@ -143,12 +174,26 @@
# Set the local installer location
node.run_state['local_installer'] = "#{axon_chef_cache}/#{installer_basename}"

log lazy { node.run_state['local_installer'] }
# when 'lazy' evaluation is used in resource name, it creates issues for Suse 15.x.
# So skipping it for now.
unless platform_family?('suse') and node['platform_version'].split('.')[0] == '15'
log lazy { node.run_state['local_installer'] }
end

# Only necessary to set these if a linux box
if new_resource.eg_install && !platform_family?('windows')
service_basename = files.find { |item| item.include?('service') }
driver_basename = files.find { |item| item.include?(new_resource.use_dkms_driver ? 'driver-dkms' : 'driver') }
if new_resource.use_dkms_driver
driver_basename = files.find { |item| item.include?('driver-dkms')}
else
# There can be multiple eg-driver files e.g driver-dkms, driver-rhel, driver-suse
driver_basename_list = files.select { |item| item.include?('driver') and !item.include?('driver-dkms')}
if !platform_family?('suse')
driver_basename = driver_basename_list.find {|item| !item.include?('suse') }
else
driver_basename = driver_basename_list.find {|item| item.include?('suse') }
end
end

# Determine the local driver and service locations
local_eg_service = "#{axon_chef_cache}/#{service_basename}"
@@ -196,7 +241,8 @@
package_name lazy { node.run_state[name] }
action :install
end
elsif platform_family?('rhel')
#Currently support on suse12
elsif platform_family?('rhel', 'suse')
rpm_package 'pkg' do
package_name lazy { node.run_state[name] }
action :install
@@ -211,15 +257,20 @@
end
end

log lazy { node.run_state['local_installer'] }
# when 'lazy' evaluation is used in resource name, it creates issues for Suse 15.x.
# So skipping it for now.
unless platform_family?('suse') and node['platform_version'].split('.')[0] == '15'
log lazy { node.run_state['local_installer'] }
end

# Install the actual agent
if platform_family?('debian')
dpkg_package lazy { node.run_state['local_installer'] } do
action :install
end
elsif platform_family?('rhel')
rpm_package lazy { node.run_state['local_installer'] } do
elsif platform_family?('rhel', 'suse')
rpm_package 'axon installer' do
package_name lazy { node.run_state['local_installer'] }
action :install
end
else