Commit ab19564d authored by Joanne Hugé's avatar Joanne Hugé

ors-amarisoft: add dnsmasq service to core network

parent 0092ab02
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 60945a3c51ad6704c1f02b2e43018bba
md5sum = a0c646cb609946b3535ee1383c401e01
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
......@@ -44,7 +44,7 @@ md5sum = b2a1816ceb8e7f475e71454e5389d091
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = 5a46abb4310fa7fa8015fb0cde6cd87f
md5sum = b4af66e7cdb3be1d48eabd14488bea24
[template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
......@@ -80,7 +80,11 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[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]
filename = config/ims.jinja2.cfg
......
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 -%}
......@@ -55,7 +55,11 @@
pdn_type: "ipv4v6",
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 }}",
{% 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"],
{% endif %}
{% else %}
pdn_type: "ipv4",
dns_addr: "8.8.8.8",
......
......@@ -21,6 +21,12 @@
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"dnsmasq": {
"default": false,
"title": "dnsmasq",
"description": "dnsmasq",
"type": "boolean"
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
......
......@@ -22,7 +22,10 @@ parts =
publish-connection-information
{% if slapparameter_dict.get("iperf3", None) %}
iperf-service
port-listening-promise
iperf-listen-promise
{% endif %}
{% if slapparameter_dict.get("dnsmasq", None) %}
dnsmasq-service
{% endif %}
{% for part in part_list -%}
{{ ' %s' % part }}
......@@ -170,7 +173,7 @@ wrapper-path = ${directory:service}/iperf3
mode = 0775
pidfile = ${directory:run}/iperf3.pid
[port-listening-promise]
[iperf-listen-promise]
<= monitor-promise-base
promise = check_socket_listening
name = iperf3-port-listening.py
......@@ -204,6 +207,25 @@ url = {{ mme_template }}
{% endif %}
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]
{% if slapparameter_dict.get("name", None) %}
monitor-title = {{ slapparameter_dict['name'] | string }}
......
......@@ -162,6 +162,12 @@
"type": "number",
"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": {
"title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
......@@ -284,6 +284,12 @@
"type": "number",
"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": {
"title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
......@@ -6,6 +6,12 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[directory]
recipe = slapos.cookbook:mkdirectory
software = ${buildout:directory}
home = $${buildout:directory}
etc = $${:home}/etc
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
......@@ -148,12 +154,15 @@ extra-context =
raw monitor_template ${monitor2-template:output}
key mme amarisoft:mme
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw ims_template ${ims.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
raw dnsmasq_location ${dnsmasq:location}
key ue_db_path ue-db-config:output
key dnsmasq_config_path dnsmasq-config:output
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-ue-lte]
......@@ -206,7 +215,17 @@ recipe = slapos.recipe.template:jinja2
url = ${ue_db.jinja2.cfg:target}
filename = ue_db.cfg
extensions = jinja2.ext.do
output = $${buildout:directory}/$${:filename}
output = $${directory:etc}/$${:filename}
context =
import json_module json
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
......@@ -12,6 +12,7 @@ extends =
../../component/numpy/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/git/buildout.cfg
../../component/dnsmasq/buildout.cfg
parts +=
template
......@@ -19,6 +20,7 @@ parts +=
ltelogs.jinja2.sh
# copy all configs by default
mme.jinja2.cfg
dnsmasq.jinja2.cfg
ims.jinja2.cfg
enb.jinja2.cfg
gnb.jinja2.cfg
......@@ -36,6 +38,7 @@ parts +=
software.cfg.html
rsvp.js
iperf3
dnsmasq
eggs
xamari
# unimplemented parts - the http monitor and better log handling using logrotate
......@@ -135,6 +138,9 @@ filename = ue_db.jinja2.cfg
[mme.jinja2.cfg]
<= copy-config-to-instance
filename = mme.jinja2.cfg
[dnsmasq.jinja2.cfg]
<= copy-config-to-instance
filename = dnsmasq.jinja2.cfg
[ims.jinja2.cfg]
<= copy-config-to-instance
filename = ims.jinja2.cfg
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
......@@ -223,7 +223,7 @@ def test_mme_conf(self):
def test_sim_card(self):
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:
conf = yaml.load(f)
......
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