Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
ab19564d
Commit
ab19564d
authored
Apr 24, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ors-amarisoft: add dnsmasq service to core network
parent
0092ab02
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
103 additions
and
12 deletions
+103
-12
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+7
-3
software/ors-amarisoft/config/dnsmasq.jinja2.cfg
software/ors-amarisoft/config/dnsmasq.jinja2.cfg
+18
-0
software/ors-amarisoft/config/mme.jinja2.cfg
software/ors-amarisoft/config/mme.jinja2.cfg
+4
-0
software/ors-amarisoft/instance-core-network-input-schema.json
...are/ors-amarisoft/instance-core-network-input-schema.json
+6
-0
software/ors-amarisoft/instance-core-network.jinja2.cfg
software/ors-amarisoft/instance-core-network.jinja2.cfg
+24
-2
software/ors-amarisoft/instance-tdd-enb-input-schema.json
software/ors-amarisoft/instance-tdd-enb-input-schema.json
+6
-0
software/ors-amarisoft/instance-tdd-gnb-input-schema.json
software/ors-amarisoft/instance-tdd-gnb-input-schema.json
+6
-0
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+20
-1
software/ors-amarisoft/software-base.cfg
software/ors-amarisoft/software-base.cfg
+6
-0
software/ors-amarisoft/test/test.jinja2.py
software/ors-amarisoft/test/test.jinja2.py
+1
-1
software/ors-amarisoft/test/testTDD.py
software/ors-amarisoft/test/testTDD.py
+1
-1
software/ors-amarisoft/test/testTDD1900.py
software/ors-amarisoft/test/testTDD1900.py
+1
-1
software/ors-amarisoft/test/testTDD2600.py
software/ors-amarisoft/test/testTDD2600.py
+1
-1
software/ors-amarisoft/test/testTDD3500.py
software/ors-amarisoft/test/testTDD3500.py
+1
-1
software/ors-amarisoft/test/testTDD3700.py
software/ors-amarisoft/test/testTDD3700.py
+1
-1
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
ab19564d
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
60945a3c51ad6704c1f02b2e43018bba
md5sum =
a0c646cb609946b3535ee1383c401e01
[amarisoft-stats.jinja2.py]
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
_update_hash_filename_ = amarisoft-stats.jinja2.py
...
@@ -44,7 +44,7 @@ md5sum = b2a1816ceb8e7f475e71454e5389d091
...
@@ -44,7 +44,7 @@ md5sum = b2a1816ceb8e7f475e71454e5389d091
[template-core-network]
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum =
5a46abb4310fa7fa8015fb0cde6cd87f
md5sum =
b4af66e7cdb3be1d48eabd14488bea24
[template-ue-lte]
[template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
...
@@ -80,7 +80,11 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
...
@@ -80,7 +80,11 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg]
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
filename = config/mme.jinja2.cfg
md5sum = 3b3ab394e5303ec39fdcdd849a749550
md5sum = c153d191c91a3bf28bae8724b0deb616
[dnsmasq.jinja2.cfg]
filename = config/dnsmasq.jinja2.cfg
md5sum = 972fbdd1c19aadec519b83731d26b608
[ims.jinja2.cfg]
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
filename = config/ims.jinja2.cfg
...
...
software/ors-amarisoft/config/dnsmasq.jinja2.cfg
0 → 100644
View file @
ab19564d
interface={{ slap_configuration.get('tun-name', '') }}
port=5353
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slap_configuration.get('slave-instance-list', []) %}
{%- if slave_instance.get('_', '') != '' %}
{%- set slave = json_module.loads(slave_instance.pop('_')) %}
{%- else %}
{%- set slave = slave_instance %}
{%- endif %}
{%- if slave.get('domain', '') != '' %}
{%- do filtered_slave_instance_list.append(slave) %}
{%- endif %}
{%- endfor -%}
{%- for i, slave in enumerate(filtered_slave_instance_list) -%}
address=/{{ slave['domain'] }}/{{ slave.get('ip', '') }}
{% endfor -%}
software/ors-amarisoft/config/mme.jinja2.cfg
View file @
ab19564d
...
@@ -55,7 +55,11 @@
...
@@ -55,7 +55,11 @@
pdn_type: "ipv4v6",
pdn_type: "ipv4v6",
first_ipv6_prefix: "{{ netaddr.IPAddress(slap_configuration.get('tun-ipv6-addr', '')) + 1 }}",
first_ipv6_prefix: "{{ netaddr.IPAddress(slap_configuration.get('tun-ipv6-addr', '')) + 1 }}",
last_ipv6_prefix: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv6-network', '')).last) - 1 }}",
last_ipv6_prefix: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv6-network', '')).last) - 1 }}",
{% if slapparameter_dict.get('dnsmasq', False) %}
dns_addr: ["{{ slap_configuration.get('tun-ipv4-addr', '') }}"],
{% else %}
dns_addr: ["8.8.8.8", "2001:4860:4860::8888"],
dns_addr: ["8.8.8.8", "2001:4860:4860::8888"],
{% endif %}
{% else %}
{% else %}
pdn_type: "ipv4",
pdn_type: "ipv4",
dns_addr: "8.8.8.8",
dns_addr: "8.8.8.8",
...
...
software/ors-amarisoft/instance-core-network-input-schema.json
View file @
ab19564d
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
"description"
:
"Activate iperf3 UDP server"
,
"description"
:
"Activate iperf3 UDP server"
,
"type"
:
"boolean"
"type"
:
"boolean"
},
},
"dnsmasq"
:
{
"default"
:
false
,
"title"
:
"dnsmasq"
,
"description"
:
"dnsmasq"
,
"type"
:
"boolean"
},
"use_ipv4"
:
{
"use_ipv4"
:
{
"default"
:
false
,
"default"
:
false
,
"title"
:
"Use IPv4"
,
"title"
:
"Use IPv4"
,
...
...
software/ors-amarisoft/instance-core-network.jinja2.cfg
View file @
ab19564d
...
@@ -22,7 +22,10 @@ parts =
...
@@ -22,7 +22,10 @@ parts =
publish-connection-information
publish-connection-information
{% if slapparameter_dict.get("iperf3", None) %}
{% if slapparameter_dict.get("iperf3", None) %}
iperf-service
iperf-service
port-listening-promise
iperf-listen-promise
{% endif %}
{% if slapparameter_dict.get("dnsmasq", None) %}
dnsmasq-service
{% endif %}
{% endif %}
{% for part in part_list -%}
{% for part in part_list -%}
{{ ' %s' % part }}
{{ ' %s' % part }}
...
@@ -170,7 +173,7 @@ wrapper-path = ${directory:service}/iperf3
...
@@ -170,7 +173,7 @@ wrapper-path = ${directory:service}/iperf3
mode = 0775
mode = 0775
pidfile = ${directory:run}/iperf3.pid
pidfile = ${directory:run}/iperf3.pid
[
port-listening
-promise]
[
iperf-listen
-promise]
<= monitor-promise-base
<= monitor-promise-base
promise = check_socket_listening
promise = check_socket_listening
name = iperf3-port-listening.py
name = iperf3-port-listening.py
...
@@ -204,6 +207,25 @@ url = {{ mme_template }}
...
@@ -204,6 +207,25 @@ url = {{ mme_template }}
{% endif %}
{% endif %}
output = ${directory:etc}/mme.cfg
output = ${directory:etc}/mme.cfg
{% if slapparameter_dict.get("dnsmasq", None) %}
[dnsmasq-service]
recipe = slapos.cookbook:wrapper
port = 5353
ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file={{ dnsmasq_config_path }} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
{{ dnsmasq_config_path }}
#[dnsmasq-listen-promise]
#<= monitor-promise-base
#promise = check_socket_listening
#name = dnsmasq-port-listening.py
#config-host = ${dnsmasq-service:ip}
#config-port = ${dnsmasq-service:port}
{% endif %}
[monitor-instance-parameter]
[monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %}
{% if slapparameter_dict.get("name", None) %}
monitor-title = {{ slapparameter_dict['name'] | string }}
monitor-title = {{ slapparameter_dict['name'] | string }}
...
...
software/ors-amarisoft/instance-tdd-enb-input-schema.json
View file @
ab19564d
...
@@ -162,6 +162,12 @@
...
@@ -162,6 +162,12 @@
"type"
:
"number"
,
"type"
:
"number"
,
"default"
:
60
"default"
:
60
},
},
"enb_drb_stats_enabled"
:
{
"title"
:
"Enable eNB drb statistics"
,
"description"
:
"Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI"
,
"type"
:
"boolean"
,
"default"
:
true
},
"max_rx_sample_db"
:
{
"max_rx_sample_db"
:
{
"title"
:
"Maximum RX sample value (dB)"
,
"title"
:
"Maximum RX sample value (dB)"
,
"description"
:
"Maximum RX sample threshold above which RX saturated promise will fail"
,
"description"
:
"Maximum RX sample threshold above which RX saturated promise will fail"
,
...
...
software/ors-amarisoft/instance-tdd-gnb-input-schema.json
View file @
ab19564d
...
@@ -284,6 +284,12 @@
...
@@ -284,6 +284,12 @@
"type"
:
"number"
,
"type"
:
"number"
,
"default"
:
60
"default"
:
60
},
},
"gnb_drb_stats_enabled"
:
{
"title"
:
"Enable gNB drb statistics"
,
"description"
:
"Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI"
,
"type"
:
"boolean"
,
"default"
:
true
},
"max_rx_sample_db"
:
{
"max_rx_sample_db"
:
{
"title"
:
"Maximum RX sample value (dB)"
,
"title"
:
"Maximum RX sample value (dB)"
,
"description"
:
"Maximum RX sample threshold above which RX saturated promise will fail"
,
"description"
:
"Maximum RX sample threshold above which RX saturated promise will fail"
,
...
...
software/ors-amarisoft/instance.cfg
View file @
ab19564d
...
@@ -6,6 +6,12 @@ eggs-directory = ${buildout:eggs-directory}
...
@@ -6,6 +6,12 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
software = ${buildout:directory}
home = $${buildout:directory}
etc = $${:home}/etc
[slap-configuration]
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
computer = $${slap-connection:computer-id}
...
@@ -148,12 +154,15 @@ extra-context =
...
@@ -148,12 +154,15 @@ extra-context =
raw monitor_template ${monitor2-template:output}
raw monitor_template ${monitor2-template:output}
key mme amarisoft:mme
key mme amarisoft:mme
raw mme_template ${mme.jinja2.cfg:target}
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw ims_template ${ims.jinja2.cfg:target}
raw ims_template ${ims.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
raw iperf3_location ${iperf3:location}
raw dnsmasq_location ${dnsmasq:location}
key ue_db_path ue-db-config:output
key ue_db_path ue-db-config:output
key dnsmasq_config_path dnsmasq-config:output
key slave_instance_list slap-configuration:slave-instance-list
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-ue-lte]
[dynamic-template-ue-lte]
...
@@ -206,7 +215,17 @@ recipe = slapos.recipe.template:jinja2
...
@@ -206,7 +215,17 @@ recipe = slapos.recipe.template:jinja2
url = ${ue_db.jinja2.cfg:target}
url = ${ue_db.jinja2.cfg:target}
filename = ue_db.cfg
filename = ue_db.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
output = $${
buildout:directory
}/$${:filename}
output = $${
directory:etc
}/$${:filename}
context =
context =
import json_module json
import json_module json
key slave_instance_list slap-configuration:slave-instance-list
key slave_instance_list slap-configuration:slave-instance-list
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = ${dnsmasq.jinja2.cfg:target}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = $${directory:etc}/$${:filename}
context =
import json_module json
section slap_configuration slap-configuration
software/ors-amarisoft/software-base.cfg
View file @
ab19564d
...
@@ -12,6 +12,7 @@ extends =
...
@@ -12,6 +12,7 @@ extends =
../../component/numpy/buildout.cfg
../../component/numpy/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/git/buildout.cfg
../../component/git/buildout.cfg
../../component/dnsmasq/buildout.cfg
parts +=
parts +=
template
template
...
@@ -19,6 +20,7 @@ parts +=
...
@@ -19,6 +20,7 @@ parts +=
ltelogs.jinja2.sh
ltelogs.jinja2.sh
# copy all configs by default
# copy all configs by default
mme.jinja2.cfg
mme.jinja2.cfg
dnsmasq.jinja2.cfg
ims.jinja2.cfg
ims.jinja2.cfg
enb.jinja2.cfg
enb.jinja2.cfg
gnb.jinja2.cfg
gnb.jinja2.cfg
...
@@ -36,6 +38,7 @@ parts +=
...
@@ -36,6 +38,7 @@ parts +=
software.cfg.html
software.cfg.html
rsvp.js
rsvp.js
iperf3
iperf3
dnsmasq
eggs
eggs
xamari
xamari
# unimplemented parts - the http monitor and better log handling using logrotate
# unimplemented parts - the http monitor and better log handling using logrotate
...
@@ -135,6 +138,9 @@ filename = ue_db.jinja2.cfg
...
@@ -135,6 +138,9 @@ filename = ue_db.jinja2.cfg
[mme.jinja2.cfg]
[mme.jinja2.cfg]
<= copy-config-to-instance
<= copy-config-to-instance
filename = mme.jinja2.cfg
filename = mme.jinja2.cfg
[dnsmasq.jinja2.cfg]
<= copy-config-to-instance
filename = dnsmasq.jinja2.cfg
[ims.jinja2.cfg]
[ims.jinja2.cfg]
<= copy-config-to-instance
<= copy-config-to-instance
filename = ims.jinja2.cfg
filename = ims.jinja2.cfg
...
...
software/ors-amarisoft/test/test.jinja2.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
software/ors-amarisoft/test/testTDD.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
software/ors-amarisoft/test/testTDD1900.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
software/ors-amarisoft/test/testTDD2600.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
software/ors-amarisoft/test/testTDD3500.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
software/ors-amarisoft/test/testTDD3700.py
View file @
ab19564d
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
...
@@ -223,7 +223,7 @@ def test_mme_conf(self):
def
test_sim_card
(
self
):
def
test_sim_card
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'ue_db.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'
etc'
,
'
ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yaml
.
load
(
f
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment