mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Ded Fleet Node - checkpoint
This commit is contained in:
@@ -43,7 +43,7 @@ APPLY=${APPLY,,}
|
|||||||
|
|
||||||
function rolecall() {
|
function rolecall() {
|
||||||
THEROLE=$1
|
THEROLE=$1
|
||||||
THEROLES="analyst analyst_workstations beats_endpoint beats_endpoint_ssl elastic_agent_endpoint elasticsearch_rest endgame eval heavynodes idh manager managersearch receivers searchnodes sensors standalone strelka_frontend syslog"
|
THEROLES="analyst analyst_workstations beats_endpoint beats_endpoint_ssl elastic_agent_endpoint elasticsearch_rest endgame eval fleet heavynodes idh manager managersearch receivers searchnodes sensors standalone strelka_frontend syslog"
|
||||||
|
|
||||||
for AROLE in $THEROLES; do
|
for AROLE in $THEROLES; do
|
||||||
if [ "$AROLE" = "$THEROLE" ]; then
|
if [ "$AROLE" = "$THEROLE" ]; then
|
||||||
|
|||||||
@@ -56,8 +56,11 @@ fi
|
|||||||
so-firewall --role=sensors --ip="$IP"
|
so-firewall --role=sensors --ip="$IP"
|
||||||
so-firewall --apply=true --role=searchnodes --ip="$IP"
|
so-firewall --apply=true --role=searchnodes --ip="$IP"
|
||||||
;;
|
;;
|
||||||
'SENSOR' | 'SEARCHNODE' | 'HEAVYNODE' | 'IDH' | 'RECEIVER')
|
'FLEET' | 'SENSOR' | 'SEARCHNODE' | 'HEAVYNODE' | 'IDH' | 'RECEIVER')
|
||||||
case "$ROLE" in
|
case "$ROLE" in
|
||||||
|
'FLEET')
|
||||||
|
so-firewall --apply=true --role=fleet --ip="$IP"
|
||||||
|
;;
|
||||||
'SENSOR')
|
'SENSOR')
|
||||||
so-firewall --apply=true --role=sensors --ip="$IP"
|
so-firewall --apply=true --role=sensors --ip="$IP"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# These values are generated during node install and stored in minion pillar
|
# These values are generated during node install and stored in minion pillar
|
||||||
{% set SERVICETOKEN = salt['pillar.get']('elasticfleet:server:es_token','') %}
|
{% set SERVICETOKEN = salt['pillar.get']('elasticfleet:server:es_token','') %}
|
||||||
{% set FLEETSERVERPOLICY = salt['pillar.get']('elasticfleet:server:server_policy','so-manager') %}
|
{% set FLEETSERVERPOLICY = salt['pillar.get']('elasticfleet:server:server_policy','so-manager') %}
|
||||||
{% set FLEETURL = salt['pillar.get']('elasticfleet:server:url') %}
|
#{% set FLEETURL = salt['pillar.get']('elasticfleet:server:url') %}
|
||||||
|
|
||||||
# Add EA Group
|
# Add EA Group
|
||||||
elasticsagentgroup:
|
elasticsagentgroup:
|
||||||
@@ -39,13 +39,29 @@ eastatedir:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
|
# Pull down the Logstash Cert from the Manager
|
||||||
|
/opt/so/conf/elastic-fleet/certs/elasticfleet-logstash.p8:
|
||||||
|
file.managed:
|
||||||
|
- replace: True
|
||||||
|
- source: salt://elasticfleet/files/certs/elasticfleet.p8
|
||||||
|
- mode: 640
|
||||||
|
- user: 931
|
||||||
|
- group: 939
|
||||||
|
|
||||||
|
/opt/so/conf/elastic-fleet/certs/elasticfleet-logstash.crt:
|
||||||
|
file.managed:
|
||||||
|
- replace: True
|
||||||
|
- source: salt://elasticfleet/files/certs/elasticfleet.crt
|
||||||
|
- mode: 640
|
||||||
|
- group: 939
|
||||||
|
|
||||||
|
|
||||||
{% if SERVICETOKEN != '' %}
|
{% if SERVICETOKEN != '' %}
|
||||||
so-elastic-fleet:
|
so-elastic-fleet:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-agent:{{ GLOBALS.so_version }}
|
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-agent:{{ GLOBALS.so_version }}
|
||||||
- name: so-elastic-fleet
|
- name: so-elastic-fleet
|
||||||
- hostname: Fleet-{{ GLOBALS.hostname }}
|
- hostname: FleetServer-{{ GLOBALS.hostname }}
|
||||||
- detach: True
|
- detach: True
|
||||||
- user: 947
|
- user: 947
|
||||||
- networks:
|
- networks:
|
||||||
@@ -63,7 +79,7 @@ so-elastic-fleet:
|
|||||||
- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state:rw
|
- /opt/so/conf/elastic-fleet/state:/usr/share/elastic-agent/state:rw
|
||||||
- environment:
|
- environment:
|
||||||
- FLEET_SERVER_ENABLE=true
|
- FLEET_SERVER_ENABLE=true
|
||||||
- FLEET_URL=https://{{ FLEETURL }}:8220
|
- FLEET_URL=https://{{ GLOBALS.node_ip }}:8220
|
||||||
- FLEET_SERVER_ELASTICSEARCH_HOST=https://{{ GLOBALS.manager }}:9200
|
- FLEET_SERVER_ELASTICSEARCH_HOST=https://{{ GLOBALS.manager }}:9200
|
||||||
- FLEET_SERVER_SERVICE_TOKEN={{ SERVICETOKEN }}
|
- FLEET_SERVER_SERVICE_TOKEN={{ SERVICETOKEN }}
|
||||||
- FLEET_SERVER_POLICY_ID={{ FLEETSERVERPOLICY }}
|
- FLEET_SERVER_POLICY_ID={{ FLEETSERVERPOLICY }}
|
||||||
|
|||||||
@@ -317,7 +317,15 @@ role:
|
|||||||
fleet:
|
fleet:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.elasticsearch_rest }}
|
- {{ portgroups.elasticsearch_rest }}
|
||||||
|
- {{ portgroups.docker_registry }}
|
||||||
|
- {{ portgroups.influxdb }}
|
||||||
|
- {{ portgroups.sensoroni }}
|
||||||
|
- {{ portgroups.yum }}
|
||||||
|
- {{ portgroups.beats_5044 }}
|
||||||
|
- {{ portgroups.beats_5644 }}
|
||||||
- {{ portgroups.beats_5056 }}
|
- {{ portgroups.beats_5056 }}
|
||||||
|
- {{ portgroups.elastic_agent_control }}
|
||||||
|
- {{ portgroups.elastic_agent_data }}
|
||||||
sensors:
|
sensors:
|
||||||
portgroups:
|
portgroups:
|
||||||
- {{ portgroups.docker_registry }}
|
- {{ portgroups.docker_registry }}
|
||||||
|
|||||||
@@ -93,6 +93,12 @@
|
|||||||
'so-idh',
|
'so-idh',
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
|
{% elif GLOBALS.role == 'so-fleet' %}
|
||||||
|
{% set NODE_CONTAINERS = [
|
||||||
|
'so-elastic-fleet',
|
||||||
|
'so-logstash',
|
||||||
|
] %}
|
||||||
|
|
||||||
{% elif GLOBALS.role == 'so-sensor' %}
|
{% elif GLOBALS.role == 'so-sensor' %}
|
||||||
{% set NODE_CONTAINERS = [] %}
|
{% set NODE_CONTAINERS = [] %}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ firewall:
|
|||||||
elastic_agent_data:
|
elastic_agent_data:
|
||||||
tcp:
|
tcp:
|
||||||
- 5055
|
- 5055
|
||||||
- 9200
|
|
||||||
endgame:
|
endgame:
|
||||||
tcp:
|
tcp:
|
||||||
- 3765
|
- 3765
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ so-logstash:
|
|||||||
- /etc/pki/filebeat.p8:/usr/share/logstash/filebeat.key:ro
|
- /etc/pki/filebeat.p8:/usr/share/logstash/filebeat.key:ro
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if GLOBALS.role in ['so-fleet'] %}
|
{% if GLOBALS.role in ['so-fleet'] %}
|
||||||
- /etc/pki/elasticfleet.crt:/usr/share/logstash/filebeat.crt:ro
|
- /opt/so/conf/elastic-fleet/certs/elasticfleet-logstash.crt:/usr/share/logstash/filebeat.crt:ro
|
||||||
- /etc/pki/elasticfleet02.p8:/usr/share/logstash/filebeat.key:ro
|
- /opt/so/conf/elastic-fleet/certs/elasticfleet-logstash.p8:/usr/share/logstash/filebeat.key:ro
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if GLOBALS.role in ['so-manager', 'so-helix', 'so-managersearch', 'so-standalone', 'so-import'] %}
|
{% if GLOBALS.role in ['so-manager', 'so-helix', 'so-managersearch', 'so-standalone', 'so-import'] %}
|
||||||
- /etc/pki/ca.crt:/usr/share/filebeat/ca.crt:ro
|
- /etc/pki/ca.crt:/usr/share/filebeat/ca.crt:ro
|
||||||
|
|||||||
Reference in New Issue
Block a user