Commit 94a92c84 authored by Łukasz Nowak's avatar Łukasz Nowak

Update Release Candidate

parents 7618c299 9b0e8316
......@@ -24,8 +24,8 @@ min_version = 8
[trafficserver]
recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.2.tar.bz2
md5sum = 4dbe434e6cc2bd6ab9a0bf48af312f4b
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.3.tar.bz2
md5sum = 020e09019d38704a2cf96f4ae8450709
shared = true
patch-options = -p1
configure-options =
......
......@@ -21,7 +21,7 @@ md5sum = ef264514b64a4b2c77c9965c587c6d34
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = a48e0026e2b949cc334efcb21478a6ed
md5sum = 743f7ec8718de67f31720a68258a5ff2
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
......
......@@ -204,7 +204,7 @@ post = kill -USR1 $(cat ${html5as:path_pid})
# Publish nginx address
[publish-connection-information]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish.serialised
# By extending monitor publish, all the section deploying monitoring will
# be deployed. The parameters needed for accessing monitoring will be published
<= monitor-publish
......
......@@ -22,8 +22,8 @@ part = python3
[metabase.jar]
recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.43.1/metabase.jar
md5sum = 8033ba58825239e7dff29be8d4c885a7
url = https://downloads.metabase.com/v0.44.1/metabase.jar
md5sum = a97e8e67a0cc647f7c44ca787eb9a41a
[instance-profile]
recipe = slapos.recipe.template
......
......@@ -24,7 +24,7 @@ md5sum = b10c10a9408a934052fd0960f31a75fc
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = c5a82279b6ada358c74a90c3b660bf55
md5sum = c450b8c307d20738a98bcb4f6ffeee16
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
......@@ -36,11 +36,11 @@ md5sum = 2cfe5679374559ab94478b987d646d83
[template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = eabbdb8ced563180f0bba8ca06e4bac4
md5sum = 9732653a0e2c7fe91d80da80762430d2
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = 2c2d2dc4fd6b7a9100642e34812a5140
md5sum = 51b8762d4691f525d0228fa1f286e772
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
......@@ -48,7 +48,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 4b66551e04edff724b08d6bb90f7342c
md5sum = faed74244d0c539dea53a0377ad0e103
[sib23.asn]
filename = config/sib23.asn
......@@ -64,16 +64,16 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
md5sum = a96c33a0a2a301f204cac8642267ad97
md5sum = 0c1e086de705f074654a794a2248cad0
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c
[sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.py
md5sum = f7436ff76fea58e37a401d4712275422
_update_hash_filename_ = promise/check_sdr_busy.jinja2.py
md5sum = 93dacb1da15310eb70d0815711a06cdf
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py
md5sum = 505efcbe04e717088924f2267b10c2b9
_update_hash_filename_ = promise/check_interface_up.jinja2.py
md5sum = 63d3bbac7b6f480ee0c510e80aa1ccf7
......@@ -56,9 +56,7 @@
{%- endif %}
plmn: "{{ slapparameter_dict['plmn_list'][k]['plmn'] }}",
reserved: {{ str(slapparameter_dict['plmn_list'][k].get('reserved', false)).lower() }},
{%- if slapparameter_dict['plmn_list'][k].get('attach_without_pdn', '') %}
attach_without_pdn: {{ str(slapparameter_dict['plmn_list'][k]['attach_without_pdn']).lower() }},
{%- endif %}
attach_without_pdn: {{ str(slapparameter_dict['plmn_list'][k].get('attach_without_pdn', false)).lower() }},
}
{%- endfor -%}
{% else %}
......
......@@ -51,15 +51,15 @@
pdn_list: [
{
pdn_type: "ipv4",
tun_ifname: "{{ slap_configuration['tun-name'] }}",
tun_ifname: "{{ slap_configuration.get('tun-name', '') }}",
access_point_name: ["default", "internet", "ims", "sos"],
first_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).first) + 2 }}",
last_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).last) - 1 }}",
{% if slap_configuration.get('tun-name', '') %}
first_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv4-network', '')).first) + 2 }}",
last_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration.get('tun-ipv4-network', '')).last) - 1 }}",
{% endif %}
ip_addr_shift: 2,
dns_addr: "8.8.8.8",
// TODO: enable this instead of Google's DNS above
// dns_addr: "{{ slap_configuration['tun-ipv4-addr'] }}",
p_cscf_addr: ["{{ slap_configuration['tun-ipv4-addr'] }}"],
p_cscf_addr: ["{{ slap_configuration.get('tun-ipv4-addr', '') }}"],
erabs: [
{
......
......@@ -73,8 +73,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.log 2>> ${directory:log}/enb-output.log
{% endif %}
### eNodeB (enb)
[lte-enb-service]
......@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = {{ sdr_busy_promise }}
file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py
......@@ -74,8 +74,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.log 2>> ${directory:log}/gnb-output.log
{% endif %}
### eNodeB (enb)
[lte-enb-service]
......@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = {{ sdr_busy_promise }}
file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py
......@@ -84,8 +84,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
rm -f ${directory:var}/lte_ue.db;
{{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.log 2>> ${directory:log}/mme-output.log
{% endif %}
### MME
[lte-mme-service]
......@@ -152,10 +154,17 @@ recipe = slapos.cookbook:publish.serialised
epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }}
# Add custom promise to check if /dev/sdr0 is busy
[tun-up-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ interface_up_promise }}
output = ${directory:etc}/check-tun-up.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if tun is up
[tun-up-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = {{ interface_up_promise }}
file = ${tun-up-promise-template:output}
output = ${directory:plugins}/check-tun-up.py
config-ifname = ${slap-configuration:tun-name}
......@@ -27,7 +27,12 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
ifname = self.getConfig('ifname')
ifname = "{{ slapparameter_dict.get('tun-name', '') }}"
testing = {{ slapparameter_dict.get('testing', False) }}
if testing:
self.logger.info("skipping promise")
return
f = open('/sys/class/net/%s/operstate' % ifname, 'r')
if f.read() == 'up\n':
......
......@@ -27,7 +27,13 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
testing = {{ slapparameter_dict.get('testing', False) }}
sdr_dev = '/dev/sdr0'
if testing:
self.logger.info("skipping promise")
return
try:
open(sdr_dev, 'w').close()
self.logger.error("eNB is not using %s", sdr_dev)
......
......@@ -108,11 +108,16 @@ with open('instance-gnb-input-schema.jinja2.json', 'r') as f:
instance_gnb_json_template = Template(f.read())
with open('software.jinja2.cfg', 'r') as f:
software_template = Template(f.read())
with open('test/test.jinja2.py', 'r') as f:
test_template = Template(f.read())
for rf_mode_context in rf_mode_context_list:
with open('software-{}.cfg.json'.format(rf_mode_context['rf_mode']),
'w+') as f:
f.write(software_json_template.render(**rf_mode_context, **global_context) + '\n')
with open('test/test{}.py'.format(rf_mode_context['rf_mode'].upper()),
'w+') as f:
f.write(test_template.render(**rf_mode_context, **global_context) + '\n')
with open('software-{}.cfg'.format(rf_mode_context['rf_mode']),
'w+') as f:
f.write(software_template.render(**rf_mode_context, **global_context) + '\n')
......
Tests for ors-amarisoft software release
##############################################################################
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.ors_amarisoft'
with open("README.md") as f:
long_description = f.read()
setup(
name=name,
version=version,
description="Test for SlapOS' ors-amarisoft",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.libnetworkcache',
'slapos.cookbook',
],
zip_safe=True,
test_suite='test',
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -120,6 +120,11 @@ setup = ${slapos-repository:location}/software/slaprunner/test/
egg = slapos.test.metabase
setup = ${slapos-repository:location}/software/metabase/test/
[slapos.test.ors-amarisoft-setup]
<= setup-develop-egg
egg = slapos.test.ors-amarisoft
setup = ${slapos-repository:location}/software/ors-amarisoft/test/
[slapos.test.fluentd-setup]
<= setup-develop-egg
egg = slapos.test.fluentd
......@@ -281,6 +286,7 @@ extra-eggs =
${slapos.test.kvm-setup:egg}
${slapos.test.matomo-setup:egg}
${slapos.test.metabase-setup:egg}
${slapos.test.ors-amarisoft-setup:egg}
${slapos.test.monitor-setup:egg}
${slapos.test.nextcloud-setup:egg}
${slapos.test.nginx-push-stream-setup:egg}
......@@ -351,6 +357,7 @@ tests =
erp5 ${slapos.test.erp5-setup:setup}
fluentd ${slapos.test.fluentd-setup:setup}
metabase ${slapos.test.metabase-setup:setup}
ors-amarisoft ${slapos.test.ors-amarisoft-setup:setup}
###
${:extra}
......
......@@ -149,7 +149,6 @@ link-binary =
[template-run-zelenium]
< = download-base
[template]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
......@@ -229,6 +228,11 @@ context =
key unixodbc_location unixodbc:location
key wget_location wget:location
key extra_path_list eggs:extra-paths
key python_executable_for_kernel erp5-python-interpreter-jupyter:interpreter_path
key erp5_kernel_location erp5-kernel:location
key erp5_kernel_filename erp5-kernel:filename
key kernel_json_location kernel-json:location
key kernel_json_filename kernel-json:filename
[template-erp5]
<= download-base
......@@ -392,6 +396,18 @@ initialization =
eggs += ${eggs:eggs}
extra-paths += ${eggs:extra-paths}
[erp5-python-interpreter-jupyter]
<= erp5-python-interpreter
interpreter = pythonwitheggs_jupyter
interpreter_path = ${buildout:directory}/bin/${:interpreter}
eggs +=
jupyter_client
jupyter_core
ipython_genutils
ipykernel
ipywidgets
requests
[zope-product-with-eggtestinfo]
recipe = zc.recipe.egg:custom
setup-eggs =
......
......@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template]
filename = instance.cfg.in
md5sum = 9a7f7888ba4183c9d900e862074f3baf
md5sum = 5747c487edd721d8a53061392307b55f
[template-erp5]
filename = instance-erp5.cfg.in
......@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope]
filename = instance-zope.cfg.in
md5sum = c3e3f8cd985407931b705d15bdedc8d9
md5sum = 57a19c90d281b8cbf3e36207db48f0bd
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -53,6 +53,22 @@ partition. No more (undefined result), no less (IndexError).
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
[erp5-kernel]
recipe = slapos.cookbook:symbolic.link
link-binary = {{ parameter_dict['erp5-kernel-location'] }}/{{ parameter_dict['erp5-kernel-filename'] }}
target-directory = ${directory:erp5-kernel-dir}
[kernel-json-dir]
<= jinja2-template-base
template = {{ parameter_dict['kernel-json-location'] }}/{{ parameter_dict['kernel-json-filename'] }}
rendered = ${directory:erp5-kernel-dir}/kernel.json
context =
raw erp5_url {{ ipv4 }}
raw python_executable {{ parameter_dict['python-executable-for-kernel'] }}
raw kernel_dir ${erp5-kernel:target-directory}/{{ parameter_dict['erp5-kernel-filename'] }}
raw display_name ERP5
raw language_name python
[run-common]
<= userhosts-wrapper-base
environment-extra =
......@@ -66,6 +82,9 @@ environment +=
INSTANCE_HOME=${:instance-home}
CAUCASE={{ slapparameter_dict['caucase-url'] }}
FONTCONFIG_FILE=${fontconfig-conf:output}
JUPYTER_PATH=${directory:jupyter-dir}
JUPYTER_CONFIG_DIR=${directory:jupyter-config-dir}
JUPYTER_RUNTIME_DIR=${directory:jupyter-runtime-dir}
{% if slapparameter_dict.get('wendelin-core-zblk-fmt') %}
WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }}
{% endif %}
......@@ -103,6 +122,11 @@ var = ${buildout:directory}/var
plugin = ${:etc}/plugin
unit-test-path = ${:srv}/test-instance/unit_test
fontconfig-cache = ${buildout:directory}/.fontconfig
jupyter-dir = ${buildout:directory}/jupyter
jupyter-config-dir = ${:jupyter-dir}/etc
jupyter-runtime-dir = ${:jupyter-dir}/runtime
jupyter-kernel-dir = ${:jupyter-dir}/kernels
erp5-kernel-dir = ${:jupyter-kernel-dir}/ERP5
[fontconfig-conf]
recipe = slapos.recipe.template:jinja2
......@@ -575,3 +599,5 @@ extends =
parts +=
{{ '\n '.join(part_list) }}
publish
erp5-kernel
kernel-json-dir
......@@ -114,6 +114,11 @@ extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }}
erp5-location = {{ erp5_location }}
egg-interpreter = {{egg_interpreter}}
erp5-kernel-location = {{ erp5_kernel_location }}
erp5-kernel-filename = {{ erp5_kernel_filename }}
kernel-json-location = {{ kernel_json_location }}
kernel-json-filename = {{ kernel_json_filename }}
python-executable-for-kernel = {{ python_executable_for_kernel }}
[dynamic-template-zope]
<= jinja2-template-base
......
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