mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 22:12:48 +01:00
Merge remote-tracking branch 'origin/reyesj2/kafka' into kaffytaffy
This commit is contained in:
@@ -1115,6 +1115,7 @@ generate_passwords(){
|
||||
REDISPASS=$(get_random_value)
|
||||
SOCSRVKEY=$(get_random_value 64)
|
||||
IMPORTPASS=$(get_random_value)
|
||||
KAFKACLUSTERID=$(get_random_value 22)
|
||||
}
|
||||
|
||||
generate_interface_vars() {
|
||||
@@ -1142,7 +1143,7 @@ get_redirect() {
|
||||
get_minion_type() {
|
||||
local minion_type
|
||||
case "$install_type" in
|
||||
'EVAL' | 'MANAGERSEARCH' | 'MANAGER' | 'SENSOR' | 'HEAVYNODE' | 'SEARCHNODE' | 'FLEET' | 'IDH' | 'STANDALONE' | 'IMPORT' | 'RECEIVER' | 'DESKTOP')
|
||||
'EVAL' | 'MANAGERSEARCH' | 'MANAGER' | 'SENSOR' | 'HEAVYNODE' | 'SEARCHNODE' | 'FLEET' | 'IDH' | 'STANDALONE' | 'IMPORT' | 'RECEIVER' | 'DESKTOP' | 'KAFKANODE')
|
||||
minion_type=$(echo "$install_type" | tr '[:upper:]' '[:lower:]')
|
||||
;;
|
||||
esac
|
||||
@@ -1500,6 +1501,8 @@ process_installtype() {
|
||||
is_import=true
|
||||
elif [ "$install_type" = 'RECEIVER' ]; then
|
||||
is_receiver=true
|
||||
elif [ "$install_type" = 'KAFKANODE' ]; then
|
||||
is_kafka=true
|
||||
elif [ "$install_type" = 'DESKTOP' ]; then
|
||||
is_desktop=true
|
||||
fi
|
||||
@@ -1941,7 +1944,8 @@ secrets_pillar(){
|
||||
printf '%s\n'\
|
||||
"secrets:"\
|
||||
" import_pass: $IMPORTPASS"\
|
||||
" influx_pass: $INFLUXPASS" > $local_salt_dir/pillar/secrets.sls
|
||||
" influx_pass: $INFLUXPASS"\
|
||||
" kafka_cluster_id: $KAFKACLUSTERID" > $local_salt_dir/pillar/secrets.sls
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -619,6 +619,25 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
set_minion_info
|
||||
whiptail_end_settings
|
||||
|
||||
elif [[ $is_kafka ]]; then
|
||||
info "Setting up as node type Kafka broker"
|
||||
#check_requirements "kafka"
|
||||
networking_needful
|
||||
collect_mngr_hostname
|
||||
add_mngr_ip_to_hosts
|
||||
check_manager_connection
|
||||
set_minion_info
|
||||
whiptail_end_settings
|
||||
|
||||
elif [[ $is_kafka ]]; then
|
||||
info "Setting up as node type Kafka broker"
|
||||
#check_requirements "kafka"
|
||||
networking_needful
|
||||
collect_mngr_hostname
|
||||
add_mngr_ip_to_hosts
|
||||
check_manager_connection
|
||||
set_minion_info
|
||||
whiptail_end_settings
|
||||
fi
|
||||
|
||||
if [[ $waitforstate ]]; then
|
||||
|
||||
@@ -646,13 +646,14 @@ whiptail_install_type_dist_existing() {
|
||||
Note: Heavy nodes (HEAVYNODE) are NOT recommended for most users.
|
||||
EOM
|
||||
|
||||
install_type=$(whiptail --title "$whiptail_title" --menu "$node_msg" 19 75 6 \
|
||||
install_type=$(whiptail --title "$whiptail_title" --menu "$node_msg" 19 75 7 \
|
||||
"SENSOR" "Create a forward only sensor " \
|
||||
"SEARCHNODE" "Add a search node with parsing " \
|
||||
"FLEET" "Dedicated Elastic Fleet Node " \
|
||||
"HEAVYNODE" "Sensor + Search Node " \
|
||||
"IDH" "Intrusion Detection Honeypot Node " \
|
||||
"RECEIVER" "Receiver Node " \
|
||||
"KAFKANODE" "Kafka Broker + Kraft controller" \
|
||||
3>&1 1>&2 2>&3
|
||||
# "HOTNODE" "Add Hot Node (Uses Elastic Clustering)" \ # TODO
|
||||
# "WARMNODE" "Add Warm Node to existing Hot or Search node" \ # TODO
|
||||
@@ -683,6 +684,8 @@ whiptail_install_type_dist_existing() {
|
||||
is_import=true
|
||||
elif [ "$install_type" = 'RECEIVER' ]; then
|
||||
is_receiver=true
|
||||
elif [ "$install_type" = 'KAFKANODE' ]; then
|
||||
is_kafka=true
|
||||
elif [ "$install_type" = 'DESKTOP' ]; then
|
||||
is_desktop=true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user