Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
ed447eab
Commit
ed447eab
authored
Oct 12, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6cfca812
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
50 deletions
+51
-50
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+2
-2
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+0
-40
software/ors-amarisoft/ru/lopcomm/buildout.cfg
software/ors-amarisoft/ru/lopcomm/buildout.cfg
+7
-0
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
+41
-7
software/ors-amarisoft/ru/lopcomm/software.jinja2.py
software/ors-amarisoft/ru/lopcomm/software.jinja2.py
+1
-1
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
ed447eab
...
...
@@ -62,8 +62,8 @@ md5sum = 059fa51fd30372e4382e1c143e718791
_update_hash_filename_ = lopcomm-rrh-config.jinja2.py
md5sum = f2f550b68c8ab243ce1a4bb73a9abc1c
[
lopcomm-rrh
-software.jinja2.py]
_update_hash_filename_ =
lopcomm-rrh-
software.jinja2.py
[
ru_lopcomm
-software.jinja2.py]
_update_hash_filename_ =
ru/lopcomm/
software.jinja2.py
md5sum = 637b678939b8c62c66485473eb61356f
[lopcomm-rrh-supervision.jinja2.py]
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
ed447eab
...
...
@@ -16,12 +16,9 @@ parts =
amarisoft-rf-info-service
# XXX -> ru/lopcomm
{% if ru == "lopcomm" %}
lopcomm-firmware-dl
lopcomm-rrh-supervision-service
lopcomm-rrh-config-template
lopcomm-rrh-software-template
netconf-connection-promise
firmware-update-promise
rrh-netconf-socket-promise
lopcomm-cu-config
sshd-service
...
...
@@ -304,29 +301,6 @@ mode = 0775
url = {{ lopcomm_rrh_config_template }}
output = ${directory:script}/lopcomm-rrh-config.py
[lopcomm-rrh-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-software.log
software-reply-json-log-output = ${directory:var}/log/lopcomm-rrh-software-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}${lopcomm-firmware-dl:destination}
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw etc_path ${directory:etc}
raw firmware_name ${lopcomm-firmware-dl:filename}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_software_template }}
output = ${directory:script}/lopcomm-rrh-software.py
[lopcomm-rrh-supervision-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
...
...
@@ -353,12 +327,6 @@ promise = check_command_execute
name = netconf-connection-promise.py
config-command = [ -f ${directory:etc}/is_netconf_connected ]
[firmware-update-promise]
<= monitor-promise-base
promise = check_command_execute
name = firmware-update-promise.py
config-command = [ -f ${directory:etc}/is_firmware_updated ]
[rrh-netconf-socket-promise]
<= monitor-promise-base
promise = check_socket_listening
...
...
@@ -390,14 +358,6 @@ mode = 0775
hash-files =
${lopcomm-rrh-supervision-template:output}
[lopcomm-firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
filename = PR.PRM61C70V1004.002.tar.gz
md5sum = 4e06fd62968f9f53fd819ef8d880a8f4
destination = ${directory:etc}/${:filename}
offline = false
[user-info]
recipe = slapos.cookbook:userinfo
...
...
software/ors-amarisoft/ru/lopcomm/buildout.cfg
View file @
ed447eab
...
...
@@ -3,3 +3,10 @@
[ru_lopcomm_stats.jinja2.py]
<= download-base
[ru_lopcomm-firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
filename = PR.PRM61C70V1004.002.tar.gz
md5sum = 4e06fd62968f9f53fd819ef8d880a8f4
destination = ${directory:etc}/${:filename}
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
View file @
ed447eab
...
...
@@ -4,16 +4,50 @@
{%- set ru_ref = J(jref_of_shared(iru)) %}
{%- set ru = iru['_'] %}
{#- push firmware to RU -#}
[{{ru_ref}}-software-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
_logbase = ${directory:var}/log/{{ru_ref}-software
log-output = ${:_logbase}.log
software-reply-json-log-output = ${:_logbase}-reply.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}${ru_lopcomm-firmware-dl:destination}
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw is_firmware_updated ${directory:etc}/{{ru_ref}}.is_firmware_updated
raw firmware_name ${ru_lopcomm-firmware-dl:filename}
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_software_template }}
output = ${directory:script}/{{ru_ref}}-software.py
{{ promise('%s-firmware-update' % ru_ref) }}
promise = check_command_execute
name = firmware-update-promise.py
config-command = [ -f ${directory:etc}/is_firmware_updated ]
{#- notifications from RU -#}
[{{ru_ref}}-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
_base = ${directory:var}/log/{{ru_ref}}
log-output = ${:_base}-stats.log
json-log-output = ${:_base}-stats.json.log
cfg-json-log-output = ${:_base}-config.json.log
supervision-json-log-output = ${:_base}-supervision.json.log
ncsession-json-log-output = ${:_base}-ncsession.json.log
software-json-log-output = ${:_base}-software.json.log
_
log
base = ${directory:var}/log/{{ru_ref}}
log-output = ${:_
log
base}-stats.log
json-log-output = ${:_
log
base}-stats.json.log
cfg-json-log-output = ${:_
log
base}-config.json.log
supervision-json-log-output = ${:_
log
base}-supervision.json.log
ncsession-json-log-output = ${:_
log
base}-ncsession.json.log
software-json-log-output = ${:_
log
base}-software.json.log
context =
section directory directory
section slap_configuration slap-configuration
...
...
software/ors-amarisoft/
lopcomm-rrh-
software.jinja2.py
→
software/ors-amarisoft/
ru/lopcomm/
software.jinja2.py
View file @
ed447eab
...
...
@@ -15,7 +15,7 @@ if __name__ == '__main__':
)
while
True
:
try
:
firmware_check_file
=
os
.
path
.
join
(
'{{etc_path}}'
,
'is_firmware_updated'
)
firmware_check_file
=
'{{is_firmware_updated}}'
nc
.
connect
(
"{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}"
,
830
,
"oranuser"
,
"oranpassword"
)
# Fetch software inventory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment