Merge pull request #9151 from Security-Onion-Solutions/2.4/elasticfleet-ag

Initial support for Elastic Fleet Package Registry
This commit is contained in:
Josh Brower
2022-11-16 08:45:29 -05:00
committed by GitHub
6 changed files with 55 additions and 0 deletions

View File

@@ -37,6 +37,7 @@
'soc',
'kratos',
'elastic-fleet',
'elastic-fleet-package-registry',
'firewall',
'idstools',
'suricata.manager',
@@ -120,6 +121,7 @@
'soc',
'kratos',
'elastic-fleet',
'elastic-fleet-package-registry',
'firewall',
'idstools',
'suricata.manager',
@@ -140,6 +142,7 @@
'soc',
'kratos',
'elastic-fleet',
'elastic-fleet-package-registry',
'firewall',
'manager',
'idstools',
@@ -170,6 +173,7 @@
'soc',
'kratos',
'elastic-fleet',
'elastic-fleet-package-registry',
'firewall',
'idstools',
'suricata.manager',

View File

@@ -42,6 +42,7 @@ container_list() {
"so-elastalert"
"so-elastic-agent"
"so-elastic-agent-builder"
"so-elastic-fleet-package-registry"
"so-elasticsearch"
"so-filebeat"
"so-grafana"

View File

@@ -0,0 +1,46 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
# Add Group
elasticsagentprgroup:
group.present:
- name: elastic-agent-pr
- gid: 948
# Add user
elastic-agent-pr:
user.present:
- uid: 948
- gid: 948
- home: /opt/so/conf/elastic-fleet-pr
- createhome: False
so-elastic-fleet-package-registry:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-elastic-fleet-package-registry:{{ GLOBALS.so_version }}
- name: so-elastic-fleet-package-registry
- hostname: Fleet-package-reg-{{ GLOBALS.hostname }}
- detach: True
- user: 948
- extra_hosts:
- {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }}
- port_bindings:
- 0.0.0.0:8080:8080
append_so-elastic-fleet-package-registry_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-elastic-fleet-package-registry
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -7,6 +7,8 @@
{% do KIBANACONFIG.kibana.config.elasticsearch.update({'username': salt['pillar.get']('elasticsearch:auth:users:so_kibana_user:user'), 'password': salt['pillar.get']('elasticsearch:auth:users:so_kibana_user:pass')}) %}
{% do KIBANACONFIG.kibana.config.xpack.fleet.update({'registryUrl': 'http://' ~ GLOBALS.manager_ip ~ ':8080'}) %}
{% if salt['pillar.get']('kibana:secrets') %}
{% do KIBANACONFIG.kibana.config.xpack.update({'encryptedSavedObjects': {'encryptionKey': pillar['kibana']['secrets']['encryptedSavedObjects']['encryptionKey']}}) %}
{% do KIBANACONFIG.kibana.config.xpack.security.update({'encryptionKey': pillar['kibana']['secrets']['security']['encryptionKey']}) %}

View File

@@ -31,6 +31,7 @@ kibana:
kibanaServer:
hostname: localhost
fleet:
registryUrl: ""
packages:
- name: fleet_server
version: latest

View File

@@ -191,6 +191,7 @@ base:
{%- if REDIS %}
- redis
{%- endif %}
- elastic-fleet-package-registry
{%- if KIBANA %}
- kibana.so_savedobjects_defaults
{%- endif %}