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
Xiaowu Zhang
slapos.package
Commits
eb420ed4
Commit
eb420ed4
authored
Sep 28, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: clean-up file names and add init scripts to /opt/amarisoft
parent
bb99c77d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
15 deletions
+37
-15
playbook/roles/ors/files/configure-grub
playbook/roles/ors/files/configure-grub
+0
-0
playbook/roles/ors/files/configure-re6st
playbook/roles/ors/files/configure-re6st
+0
-0
playbook/roles/ors/files/init-enb
playbook/roles/ors/files/init-enb
+6
-0
playbook/roles/ors/files/init-sdr
playbook/roles/ors/files/init-sdr
+0
-1
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+31
-14
No files found.
playbook/roles/ors/files/configure-grub
.sh
→
playbook/roles/ors/files/configure-grub
View file @
eb420ed4
File moved
playbook/roles/ors/files/configure-re6st
.sh
→
playbook/roles/ors/files/configure-re6st
View file @
eb420ed4
File moved
playbook/roles/ors/files/init-enb
0 → 100755
View file @
eb420ed4
#!/bin/bash
AMARISOFT_PATH
=
"/opt/amarisoft/
$(
ls
-1
/opt/amarisoft |
grep
"^v[0-9]
\{
4
\}
-[0-9]
\{
2
\}
-[0-9]
\{
2
\}
$"
|
sort
|
tail
-n1
)
"
export
PATH
=
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
$PATH
"
$AMARISOFT_PATH
/enb/lte_init.sh
;
playbook/roles/ors/files/init-sdr
.sh
→
playbook/roles/ors/files/init-sdr
View file @
eb420ed4
...
@@ -8,4 +8,3 @@ lsmod | grep -q sdr && rmmod sdr;
...
@@ -8,4 +8,3 @@ lsmod | grep -q sdr && rmmod sdr;
cd
$AMARISOFT_PATH
/trx_sdr/kernel
;
cd
$AMARISOFT_PATH
/trx_sdr/kernel
;
make clean
;
make clean
;
bash init.sh
;
bash init.sh
;
$AMARISOFT_PATH
/enb/lte_init.sh
;
playbook/roles/ors/tasks/main.yml
View file @
eb420ed4
---
---
# Delete ors-upgrade.yml cron which is replaced by ors.yml
# Delete ors-upgrade.yml cron which is replaced by ors.yml
#
-
name
:
Check if ors-upgrade playbook is installed
-
name
:
Check if ors-upgrade playbook is installed
shell
:
'
crontab
-l
|
grep
-q
ors-upgrade'
shell
:
'
crontab
-l
|
grep
-q
ors-upgrade'
ignore_errors
:
yes
ignore_errors
:
yes
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
when
:
ors_upgrade_cron.rc ==
0
when
:
ors_upgrade_cron.rc ==
0
-
name
:
Check if vifib playbook is installed
-
name
:
Check if vifib playbook is installed
shell
:
'
crontab
-l
|
grep
-A1
"#Ansible:
Launch
Upgrader
with
ansible"
|
grep
-v
ors-upgrade
|
grep
-q
upgrader
'
shell
:
'
crontab
-l
|
grep
-A1
"#Ansible:
Launch
Upgrader
with
ansible"
|
grep
-v
ors-upgrade
|
grep
-q
"^*/10.*upgrader"
'
ignore_errors
:
yes
ignore_errors
:
yes
register
:
vifib_cron
register
:
vifib_cron
...
@@ -21,27 +21,44 @@
...
@@ -21,27 +21,44 @@
when
:
vifib_cron.rc !=
0
when
:
vifib_cron.rc !=
0
-
name
:
Install periodic cron
-
name
:
Install periodic cron
cron
:
name="Launch ors playbook
every 3 hours" minute="15" hour="*/3
" job='cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/latest_ors.log >> /opt/upgrader/latest_ors.log'
cron
:
name="Launch ors playbook
periodically" minute="*/10" hour="*
" job='cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/latest_ors.log >> /opt/upgrader/latest_ors.log'
-
name
:
Install reboot cron
-
name
:
Install reboot cron
cron
:
name="Launch ors playbook at reboot" special_time=reboot job='sleep 20 && cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/startup_ors.log >> /opt/upgrader/startup_ors.log'
cron
:
name="Launch ors playbook at reboot" special_time=reboot job='sleep 20 && cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/startup_ors.log >> /opt/upgrader/startup_ors.log'
-
name
:
Get hostname
shell
:
hostname
register
:
hostname
-
name
:
Check hostname
debug
:
var=hostname
-
name
:
Install rm-tmp-lte script
-
name
:
Install rm-tmp-lte script
copy
:
src=rm-tmp-lte dest={{ install_folder }} owner=root mode=770
copy
:
src=rm-tmp-lte dest={{ install_folder }} owner=root mode=770
-
name
:
Give permission to slapuser to remove tmp files owned by other slapuser
-
name
:
Give permission to slapuser to remove tmp files owned by other slapuser
copy
:
src=slapuser-rm-tmp dest=/etc/sudoers.d owner=root mode=440
copy
:
src=slapuser-rm-tmp dest=/etc/sudoers.d owner=root mode=440
-
name
:
Check if /opt/amarisoft exists
stat
:
path=/opt/amarisoft
register
:
opt_amarisoft
-
name
:
Get Amarisoft path
shell
:
'
find
/opt/amarisoft
-maxdepth
1
|
grep
"^/opt/amarisoft/v[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}$"
|
sort
|
tail
-n1'
register
:
amarisoft_path
when
:
opt_amarisoft.stat.exists
-
name
:
Check amarisoft_path
debug
:
var=amarisoft_path
-
name
:
Copy init SDR script
copy
:
src=init-sdr dest={{ amarisoft_path.stdout }} owner=root
when
:
opt_amarisoft.stat.exists
-
name
:
Copy init eNB script
copy
:
src=init-enb dest={{ amarisoft_path.stdout }} owner=root
when
:
opt_amarisoft.stat.exists
-
name
:
Init SDR
-
name
:
Init SDR
script
:
init-sdr.sh
script
:
"
{{
amarisoft_path.stdout
}}/init-sdr"
when
:
opt_amarisoft.stat.exists
-
name
:
Init eNB
script
:
"
{{
amarisoft_path.stdout
}}/init-enb"
when
:
opt_amarisoft.stat.exists
-
name
:
Check if Service Exists
-
name
:
Check if Service Exists
stat
:
path=/etc/init.d/init-sdr
stat
:
path=/etc/init.d/init-sdr
...
@@ -56,7 +73,7 @@
...
@@ -56,7 +73,7 @@
when
:
init_sdr_service.stat.exists
when
:
init_sdr_service.stat.exists
-
name
:
Configure re6st
-
name
:
Configure re6st
script
:
configure-re6st
.sh
script
:
configure-re6st
-
name
:
Configure /etc/network/interfaces
-
name
:
Configure /etc/network/interfaces
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
...
@@ -80,4 +97,4 @@
...
@@ -80,4 +97,4 @@
copy
:
src=/root/.amarisoft dest=/opt/amarisoft owner=root mode=644
copy
:
src=/root/.amarisoft dest=/opt/amarisoft owner=root mode=644
-
name
:
Add kernel parameter
-
name
:
Add kernel parameter
script
:
configure-grub
.sh
script
:
configure-grub
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