Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Véron
slapos.package
Commits
ad9f19cf
Commit
ad9f19cf
authored
Aug 31, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amarisoft upgrade
parent
574af5ef
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
1 deletion
+110
-1
playbook/amarisoft-upgrade.yml
playbook/amarisoft-upgrade.yml
+9
-0
playbook/generate-key.yml
playbook/generate-key.yml
+9
-0
playbook/roles/amarisoft-upgrade/tasks/main.yml
playbook/roles/amarisoft-upgrade/tasks/main.yml
+63
-0
playbook/roles/generate-key/tasks/main.yml
playbook/roles/generate-key/tasks/main.yml
+28
-0
playbook/roles/generate-key/templates/ansible-report.j2
playbook/roles/generate-key/templates/ansible-report.j2
+1
-0
playbook/settings/bbu.yml
playbook/settings/bbu.yml
+0
-1
No files found.
playbook/amarisoft-upgrade.yml
0 → 100644
View file @
ad9f19cf
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/ors.yml
roles
:
-
amarisoft-upgrade
playbook/generate-key.yml
0 → 100644
View file @
ad9f19cf
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/ors.yml
roles
:
-
generate-key
playbook/roles/amarisoft-upgrade/tasks/main.yml
0 → 100644
View file @
ad9f19cf
---
-
name
:
Create directory if it does not exist
file
:
path=/opt/amarisoft/{{ amarisoft_version }} state=directory mode=0755
-
name
:
Create directory if it does not exist
file
:
path=/opt/amarisoft/_{{ amarisoft_version }} state=directory mode=0755
-
name
:
Decrypt key
shell
:
'
openssl
pkeyutl
-decrypt
-in
/root/ors78_symmetric_keyfile.key.enc
-inkey
/opt/ssl/private_key.pem
-out
/tmp/symmetric_keyfile.key'
-
name
:
Decrypt archive
shell
:
'
openssl
aes-256-cbc
-d
-pbkdf2
-in
/root/amarisoft.{{
amarisoft_version
}}.tar.gz.enc
-out
{{
install_folder
}}/amarisoft.tar.gz
-kfile
/tmp/symmetric_keyfile.key'
-
name
:
Extract archive
unarchive
:
src
:
"
{{
install_folder
}}/amarisoft.tar.gz"
dest
:
"
{{
install_folder
}}"
-
name
:
Extract lteenb archive
unarchive
:
src
:
"
{{
install_folder
}}/{{
amarisoft_version
}}/lteenb-linux-{{
amarisoft_version
}}.tar.gz"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}"
-
name
:
Extract ltemme archive
unarchive
:
src
:
"
{{
install_folder
}}/{{
amarisoft_version
}}/ltemme-linux-{{
amarisoft_version
}}.tar.gz"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}"
-
name
:
Extract trx_sdr archive
unarchive
:
src
:
"
{{
install_folder
}}/{{
amarisoft_version
}}/trx_sdr-linux-{{
amarisoft_version
}}.tar.gz"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}"
-
name
:
Create a symbolic link for lteenb
file
:
src
:
"
lteenb-linux-{{
amarisoft_version
}}"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}/enb"
state
:
link
-
name
:
Create a symbolic link for ltemme
file
:
src
:
"
ltemme-linux-{{
amarisoft_version
}}"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}/mme"
state
:
link
-
name
:
Create a symbolic link for trx_sdr
file
:
src
:
"
trx_sdr-linux-{{
amarisoft_version
}}"
dest
:
"
{{
install_folder
}}/_{{
amarisoft_version
}}/trx_sdr"
state
:
link
-
name
:
Copy trx_sdr libraries
shell
:
'
cp
{{
install_folder
}}/_{{
amarisoft_version
}}/trx_sdr/*.so
{{
install_folder
}}/_{{
amarisoft_version
}}/enb/'
-
name
:
Move amarisoft folder
shell
:
'
mv
{{
install_folder
}}/_{{
amarisoft_version
}}
{{
install_folder
}}/v{{
amarisoft_version
}}'
-
name
:
Remove extraction folder
file
:
path
:
"
{{
install_folder
}}/{{
amarisoft_version
}}"
state
:
absent
playbook/roles/generate-key/tasks/main.yml
0 → 100644
View file @
ad9f19cf
---
-
name
:
Create directory if it does not exist
file
:
path=/opt/ssl/ state=directory mode=0755
-
name
:
Generate private key
shell
:
'
openssl
genrsa
-out
/opt/ssl/private_key.pem
4096'
-
name
:
Generate certificate request
shell
:
"
openssl
req
-new
-key
/opt/ssl/private_key.pem
-subj
'/CN={{
ansible_hostname
}}'
-out
/opt/ssl/cert_request.csr"
-
name
:
Get monitor private directory path
shell
:
'
realpath
$(dirname
$(grep
-lR
"software_release_url
=
.*software/monitor/software.cfg"
$(find
/srv/slapgrid
-type
f
-name
"buildout.cfg")))/srv/monitor/private'
register
:
monitor_path
-
name
:
Create directory if it does not exist
file
:
path="{{ monitor_path.stdout }}/playbook-report" state=directory mode=0755
-
name
:
Copy certificate request
copy
:
src=/opt/ssl/cert_request.csr dest={{ monitor_path.stdout }}/playbook-report/cert_request.csr owner=root mode=774
-
name
:
Render log template
template
:
src
:
ansible-report.j2
dest
:
/tmp/ansible-report-tmp.log
-
name
:
Append to log
shell
:
'
cat
/tmp/ansible-report-tmp.log
>>
{{
monitor_path.stdout
}}/playbook-report/report.log'
playbook/roles/generate-key/templates/ansible-report.j2
0 → 100644
View file @
ad9f19cf
{"time": "{{ ansible_date_time['date'] }} {{ ansible_date_time['time'] }}", "log_level": "INFO", "message": "msg"}
playbook/settings/bbu.yml
View file @
ad9f19cf
---
install_folder
:
"
/opt/amarisoft"
install_folder
:
"
/opt/amarisoft"
amarisoft_version
:
"
2023-06-10"
amarisoft_version
:
"
2023-06-10"
launch_upgrader
:
True
launch_upgrader
:
True
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