From 4590ee8176fdac4be51ca4c03ed35792dbcb6b41 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov <kirr@nexedi.com> Date: Thu, 8 Feb 2024 19:38:41 +0100 Subject: [PATCH] software/ors-amarisoft: Stop doing software*-base.cfg Both software.cfg and software-ors.cfg became trivial wrappers over their bases - so move bases to be directly software. --- software/ors-amarisoft/software-base.cfg | 191 ------------------- software/ors-amarisoft/software-ors-base.cfg | 21 -- software/ors-amarisoft/software-ors.cfg | 20 +- software/ors-amarisoft/software.cfg | 190 +++++++++++++++++- 4 files changed, 208 insertions(+), 214 deletions(-) delete mode 100644 software/ors-amarisoft/software-base.cfg delete mode 100644 software/ors-amarisoft/software-ors-base.cfg diff --git a/software/ors-amarisoft/software-base.cfg b/software/ors-amarisoft/software-base.cfg deleted file mode 100644 index 7f8c26161..000000000 --- a/software/ors-amarisoft/software-base.cfg +++ /dev/null @@ -1,191 +0,0 @@ -[buildout] -extends = - buildout.hash.cfg - ../../stack/slapos-dev.cfg - ../../stack/monitor/buildout.cfg - ../../component/logrotate/buildout.cfg - ../../component/nghttp2/buildout.cfg - ../../component/iperf3/buildout.cfg - ../../component/python3/buildout.cfg - ../../component/python-pynacl/buildout.cfg - ../../component/bcrypt/buildout.cfg - ../../component/numpy/buildout.cfg - ../../component/pygolang/buildout.cfg - ../../component/git/buildout.cfg - ../../component/dnsmasq/buildout.cfg - ../../component/fluent-bit/buildout.cfg - ../../component/openssh/buildout.cfg - ../../component/libcap/buildout.cfg - ru/buildout.cfg - -parts += - slapos.toolbox-dev - template - slapos-cookbook -# copy all configs by default - mme.jinja2.cfg - dnsmasq-core-network.jinja2.cfg - ims.jinja2.cfg - enb.jinja2.cfg - ue_db.jinja2.cfg - ue.jinja2.cfg - drb_lte.jinja2.cfg - drb_nr.jinja2.cfg - sib23.jinja2.asn - monitor-httpd-extra-conf -# copy all gadget file - gadget - g-chart.line.js - promise.gadget.js - software.cfg.html - rsvp.js - iperf3 - dnsmasq - eggs - xamari - setcap-dnsmasq -# unimplemented parts - the http monitor and better log handling using logrotate -# apache-php -# logrotate - -[template] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/${:filename} -output = ${buildout:directory}/template.cfg - -[download-base] -recipe = slapos.recipe.build:download -url = ${:_profile_base_location_}/${:_update_hash_filename_} - -[template-enb] -<= download-base - -[template-core-network] -<= download-base - -[template-ue] -<= download-base - -[template-obsolete] -<= download-base - -[copy-to-instance] -recipe = slapos.recipe.build:download -url = ${:_profile_base_location_}/${:_buildout_section_name_} - -[copy-config-to-instance] -recipe = slapos.recipe.build:download -url = ${:_profile_base_location_}/config/${:_buildout_section_name_} - -[gadget] -recipe = slapos.recipe.template -output = ${buildout:directory}/${:_buildout_section_name_}/renderjs.js -url = https://lab.nexedi.com/nexedi/renderjs/raw/b715d066bfddc30bedfc8356fb720dcbb391378e/dist/renderjs-0.28.0.js -md5sum = 7e074a29b07e0045d2ba8a8e63bd499e - -[monitor-httpd-extra-conf] -recipe = slapos.recipe.template -output = ${buildout:directory}/etc/httpd-include-file.conf -inline = - Alias /gadget ${buildout:directory}/gadget - <Directory ${buildout:directory}/gadget> - Options Indexes FollowSymLinks - AllowOverride None - Require all granted - Satisfy Any - Allow from all - </Directory> - -[copy-gadget-to-software] -recipe = slapos.recipe.build:download -url = ${:_profile_base_location_}/gadget/${:_buildout_section_name_} -destination = ${buildout:directory}/gadget/${:_buildout_section_name_} - -[enb.jinja2.cfg] -<= copy-config-to-instance -filename = enb.jinja2.cfg -[drb_lte.jinja2.cfg] -<= copy-config-to-instance -[drb_nr.jinja2.cfg] -<= copy-config-to-instance -[sib23.jinja2.asn] -<= copy-config-to-instance -filename = sib23.jinja2.asn -[ue_db.jinja2.cfg] -<= copy-config-to-instance -filename = ue_db.jinja2.cfg -[mme.jinja2.cfg] -<= copy-config-to-instance -filename = mme.jinja2.cfg -[dnsmasq-core-network.jinja2.cfg] -<= copy-config-to-instance -[ims.jinja2.cfg] -<= copy-config-to-instance -filename = ims.jinja2.cfg -[ue.jinja2.cfg] -<= copy-config-to-instance -filename = ue.jinja2.cfg -[slaplte.jinja2] -<= download-base - -# Download gadget files -[software.cfg.html] -<= copy-gadget-to-software -[promise.gadget.js] -<= copy-gadget-to-software - -[rsvp.js] -<= copy-gadget-to-software -url = https://lab.nexedi.com/nexedi/rsvp.js/raw/b0c4596df6a52d75705a59262bc992a166ff11a1/dist/rsvp-2.0.4.js -md5sum = 2b0f2d52857b17fdfb8a5c2ea451a5ad - -[g-chart.line.js] -<= copy-gadget-to-software -url = https://raw.githubusercontent.com/guschnwg/g-chart/cbcc7bc40f88fcce4854b55d0902b6273004ba3e/g-chart.line.js -md5sum = 57c50b46c9492c6ab78dc44deac3c0ce - -[eggs] -recipe = zc.recipe.egg -eggs = - websocket-client - ${python-pynacl:egg} - ${bcrypt:egg} - xmltodict - ncclient - ${lxml-python:egg} - netifaces - netaddr -interpreter = pythonwitheggs - -[xlte-repository] -recipe = slapos.recipe.build:gitclone -repository = https://lab.nexedi.com/kirr/xlte.git -revision = e716ab51 -git-executable = ${git:location}/bin/git - -[xlte] -recipe = zc.recipe.egg:develop -setup = ${xlte-repository:location} -egg = xlte -depends = - ${numpy:egg} - ${pygolang:egg} - -[xamari] -recipe = zc.recipe.egg -eggs = ${xlte:egg} -scripts = xamari - -[setcap] -recipe = plone.recipe.command -command = sudo -n /opt/amarisoft/setcap ${:exe} || true -update-command = ${:command} - -[setcap-dnsmasq] -<= setcap -exe = ${dnsmasq:location}/sbin/dnsmasq - -[versions] -websocket-client = 1.4.2 -ncclient = 0.6.13 -xmltodict = 0.13.0 diff --git a/software/ors-amarisoft/software-ors-base.cfg b/software/ors-amarisoft/software-ors-base.cfg deleted file mode 100644 index c1df55868..000000000 --- a/software/ors-amarisoft/software-ors-base.cfg +++ /dev/null @@ -1,21 +0,0 @@ -# software for Open Radio Station. -# -# It is a wrapper around base software which adds ORS-specific features. - -[buildout] -extends = - software-base.cfg -parts += - template-ors - -# switch instance.cfg to be installed from instance-ors.cfg instead of template.cfg -# remember original template.cfg as template-base.cfg -[template] -output = ${buildout:directory}/template-base.cfg -[template-ors] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/${:filename} -output = ${buildout:directory}/template.cfg - -[template-ors-enb] -<= download-base diff --git a/software/ors-amarisoft/software-ors.cfg b/software/ors-amarisoft/software-ors.cfg index 49c5de905..aef34ee34 100644 --- a/software/ors-amarisoft/software-ors.cfg +++ b/software/ors-amarisoft/software-ors.cfg @@ -1,3 +1,21 @@ +# software for Open Radio Station. +# +# It is a wrapper around base software which adds ORS-specific features. + [buildout] extends = - software-ors-base.cfg + software.cfg +parts += + template-ors + +# switch instance.cfg to be installed from instance-ors.cfg instead of template.cfg +# remember original template.cfg as template-base.cfg +[template] +output = ${buildout:directory}/template-base.cfg +[template-ors] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/${:filename} +output = ${buildout:directory}/template.cfg + +[template-ors-enb] +<= download-base diff --git a/software/ors-amarisoft/software.cfg b/software/ors-amarisoft/software.cfg index bbcdbfd03..7f8c26161 100644 --- a/software/ors-amarisoft/software.cfg +++ b/software/ors-amarisoft/software.cfg @@ -1,3 +1,191 @@ [buildout] extends = - software-base.cfg + buildout.hash.cfg + ../../stack/slapos-dev.cfg + ../../stack/monitor/buildout.cfg + ../../component/logrotate/buildout.cfg + ../../component/nghttp2/buildout.cfg + ../../component/iperf3/buildout.cfg + ../../component/python3/buildout.cfg + ../../component/python-pynacl/buildout.cfg + ../../component/bcrypt/buildout.cfg + ../../component/numpy/buildout.cfg + ../../component/pygolang/buildout.cfg + ../../component/git/buildout.cfg + ../../component/dnsmasq/buildout.cfg + ../../component/fluent-bit/buildout.cfg + ../../component/openssh/buildout.cfg + ../../component/libcap/buildout.cfg + ru/buildout.cfg + +parts += + slapos.toolbox-dev + template + slapos-cookbook +# copy all configs by default + mme.jinja2.cfg + dnsmasq-core-network.jinja2.cfg + ims.jinja2.cfg + enb.jinja2.cfg + ue_db.jinja2.cfg + ue.jinja2.cfg + drb_lte.jinja2.cfg + drb_nr.jinja2.cfg + sib23.jinja2.asn + monitor-httpd-extra-conf +# copy all gadget file + gadget + g-chart.line.js + promise.gadget.js + software.cfg.html + rsvp.js + iperf3 + dnsmasq + eggs + xamari + setcap-dnsmasq +# unimplemented parts - the http monitor and better log handling using logrotate +# apache-php +# logrotate + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/${:filename} +output = ${buildout:directory}/template.cfg + +[download-base] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/${:_update_hash_filename_} + +[template-enb] +<= download-base + +[template-core-network] +<= download-base + +[template-ue] +<= download-base + +[template-obsolete] +<= download-base + +[copy-to-instance] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/${:_buildout_section_name_} + +[copy-config-to-instance] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:_buildout_section_name_} + +[gadget] +recipe = slapos.recipe.template +output = ${buildout:directory}/${:_buildout_section_name_}/renderjs.js +url = https://lab.nexedi.com/nexedi/renderjs/raw/b715d066bfddc30bedfc8356fb720dcbb391378e/dist/renderjs-0.28.0.js +md5sum = 7e074a29b07e0045d2ba8a8e63bd499e + +[monitor-httpd-extra-conf] +recipe = slapos.recipe.template +output = ${buildout:directory}/etc/httpd-include-file.conf +inline = + Alias /gadget ${buildout:directory}/gadget + <Directory ${buildout:directory}/gadget> + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + Satisfy Any + Allow from all + </Directory> + +[copy-gadget-to-software] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/gadget/${:_buildout_section_name_} +destination = ${buildout:directory}/gadget/${:_buildout_section_name_} + +[enb.jinja2.cfg] +<= copy-config-to-instance +filename = enb.jinja2.cfg +[drb_lte.jinja2.cfg] +<= copy-config-to-instance +[drb_nr.jinja2.cfg] +<= copy-config-to-instance +[sib23.jinja2.asn] +<= copy-config-to-instance +filename = sib23.jinja2.asn +[ue_db.jinja2.cfg] +<= copy-config-to-instance +filename = ue_db.jinja2.cfg +[mme.jinja2.cfg] +<= copy-config-to-instance +filename = mme.jinja2.cfg +[dnsmasq-core-network.jinja2.cfg] +<= copy-config-to-instance +[ims.jinja2.cfg] +<= copy-config-to-instance +filename = ims.jinja2.cfg +[ue.jinja2.cfg] +<= copy-config-to-instance +filename = ue.jinja2.cfg +[slaplte.jinja2] +<= download-base + +# Download gadget files +[software.cfg.html] +<= copy-gadget-to-software +[promise.gadget.js] +<= copy-gadget-to-software + +[rsvp.js] +<= copy-gadget-to-software +url = https://lab.nexedi.com/nexedi/rsvp.js/raw/b0c4596df6a52d75705a59262bc992a166ff11a1/dist/rsvp-2.0.4.js +md5sum = 2b0f2d52857b17fdfb8a5c2ea451a5ad + +[g-chart.line.js] +<= copy-gadget-to-software +url = https://raw.githubusercontent.com/guschnwg/g-chart/cbcc7bc40f88fcce4854b55d0902b6273004ba3e/g-chart.line.js +md5sum = 57c50b46c9492c6ab78dc44deac3c0ce + +[eggs] +recipe = zc.recipe.egg +eggs = + websocket-client + ${python-pynacl:egg} + ${bcrypt:egg} + xmltodict + ncclient + ${lxml-python:egg} + netifaces + netaddr +interpreter = pythonwitheggs + +[xlte-repository] +recipe = slapos.recipe.build:gitclone +repository = https://lab.nexedi.com/kirr/xlte.git +revision = e716ab51 +git-executable = ${git:location}/bin/git + +[xlte] +recipe = zc.recipe.egg:develop +setup = ${xlte-repository:location} +egg = xlte +depends = + ${numpy:egg} + ${pygolang:egg} + +[xamari] +recipe = zc.recipe.egg +eggs = ${xlte:egg} +scripts = xamari + +[setcap] +recipe = plone.recipe.command +command = sudo -n /opt/amarisoft/setcap ${:exe} || true +update-command = ${:command} + +[setcap-dnsmasq] +<= setcap +exe = ${dnsmasq:location}/sbin/dnsmasq + +[versions] +websocket-client = 1.4.2 +ncclient = 0.6.13 +xmltodict = 0.13.0 -- 2.30.9