Commit 62aa001f authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Rafael Monnerat

LTE: Add simple systemd launcher of LTE service

/reviewed-on !157
parent e7f16df6
#
# Deploy LTE instance
#
[buildout]
parts =
directory
lte
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap_connection:computer_id}
partition = ${slap_connection:partition_id}
url = ${slap_connection:server_url}
key = ${slap_connection:key_file}
cert = ${slap_connection:cert_file}
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
[lte]
recipe = slapos.recipe.build:download
url = {{ buildout['directory'] }}/lte.sh
destination = ${directory:service}/lte.sh
mode = 0775
md5sum = 9de4c400d411083d8ecd8d03d62b97f0
#!/bin/bash
function stopLTE {
sudo /bin/systemctl stop lte
echo "LTE service stopped"
exit 0
}
trap stopLTE TERM INT KILL
sudo /bin/systemctl start lte
while (( 1 )); do
sleep 1
done
LTE eNodeB software release
###########################
Simple software release which starts LTE service upon instantiation.
LTE is managed by systemd and we are taking advantage of this.
It is necessary to install SlapOS from "amarisoft" branch because
it has modified ``slapos node format`` to give group ``slapsoft``
the rights to operate ``systemctl <start/stop/enable/disable> lte``.
[buildout]
extends =
../../../stack/slapos.cfg
parts =
slapos-cookbook
instance-profile
lte.sh
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.jinja2.cfg
rendered = ${buildout:directory}/instance.cfg
md5sum = 3bbbb5297db5dd49f5dfc158e4291d4c
mode = 0644
extensions = jinja2.ext.do
context =
section buildout buildout
[copy-to-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
destination = ${buildout:directory}/${:_buildout_section_name_}
[lte.sh]
<= copy-to-instance
md5sum = 9de4c400d411083d8ecd8d03d62b97f0
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