Commit a45763bc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bf63e8c4
...@@ -135,8 +135,8 @@ md5sum = 44fc9ee5082dd8e0298801f8d4618b06 ...@@ -135,8 +135,8 @@ md5sum = 44fc9ee5082dd8e0298801f8d4618b06
filename = config/dnsmasq-core-network.jinja2.cfg filename = config/dnsmasq-core-network.jinja2.cfg
md5sum = f167b4be5e327b276b42267e0678f577 md5sum = f167b4be5e327b276b42267e0678f577
[dnsmasq-enb.jinja2.cfg] [ru_dnsmasq.jinja2.cfg]
filename = config/dnsmasq-enb.jinja2.cfg filename = ru/dnsmasq.jinja2.cfg
md5sum = ade86715b6121b654552b11d7c756c10 md5sum = ade86715b6121b654552b11d7c756c10
[ims.jinja2.cfg] [ims.jinja2.cfg]
......
...@@ -19,7 +19,6 @@ parts = ...@@ -19,7 +19,6 @@ parts =
sshd-add-authorized-key sshd-add-authorized-key
sshd-promise sshd-promise
{% endif %} {% endif %}
dnsmasq-service
check-baseband-latency.py check-baseband-latency.py
check-amarisoft-stats-log.py check-amarisoft-stats-log.py
...@@ -123,36 +122,6 @@ environment = ...@@ -123,36 +122,6 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = {{dnsmasq_template}}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = ${directory:etc}/${:filename}
context =
import json_module json
import netaddr netaddr
section directory directory
section vtap_jdict vtap_jdict
json iru_dict {{ rulib.iru_dict | tojson }}
[dnsmasq-service]
recipe = slapos.cookbook:wrapper
port = 5353
#ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file=${dnsmasq-config:output} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
${dnsmasq-config:output}
#[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}
[xamari-xlog-script] [xamari-xlog-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
......
...@@ -314,7 +314,7 @@ extra-context = ...@@ -314,7 +314,7 @@ extra-context =
raw netcapdo ${netcapdo:exe} raw netcapdo ${netcapdo:exe}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_lte_inactivity_timer ${default-params:default-lte-inactivity-timer} raw default_lte_inactivity_timer ${default-params:default-lte-inactivity-timer}
raw dnsmasq_template ${dnsmasq-enb.jinja2.cfg:target} raw ru_dnsmasq_template ${ru_dnsmasq.jinja2.cfg:target}
raw dnsmasq_location ${dnsmasq:location} raw dnsmasq_location ${dnsmasq:location}
raw fluent_bit_location ${fluent-bit:location} raw fluent_bit_location ${fluent-bit:location}
raw openssh_location ${openssh:location} raw openssh_location ${openssh:location}
......
...@@ -14,6 +14,9 @@ parts += ...@@ -14,6 +14,9 @@ parts +=
[ru_libinstance.jinja2.cfg] [ru_libinstance.jinja2.cfg]
<= download-base <= download-base
[ru_dnsmasq.jinja2.cfg]
<= copy-config-to-instance
[ru_tapsplit] [ru_tapsplit]
<= download-base <= download-base
......
...@@ -128,6 +128,38 @@ init = ...@@ -128,6 +128,38 @@ init =
{%- endfor %} {%- endfor %}
{#- provide CPRI-based RUs IP address via DHCP #}
{%- if ntap > 0 %}
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = {{dnsmasq_template}}
filename = dnsmasq.cfg
extensions = jinja2.ext.do
output = ${directory:etc}/${:filename}
context =
import json_module json
import netaddr netaddr
section directory directory
section vtap_jdict vtap_jdict
json iru_dict {{ rulib.iru_dict | tojson }}
{{ part('dnsmasq-service') }}
recipe = slapos.cookbook:wrapper
port = 5353
#ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file=${dnsmasq-config:output} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
${dnsmasq-config:output}
# {# promise('dnsmasq-listen') #}
#promise = check_socket_listening
#config-host = ${dnsmasq-service:ip}
#config-port = ${dnsmasq-service:port}
{%- endif %}
{#- go through all RUs and for each RU emit generic promises and invoke {#- go through all RUs and for each RU emit generic promises and invoke
RU-specific buildout handler #} RU-specific buildout handler #}
......
...@@ -25,7 +25,6 @@ parts += ...@@ -25,7 +25,6 @@ parts +=
# copy all configs by default # copy all configs by default
mme.jinja2.cfg mme.jinja2.cfg
dnsmasq-core-network.jinja2.cfg dnsmasq-core-network.jinja2.cfg
dnsmasq-enb.jinja2.cfg
ims.jinja2.cfg ims.jinja2.cfg
enb.jinja2.cfg enb.jinja2.cfg
gnb.jinja2.cfg gnb.jinja2.cfg
...@@ -128,8 +127,6 @@ destination = ${buildout:directory}/gadget/${:_buildout_section_name_} ...@@ -128,8 +127,6 @@ destination = ${buildout:directory}/gadget/${:_buildout_section_name_}
<= copy-config-to-instance <= copy-config-to-instance
[dnsmasq-core-network.jinja2.cfg] [dnsmasq-core-network.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
[dnsmasq-enb.jinja2.cfg]
<= copy-config-to-instance
[ims.jinja2.cfg] [ims.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
[ue.jinja2.cfg] [ue.jinja2.cfg]
......
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