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

Adaptations to work on RHEL9 #10

Merged
merged 8 commits into from
Oct 27, 2023
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ depends 'zookeeper', '0.0.1'

### Platforms

- Centos 7
- Rocky Linux 9

### Chef

Expand Down
5 changes: 0 additions & 5 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
default["redborder"]["memory_services"]["snmp"] = {"count" => 5, "memory" => 0, "max_limit" => 10000 }
default["redborder"]["memory_services"]["redborder-monitor"] = {"count" => 5, "memory" => 0, "max_limit" => 20000 }
default["redborder"]["memory_services"]["f2k"] = { "count" => 40, "memory" => 0 }
default["redborder"]["memory_services"]["redborder-social"] = {"count" => 10, "memory" => 0 }
default["redborder"]["memory_services"]["redborder-nmsp"] = {"count" => 10, "memory" => 0 }
default["redborder"]["memory_services"]["n2klocd"] = {"count" => 10, "memory" => 0 }
default["redborder"]["memory_services"]["k2http"] = {"count" => 10, "memory" => 0 }
Expand All @@ -52,12 +51,10 @@
default["redborder"]["services"]["redborder-monitor"] = true
default["redborder"]["services"]["redborder-scanner"] = true
default["redborder"]["services"]["snmp"] = true
default["redborder"]["services"]["ntp"] = true
default["redborder"]["services"]["f2k"] = true
default["redborder"]["services"]["logstash"] = true
default["redborder"]["services"]["pmacct"] = true
default["redborder"]["services"]["rsyslog"] = true
default["redborder"]["services"]["redborder-social"] = false
default["redborder"]["services"]["redborder-nmsp"] = true
default["redborder"]["services"]["redborder-ale"] = true
default["redborder"]["services"]["n2klocd"] = true
Expand All @@ -71,12 +68,10 @@
default["redborder"]["systemdservices"]["redborder-monitor"] = ["redborder-monitor"]
default["redborder"]["systemdservices"]["redborder-scanner"] = ["redborder-scanner"]
default["redborder"]["systemdservices"]["snmp"] = ["snmpd"]
default["redborder"]["systemdservices"]["ntp"] = ["ntpd"]
default["redborder"]["systemdservices"]["f2k"] = ["f2k"]
default["redborder"]["systemdservices"]["logstash"] = ["logstash"]
default["redborder"]["systemdservices"]["pmacct"] = ["sfacctd"]
default["redborder"]["systemdservices"]["rsyslog"] = ["rsyslog"]
default["redborder"]["systemdservices"]["redborder-social"] = ["redborder-social"]
default["redborder"]["systemdservices"]["redborder-nmsp"] = ["redborder-nmsp"]
default["redborder"]["systemdservices"]["redborder-ale"] = ["redborder-ale"]
default["redborder"]["systemdservices"]["n2klocd"] = ["n2klocd"]
Expand Down
4 changes: 2 additions & 2 deletions resources/libraries/get_sensors_all_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Rb_proxy
module Helpers
def get_sensors_all_info()
sensors_info = {}
sensor_types = ["vault-sensor","flow-sensor","mse-sensor","social-sensor","scanner-sensor","meraki-sensor","ale-sensor", "device-sensor"]
sensor_types = ["vault-sensor","flow-sensor","mse-sensor","scanner-sensor","meraki-sensor","ale-sensor", "device-sensor"]

sensor_types.each do |s_type|
sensors = search(:node, "role:#{s_type} AND redborder_parent_id:#{node.redborder.sensor_id}").sort
Expand All @@ -15,4 +15,4 @@ def get_sensors_all_info()
sensors_info
end
end
end
end
4 changes: 2 additions & 2 deletions resources/libraries/get_sensors_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Rb_proxy
module Helpers
def get_sensors_info()
sensors_info = {}
sensor_types = ["vault-sensor","flow-sensor","mse-sensor","social-sensor","scanner-sensor","meraki-sensor","ale-sensor", "device-sensor"]
sensor_types = ["vault-sensor","flow-sensor","mse-sensor","scanner-sensor","meraki-sensor","ale-sensor", "device-sensor"]
locations = node["redborder"]["locations"]


Expand Down Expand Up @@ -35,4 +35,4 @@ def get_sensors_info()
end
end
end


6 changes: 2 additions & 4 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@
license 'All rights reserved'
description 'Installs/Configures redborder proxy'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.4'
version '0.0.10'

depends 'zookeeper'
depends 'kafka'
depends 'geoip'
depends 'snmp'
depends 'rbmonitor'
depends 'rbscanner'
depends 'ntp'
depends 'f2k'
depends 'pmacct'
depends 'logstash'
depends 'rsyslog'
depends 'rbsocial'
depends 'rbnmsp'
depends 'rbale'
depends 'n2klocd'
depends 'freeradius'
depends 'k2http'
depends 'ohai'
#depends 'ohai'
11 changes: 0 additions & 11 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
scanner_nodes node["redborder"]["sensors_info_all"]["scanner-sensor"]
action (proxy_services["redborder-scanner"] ? [:add] : [:remove])
end

ntp_config "Configure NTP" do
action (proxy_services["ntp"] ? :add : :remove)
end

f2k_config "Configure f2k" do
sensors node["redborder"]["sensors_info"]["flow-sensor"]
Expand All @@ -70,13 +66,6 @@
action (proxy_services["logstash"] ? [:add] : [:remove])
end

rbsocial_config "Configure redborder-social" do
social_nodes node["redborder"]["sensors_info_all"]["social-sensor"]
memory node["redborder"]["memory_services"]["redborder-social"]["memory"]
zk_hosts node["redborder"]["zookeeper"]["zk_hosts"]
action (proxy_services["redborder-social"] ? [:add] : [:remove])
end

rsyslog_config "Configure rsyslog" do
vault_nodes node["redborder"]["sensors_info_all"]["vault-sensor"]
action (proxy_services["rsyslog"] ? [:add] : [:remove])
Expand Down
2 changes: 1 addition & 1 deletion resources/recipes/prepare_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

#Configure and enable chef-client
yum_package "redborder-chef-client" do
dnf_package "redborder-chef-client" do
flush_cache [:before]
action :upgrade
end
Expand Down
Loading