Commit ae6a3604 authored by Xavier Thompson's avatar Xavier Thompson

software/ors-amarisoft: Add xamari xlog service

Add a service that runs `xamari xlog stats[samples,rf]/<period>s` in
enb/gnb instance. For now the resulting logfile enb.xlog/gnb.xlog is
placed in monitor public folder to be served by monitor http server.

Optionally the service also includes `x.drb_stats/<period>s`, which
implies 100Hz polling. This is enabled by default.
parent b4243d76
......@@ -36,11 +36,11 @@ md5sum = e0b68a87238282568e0e04c792ec7288
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = a7448167f7433a50938bf6d3e6903065
md5sum = 0ce4903f550b494399062e90a4e0e3a3
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = afa508e78851fe151fd25d8781aaa34a
md5sum = 84b1bd55e8887388cf5fd2cb7b5816d3
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
......
......@@ -4,6 +4,7 @@ parts =
ltelogs
enb-config
enb-service
xamari-xlog-service
amarisoft-stats-service
amarisoft-rf-info-service
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
......@@ -133,6 +134,30 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[xamari-xlog-script]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
stats_logspec = stats[samples,rf]/${:period}s
{%- if slapparameter_dict.get("enb_drb_stats_enabled", True) %}
drb_stats_logspec = x.drb_stats/${:period}s
{%- else %}
drb_stats_logspec =
{%- endif %}
logspec = ${:stats_logspec} ${:drb_stats_logspec}
websock = ws://127.0.1.2:9001
xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/enb.xlog
inline =
#!/bin/sh
exec ${:xamari} xlog ${:websock} ${:logspec} > ${:logfile}
[xamari-xlog-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
[amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
......
......@@ -4,6 +4,7 @@ parts =
ltelogs
gnb-config
enb-service
xamari-xlog-service
amarisoft-stats-service
amarisoft-rf-info-service
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
......@@ -134,6 +135,30 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[xamari-xlog-script]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
stats_logspec = stats[samples,rf]/${:period}s
{%- if slapparameter_dict.get("gnb_drb_stats_enabled", True) %}
drb_stats_logspec = x.drb_stats/${:period}s
{%- else %}
drb_stats_logspec =
{%- endif %}
logspec = ${:stats_logspec} ${:drb_stats_logspec}
websock = ws://127.0.1.2:9001
xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/gnb.xlog
inline =
#!/bin/sh
exec ${:xamari} xlog ${:websock} ${:logspec} > ${:logfile}
[xamari-xlog-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
[amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
......
......@@ -9,6 +9,9 @@ extends =
../../component/python3/buildout.cfg
../../component/python-pynacl/buildout.cfg
../../component/bcrypt/buildout.cfg
../../component/numpy/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/git/buildout.cfg
parts +=
template
......@@ -34,7 +37,7 @@ parts +=
rsvp.js
iperf3
eggs
xamari
# unimplemented parts - the http monitor and better log handling using logrotate
# apache-php
# logrotate
......@@ -175,6 +178,25 @@ eggs =
ncclient
interpreter = pythonwitheggs
[xlte-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/kirr/xlte.git
revision = 58220253
git-executable = ${git:location}/bin/git
[xlte]
recipe = zc.recipe.egg:develop
setup = ${xlte-repository:location}
egg = xlte
depends =
${numpy:egg}
${pygolang:egg}
[xamari]
recipe = zc.recipe.egg
eggs = ${xlte:egg}
scripts = xamari
[versions]
websocket-client = 1.4.2
ncclient = 0.6.13
......
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