mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #998 from Security-Onion-Solutions/bugfix/fleet-soimage-fix
Fleet reactor fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
{% set CURRENTPACKAGEVERSION = salt['pillar.get']('static:fleet_packages-version') %}
|
||||
{% set VERSION = salt['pillar.get']('static:soversion') %}
|
||||
{% set CUSTOM_FLEET_HOSTNAME = salt['pillar.get']('static:fleet_custom_hostname', None) %}
|
||||
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
|
||||
|
||||
{% if CUSTOM_FLEET_HOSTNAME != None and CUSTOM_FLEET_HOSTNAME != '' %}
|
||||
{% set HOSTNAME = CUSTOM_FLEET_HOSTNAME %}
|
||||
@@ -21,4 +22,4 @@ so/fleet:
|
||||
current-package-version: {{ CURRENTPACKAGEVERSION }}
|
||||
manager: {{ MANAGER }}
|
||||
version: {{ VERSION }}
|
||||
|
||||
imagerepo: {{ IMAGEREPO }}
|
||||
@@ -1,5 +1,3 @@
|
||||
{% set IMAGEREPO = salt['pillar.get']('static:imagerepo') %}
|
||||
|
||||
#!py
|
||||
|
||||
from time import gmtime, strftime
|
||||
@@ -55,13 +53,14 @@ def run():
|
||||
MANAGER = data['data']['manager']
|
||||
VERSION = data['data']['version']
|
||||
ESECRET = data['data']['enroll-secret']
|
||||
IMAGEREPO = data['data']['imagerepo']
|
||||
|
||||
# Increment the package version by 1
|
||||
PACKAGEVERSION += 1
|
||||
|
||||
# Run Docker container that will build the packages
|
||||
gen_packages = subprocess.run(["docker", "run","--rm", "--mount", f"type=bind,source={LOCAL_SALT_DIR}/salt/fleet/packages,target=/output", \
|
||||
"--mount", "type=bind,source=/etc/ssl/certs/intca.crt,target=/var/launcher/launcher.crt", f"{ MANAGER }:5000/{{ IMAGEREPO }}/so-fleet-launcher:{ VERSION }", \
|
||||
"--mount", "type=bind,source=/etc/ssl/certs/intca.crt,target=/var/launcher/launcher.crt", f"{ MANAGER }:5000/{ IMAGEREPO }/so-fleet-launcher:{ VERSION }", \
|
||||
f"{ESECRET}", f"{PACKAGEHOSTNAME}:8090", f"{PACKAGEVERSION}.1.1"], stdout=subprocess.PIPE, encoding='ascii')
|
||||
|
||||
# Update the 'packages-built' timestamp on the webpage (stored in the static pillar)
|
||||
|
||||
Reference in New Issue
Block a user