Commit 5a98a2d7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5849037c
...@@ -267,6 +267,11 @@ ...@@ -267,6 +267,11 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"websocket_password": {
"title": "Websocket password",
"description": "Activates websocket for remote control and sets password",
"type": "string"
},
"inactivity_timer": { "inactivity_timer": {
"title": "Inactivity Timer", "title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.", "description": "Send RRC connection release after this time (in ms) of network inactivity.",
...@@ -326,6 +331,21 @@ ...@@ -326,6 +331,21 @@
"description": "Average TX/RX diff threshold above which baseband latency promise will fail", "description": "Average TX/RX diff threshold above which baseband latency promise will fail",
"type": "number", "type": "number",
"default": 7 "default": 7
},
"xlog_fluentbit_forward_host": {
"title": "Address to Forward Xlog by Fluenbit",
"description": "Address of Remote Fluentd or Fluentbit Server to Forward Xlog",
"type": "string"
},
"xlog_fluentbit_forward_port": {
"title": "Port to Forward Xlog by Fluentbit",
"description": "Optional Port of Remote Fluentd or Fluentbit Server to Forward Xlog",
"type": "string"
},
"xlog_fluentbit_forward_shared_key": {
"title": "Shared Key to Forward Xlog by Fluentbit",
"description": "Secret Key Shared with Remote Fluentd or Fluentbit Server for Authentication when Forwarding Xlog",
"type": "string"
} }
} }
} }
...@@ -5,6 +5,9 @@ parts = ...@@ -5,6 +5,9 @@ parts =
gnb-config gnb-config
enb-service enb-service
xamari-xlog-service xamari-xlog-service
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
xlog-fluentbit-service
{% endif %}
amarisoft-stats-service amarisoft-stats-service
amarisoft-rf-info-service amarisoft-rf-info-service
check-sdr-busy.py check-sdr-busy.py
...@@ -133,7 +136,11 @@ drb_stats_logspec = ...@@ -133,7 +136,11 @@ drb_stats_logspec =
rotatespec = 100MB.9 rotatespec = 100MB.9
logspec = ${:stats_logspec} ${:drb_stats_logspec} logspec = ${:stats_logspec} ${:drb_stats_logspec}
logspec = ${:stats_logspec} ${:drb_stats_logspec} logspec = ${:stats_logspec} ${:drb_stats_logspec}
{% if slapparameter_dict.get("websocket_password", "") %}
websock = ws://[${slap-configuration:ipv6-random}]:9001
{% else %}
websock = ws://127.0.1.2:9001 websock = ws://127.0.1.2:9001
{% endif %}
xamari = {{ buildout_directory }}/bin/xamari xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/gnb.xlog logfile = ${monitor-directory:public}/gnb.xlog
inline = inline =
...@@ -146,6 +153,43 @@ wrapper-path = ${directory:service}/${:_buildout_section_name_} ...@@ -146,6 +153,43 @@ wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output} command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line} hash-files = ${:command-line}
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
[xlog-fluentbit-config]
recipe = slapos.recipe.template
output = ${directory:etc}/${:_buildout_section_name_}.cfg
logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }}
forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ ors_id['ors-id'] }}
inline =
[SERVICE]
flush 5
[INPUT]
name tail
path ${:logfile}
Read_from_Head True
[OUTPUT]
name forward
match *
Host ${:forward-host}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_port') %}
Port ${:forward-port}
{%- endif %}
Shared_Key ${:forward-shared-key}
Self_Hostname ${:forward-self-hostname}
tls on
tls.verify off
[xlog-fluentbit-service]
recipe = slapos.cookbook:wrapper
fluentbit = {{ fluent_bit_location }}/bin/fluent-bit
fluentbit-config = ${xlog-fluentbit-config:output}
command-line = ${:fluentbit} -c ${:fluentbit-config}
wrapper-path = ${directory:service}/${:_buildout_section_name_}
hash-files = ${:fluentbit-config}
{% endif %}
[amarisoft-stats-template] [amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
...@@ -225,6 +269,9 @@ output = ${directory:etc}/gnb.cfg ...@@ -225,6 +269,9 @@ output = ${directory:etc}/gnb.cfg
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
{%- if slapparameter_dict.get("websocket_password", "") %}
websocket_url = ws://[${slap-configuration:ipv6-random}]:9001
{%- endif %}
gnb-ipv6 = ${slap-configuration:ipv6-random} gnb-ipv6 = ${slap-configuration:ipv6-random}
gnb-ipv4 = {{ lan_ipv4 }} gnb-ipv4 = {{ lan_ipv4 }}
ors-version = {{ ors_version['ors-version'] }} ors-version = {{ ors_version['ors-version'] }}
......
...@@ -207,6 +207,16 @@ init = ...@@ -207,6 +207,16 @@ init =
except: except:
options['ipv4'] = "0.0.0.0" options['ipv4'] = "0.0.0.0"
[ors-id]
recipe = slapos.recipe.build
computer = $${slap-connection:computer-id}
title = $${slap-configuration:root-instance-title}
init =
import socket
options['hostname'] = socket.gethostname()
ors_id = '__'.join(options[x] for x in ('hostname', 'computer', 'title'))
options['ors-id'] = ors_id
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
enb = dynamic-template-enb:output enb = dynamic-template-enb:output
...@@ -237,6 +247,7 @@ extensions = jinja2.ext.do ...@@ -237,6 +247,7 @@ extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
section ors_version ors-version section ors_version ors-version
section ors_id ors-id
key enb amarisoft:enb key enb amarisoft:enb
key sdr amarisoft:sdr key sdr amarisoft:sdr
raw enb_template ${enb.jinja2.cfg:target} raw enb_template ${enb.jinja2.cfg:target}
...@@ -270,6 +281,7 @@ extensions = jinja2.ext.do ...@@ -270,6 +281,7 @@ extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
section ors_version ors-version section ors_version ors-version
section ors_id ors-id
key enb amarisoft:enb key enb amarisoft:enb
key sdr amarisoft:sdr key sdr amarisoft:sdr
raw gnb_template ${gnb.jinja2.cfg:target} raw gnb_template ${gnb.jinja2.cfg:target}
......
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