Commit 13a7f5bf authored by Paul Graydon's avatar Paul Graydon

software/simpleran: Update eNB log forwarding behavior

See merge request !1668
parent 9adaf05c
......@@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 9cd5250fc523863d206b8dc038beaf82
md5sum = cb8e9d952709c596542a5f7f5b3887eb
[template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg
......
......@@ -212,6 +212,12 @@
"type": "number",
"default": 0
},
"xlog_forwarding_enabled": {
"title": "Enable eNB xlog forwarding",
"description": "Enable eNB xlog forwarding through fluentbit",
"type": "boolean",
"default": "true"
},
"wendelin_telecom_software_release_url": {
"title": "Wendelin Telecom Software Release URL",
"description": "URL of the Wendelin Telecom Software Release to use to request a shared instance",
......@@ -221,8 +227,7 @@
"xlog_fluentbit_forward_host": {
"title": "Fluentbit Xlog forwarding address",
"description": "Address of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data",
"type": "string",
"default": "fluentd.rapid.space"
"type": "string"
},
"xlog_fluentbit_forward_port": {
"title": "Fluentbit Xlog forwarding port",
......
......@@ -8,8 +8,8 @@
'use_ipv4': False,
'gnb_id_bits': 28,
'nssai': {'1': {'sst': 1}},
'xlog_forwarding_enabled': True,
'wendelin_telecom_software_release_url': 'wendelin-telecom-enb-shared-instance',
'xlog_fluentbit_forward_host': 'fluentd.rapid.space',
'xlog_fluentbit_forward_port': 24224,
} %}
{%- set gtp_addr_lo = '127.0.1.1' %}
......@@ -26,8 +26,10 @@ parts =
enb-config
enb-service
xamari-xlog-service
xlog-fluentbit-service
request-wendelin-telecom-shared
{%- if slapparameter_dict.xlog_forwarding_enabled %}
xlog-fluentbit-service
{%- endif %}
check-baseband-latency.py
monitor-base
publish-connection-information
......@@ -165,6 +167,20 @@ wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
[request-wendelin-telecom-shared]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Wendelin Telecom Registration
software-url = {{ slapparameter_dict.wendelin_telecom_software_release_url }}
shared = true
{%- if not slapparameter_dict.xlog_forwarding_enabled or slapparameter_dict.get("xlog_fluentbit_forward_host") %}
state = destroyed
{%- else %}
config-fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
return = gateway-host
{%- endif %}
{% if slapparameter_dict.xlog_forwarding_enabled %}
[xlog-fluentbit-tag]
recipe = slapos.recipe.build
computer = ${slap-connection:computer-id}
......@@ -189,7 +205,7 @@ init =
recipe = slapos.recipe.template
output = ${directory:etc}/${:_buildout_section_name_}.cfg
logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.xlog_fluentbit_forward_host }}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') or '${request-wendelin-telecom-shared:connection-gateway-host}' }}
forward-port = {{ slapparameter_dict.xlog_fluentbit_forward_port }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ B(comp_id['comp-id']) }}
......@@ -222,14 +238,7 @@ fluentbit-config = ${xlog-fluentbit-config:output}
command-line = ${:fluentbit} -c ${:fluentbit-config}
wrapper-path = ${directory:service}/${:_buildout_section_name_}
hash-files = ${:fluentbit-config}
[request-wendelin-telecom-shared]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Wendelin Telecom Registration
software-url = {{ slapparameter_dict.wendelin_telecom_software_release_url }}
shared = true
config-fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
{%- endif %}
[config-base]
recipe = slapos.recipe.template:jinja2
......@@ -280,7 +289,9 @@ ru-list = {{ dumps(rulib.iru_dict.keys() | sort) }}
cell-list = {{ dumps(rulib.icell_dict.keys() | sort) }}
peer-list = {{ dumps(ipeer_dict.keys() | sort) }}
peer-cell-list = {{ dumps(ipeercell_dict.keys() | sort) }}
{%- if slapparameter_dict.xlog_forwarding_enabled %}
fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
{%- endif %}
[monitor-instance-parameter]
......
......@@ -199,6 +199,9 @@
"min_rxtx_delay": {
"$ref": "instance-enb-input-schema.json#/properties/min_rxtx_delay"
},
"xlog_forwarding_enabled": {
"$ref": "instance-enb-input-schema.json#/properties/xlog_forwarding_enabled"
},
"wendelin_telecom_software_release_url": {
"$ref": "instance-enb-input-schema.json#/properties/wendelin_telecom_software_release_url"
},
......
......@@ -189,6 +189,12 @@
"min_rxtx_delay": {
"$ref": "instance-ors-enb-input-schema.json#/properties/min_rxtx_delay"
},
"xlog_forwarding_enabled": {
"$ref": "instance-ors-enb-input-schema.json#/properties/xlog_forwarding_enabled"
},
"wendelin_telecom_software_release_url": {
"$ref": "instance-ors-enb-input-schema.json#/properties/wendelin_telecom_software_release_url"
},
"xlog_fluentbit_forward_host": {
"$ref": "instance-ors-enb-input-schema.json#/properties/xlog_fluentbit_forward_host"
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment