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

Update Release Candidate

parents 7618c299 9b0e8316
...@@ -24,8 +24,8 @@ min_version = 8 ...@@ -24,8 +24,8 @@ min_version = 8
[trafficserver] [trafficserver]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.2.tar.bz2 url = https://dlcdn.apache.org/trafficserver/trafficserver-9.1.3.tar.bz2
md5sum = 4dbe434e6cc2bd6ab9a0bf48af312f4b md5sum = 020e09019d38704a2cf96f4ae8450709
shared = true shared = true
patch-options = -p1 patch-options = -p1
configure-options = configure-options =
......
...@@ -21,7 +21,7 @@ md5sum = ef264514b64a4b2c77c9965c587c6d34 ...@@ -21,7 +21,7 @@ md5sum = ef264514b64a4b2c77c9965c587c6d34
[instance_html5as] [instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = a48e0026e2b949cc334efcb21478a6ed md5sum = 743f7ec8718de67f31720a68258a5ff2
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -204,7 +204,7 @@ post = kill -USR1 $(cat ${html5as:path_pid}) ...@@ -204,7 +204,7 @@ post = kill -USR1 $(cat ${html5as:path_pid})
# Publish nginx address # Publish nginx address
[publish-connection-information] [publish-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish.serialised
# By extending monitor publish, all the section deploying monitoring will # By extending monitor publish, all the section deploying monitoring will
# be deployed. The parameters needed for accessing monitoring will be published # be deployed. The parameters needed for accessing monitoring will be published
<= monitor-publish <= monitor-publish
......
...@@ -22,8 +22,8 @@ part = python3 ...@@ -22,8 +22,8 @@ part = python3
[metabase.jar] [metabase.jar]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.43.1/metabase.jar url = https://downloads.metabase.com/v0.44.1/metabase.jar
md5sum = 8033ba58825239e7dff29be8d4c885a7 md5sum = a97e8e67a0cc647f7c44ca787eb9a41a
[instance-profile] [instance-profile]
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
...@@ -24,7 +24,7 @@ md5sum = b10c10a9408a934052fd0960f31a75fc ...@@ -24,7 +24,7 @@ md5sum = b10c10a9408a934052fd0960f31a75fc
[template-lte-enb] [template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = c5a82279b6ada358c74a90c3b660bf55 md5sum = c450b8c307d20738a98bcb4f6ffeee16
[template-lte-gnb-epc] [template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg _update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...@@ -36,11 +36,11 @@ md5sum = 2cfe5679374559ab94478b987d646d83 ...@@ -36,11 +36,11 @@ md5sum = 2cfe5679374559ab94478b987d646d83
[template-lte-gnb] [template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = eabbdb8ced563180f0bba8ca06e4bac4 md5sum = 9732653a0e2c7fe91d80da80762430d2
[template-lte-mme] [template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg _update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = 2c2d2dc4fd6b7a9100642e34812a5140 md5sum = 51b8762d4691f525d0228fa1f286e772
[ue_db.jinja2.cfg] [ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg filename = config/ue_db.jinja2.cfg
...@@ -48,7 +48,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149 ...@@ -48,7 +48,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg] [enb.jinja2.cfg]
filename = config/enb.jinja2.cfg filename = config/enb.jinja2.cfg
md5sum = 4b66551e04edff724b08d6bb90f7342c md5sum = faed74244d0c539dea53a0377ad0e103
[sib23.asn] [sib23.asn]
filename = config/sib23.asn filename = config/sib23.asn
...@@ -64,16 +64,16 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd ...@@ -64,16 +64,16 @@ md5sum = 1ba2e065bdf14a6411e95e80db17dcfd
[mme.jinja2.cfg] [mme.jinja2.cfg]
filename = config/mme.jinja2.cfg filename = config/mme.jinja2.cfg
md5sum = a96c33a0a2a301f204cac8642267ad97 md5sum = 0c1e086de705f074654a794a2248cad0
[ims.jinja2.cfg] [ims.jinja2.cfg]
filename = config/ims.jinja2.cfg filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c md5sum = 36281b03597252cf75169417d02fc28c
[sdr-busy-promise] [sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.py _update_hash_filename_ = promise/check_sdr_busy.jinja2.py
md5sum = f7436ff76fea58e37a401d4712275422 md5sum = 93dacb1da15310eb70d0815711a06cdf
[interface-up-promise] [interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py _update_hash_filename_ = promise/check_interface_up.jinja2.py
md5sum = 505efcbe04e717088924f2267b10c2b9 md5sum = 63d3bbac7b6f480ee0c510e80aa1ccf7
...@@ -56,9 +56,7 @@ ...@@ -56,9 +56,7 @@
{%- endif %} {%- endif %}
plmn: "{{ slapparameter_dict['plmn_list'][k]['plmn'] }}", plmn: "{{ slapparameter_dict['plmn_list'][k]['plmn'] }}",
reserved: {{ str(slapparameter_dict['plmn_list'][k].get('reserved', false)).lower() }}, 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].get('attach_without_pdn', false)).lower() }},
attach_without_pdn: {{ str(slapparameter_dict['plmn_list'][k]['attach_without_pdn']).lower() }},
{%- endif %}
} }
{%- endfor -%} {%- endfor -%}
{% else %} {% else %}
......
...@@ -51,15 +51,15 @@ ...@@ -51,15 +51,15 @@
pdn_list: [ pdn_list: [
{ {
pdn_type: "ipv4", pdn_type: "ipv4",
tun_ifname: "{{ slap_configuration['tun-name'] }}", tun_ifname: "{{ slap_configuration.get('tun-name', '') }}",
access_point_name: ["default", "internet", "ims", "sos"], access_point_name: ["default", "internet", "ims", "sos"],
first_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).first) + 2 }}", {% if slap_configuration.get('tun-name', '') %}
last_ip_addr: "{{ netaddr.IPAddress(netaddr.IPNetwork(slap_configuration['tun-ipv4-network']).last) - 1 }}", 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, ip_addr_shift: 2,
dns_addr: "8.8.8.8", dns_addr: "8.8.8.8",
// TODO: enable this instead of Google's DNS above p_cscf_addr: ["{{ slap_configuration.get('tun-ipv4-addr', '') }}"],
// dns_addr: "{{ slap_configuration['tun-ipv4-addr'] }}",
p_cscf_addr: ["{{ slap_configuration['tun-ipv4-addr'] }}"],
erabs: [ erabs: [
{ {
......
...@@ -73,8 +73,10 @@ recipe = slapos.recipe.template ...@@ -73,8 +73,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
inline = inline =
#!/bin/sh #!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true; sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.log 2>> ${directory:log}/enb-output.log {{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.log 2>> ${directory:log}/enb-output.log
{% endif %}
### eNodeB (enb) ### eNodeB (enb)
[lte-enb-service] [lte-enb-service]
...@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }} ...@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }} password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %} {% 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 # Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise] [sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin recipe = slapos.cookbook:promise.plugin
eggs = slapos.core eggs = slapos.core
file = {{ sdr_busy_promise }} file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py output = ${directory:plugins}/check-sdr-busy.py
...@@ -74,8 +74,10 @@ recipe = slapos.recipe.template ...@@ -74,8 +74,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
inline = inline =
#!/bin/sh #!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true; sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.log 2>> ${directory:log}/gnb-output.log {{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.log 2>> ${directory:log}/gnb-output.log
{% endif %}
### eNodeB (enb) ### eNodeB (enb)
[lte-enb-service] [lte-enb-service]
...@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }} ...@@ -125,9 +127,17 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }} password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %} {% 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 # Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise] [sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin recipe = slapos.cookbook:promise.plugin
eggs = slapos.core eggs = slapos.core
file = {{ sdr_busy_promise }} file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py output = ${directory:plugins}/check-sdr-busy.py
...@@ -84,8 +84,10 @@ recipe = slapos.recipe.template ...@@ -84,8 +84,10 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
inline = inline =
#!/bin/sh #!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
rm -f ${directory:var}/lte_ue.db; rm -f ${directory:var}/lte_ue.db;
{{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.log 2>> ${directory:log}/mme-output.log {{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.log 2>> ${directory:log}/mme-output.log
{% endif %}
### MME ### MME
[lte-mme-service] [lte-mme-service]
...@@ -152,10 +154,17 @@ recipe = slapos.cookbook:publish.serialised ...@@ -152,10 +154,17 @@ recipe = slapos.cookbook:publish.serialised
epc-ipv6 = ${slap-configuration:ipv6-random} epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }} 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] [tun-up-promise]
recipe = slapos.cookbook:promise.plugin recipe = slapos.cookbook:promise.plugin
eggs = slapos.core eggs = slapos.core
file = {{ interface_up_promise }} file = ${tun-up-promise-template:output}
output = ${directory:plugins}/check-tun-up.py output = ${directory:plugins}/check-tun-up.py
config-ifname = ${slap-configuration:tun-name}
...@@ -27,7 +27,12 @@ class RunPromise(GenericPromise): ...@@ -27,7 +27,12 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists. 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') f = open('/sys/class/net/%s/operstate' % ifname, 'r')
if f.read() == 'up\n': if f.read() == 'up\n':
......
...@@ -27,7 +27,13 @@ class RunPromise(GenericPromise): ...@@ -27,7 +27,13 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists. In this case, check whether the file exists.
""" """
testing = {{ slapparameter_dict.get('testing', False) }}
sdr_dev = '/dev/sdr0' sdr_dev = '/dev/sdr0'
if testing:
self.logger.info("skipping promise")
return
try: try:
open(sdr_dev, 'w').close() open(sdr_dev, 'w').close()
self.logger.error("eNB is not using %s", sdr_dev) 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: ...@@ -108,11 +108,16 @@ with open('instance-gnb-input-schema.jinja2.json', 'r') as f:
instance_gnb_json_template = Template(f.read()) instance_gnb_json_template = Template(f.read())
with open('software.jinja2.cfg', 'r') as f: with open('software.jinja2.cfg', 'r') as f:
software_template = Template(f.read()) 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: for rf_mode_context in rf_mode_context_list:
with open('software-{}.cfg.json'.format(rf_mode_context['rf_mode']), with open('software-{}.cfg.json'.format(rf_mode_context['rf_mode']),
'w+') as f: 'w+') as f:
f.write(software_json_template.render(**rf_mode_context, **global_context) + '\n') 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']), with open('software-{}.cfg'.format(rf_mode_context['rf_mode']),
'w+') as f: 'w+') as f:
f.write(software_template.render(**rf_mode_context, **global_context) + '\n') 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/ ...@@ -120,6 +120,11 @@ setup = ${slapos-repository:location}/software/slaprunner/test/
egg = slapos.test.metabase egg = slapos.test.metabase
setup = ${slapos-repository:location}/software/metabase/test/ 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] [slapos.test.fluentd-setup]
<= setup-develop-egg <= setup-develop-egg
egg = slapos.test.fluentd egg = slapos.test.fluentd
...@@ -281,6 +286,7 @@ extra-eggs = ...@@ -281,6 +286,7 @@ extra-eggs =
${slapos.test.kvm-setup:egg} ${slapos.test.kvm-setup:egg}
${slapos.test.matomo-setup:egg} ${slapos.test.matomo-setup:egg}
${slapos.test.metabase-setup:egg} ${slapos.test.metabase-setup:egg}
${slapos.test.ors-amarisoft-setup:egg}
${slapos.test.monitor-setup:egg} ${slapos.test.monitor-setup:egg}
${slapos.test.nextcloud-setup:egg} ${slapos.test.nextcloud-setup:egg}
${slapos.test.nginx-push-stream-setup:egg} ${slapos.test.nginx-push-stream-setup:egg}
...@@ -351,6 +357,7 @@ tests = ...@@ -351,6 +357,7 @@ tests =
erp5 ${slapos.test.erp5-setup:setup} erp5 ${slapos.test.erp5-setup:setup}
fluentd ${slapos.test.fluentd-setup:setup} fluentd ${slapos.test.fluentd-setup:setup}
metabase ${slapos.test.metabase-setup:setup} metabase ${slapos.test.metabase-setup:setup}
ors-amarisoft ${slapos.test.ors-amarisoft-setup:setup}
### ###
${:extra} ${:extra}
......
...@@ -149,7 +149,6 @@ link-binary = ...@@ -149,7 +149,6 @@ link-binary =
[template-run-zelenium] [template-run-zelenium]
< = download-base < = download-base
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
...@@ -229,6 +228,11 @@ context = ...@@ -229,6 +228,11 @@ context =
key unixodbc_location unixodbc:location key unixodbc_location unixodbc:location
key wget_location wget:location key wget_location wget:location
key extra_path_list eggs:extra-paths 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] [template-erp5]
<= download-base <= download-base
...@@ -392,6 +396,18 @@ initialization = ...@@ -392,6 +396,18 @@ initialization =
eggs += ${eggs:eggs} eggs += ${eggs:eggs}
extra-paths += ${eggs:extra-paths} 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] [zope-product-with-eggtestinfo]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
setup-eggs = setup-eggs =
......
...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04 ...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9a7f7888ba4183c9d900e862074f3baf md5sum = 5747c487edd721d8a53061392307b55f
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = c3e3f8cd985407931b705d15bdedc8d9 md5sum = 57a19c90d281b8cbf3e36207db48f0bd
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -53,6 +53,22 @@ partition. No more (undefined result), no less (IndexError). ...@@ -53,6 +53,22 @@ partition. No more (undefined result), no less (IndexError).
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 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] [run-common]
<= userhosts-wrapper-base <= userhosts-wrapper-base
environment-extra = environment-extra =
...@@ -66,6 +82,9 @@ environment += ...@@ -66,6 +82,9 @@ environment +=
INSTANCE_HOME=${:instance-home} INSTANCE_HOME=${:instance-home}
CAUCASE={{ slapparameter_dict['caucase-url'] }} CAUCASE={{ slapparameter_dict['caucase-url'] }}
FONTCONFIG_FILE=${fontconfig-conf:output} 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') %} {% if slapparameter_dict.get('wendelin-core-zblk-fmt') %}
WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }} WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }}
{% endif %} {% endif %}
...@@ -103,6 +122,11 @@ var = ${buildout:directory}/var ...@@ -103,6 +122,11 @@ var = ${buildout:directory}/var
plugin = ${:etc}/plugin plugin = ${:etc}/plugin
unit-test-path = ${:srv}/test-instance/unit_test unit-test-path = ${:srv}/test-instance/unit_test
fontconfig-cache = ${buildout:directory}/.fontconfig 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] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -575,3 +599,5 @@ extends = ...@@ -575,3 +599,5 @@ extends =
parts += parts +=
{{ '\n '.join(part_list) }} {{ '\n '.join(part_list) }}
publish publish
erp5-kernel
kernel-json-dir
...@@ -114,6 +114,11 @@ extra-path-list = {{ dumps(extra_path_list) }} ...@@ -114,6 +114,11 @@ extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }} matplotlibrc = {{ matplotlibrc_location }}
erp5-location = {{ erp5_location }} erp5-location = {{ erp5_location }}
egg-interpreter = {{egg_interpreter}} 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] [dynamic-template-zope]
<= jinja2-template-base <= 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