Uplift fuel-plugin-tacker to Fuel 10
Migrate tacker service from upstart to systemd because Fuel 10 uses Ubuntu 16.04. Change-Id: If0b47469e1252a498100e1adc04cd13d381afb10 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
This commit is contained in:
parent
ace31b226b
commit
5733444161
|
@ -62,6 +62,7 @@ class { 'tacker':
|
||||||
rabbit_userid => $rabbit_userid,
|
rabbit_userid => $rabbit_userid,
|
||||||
bind_port => $bind_port,
|
bind_port => $bind_port,
|
||||||
bind_host => $bind_host,
|
bind_host => $bind_host,
|
||||||
|
service_provider => 'systemd',
|
||||||
service_name => $service_name,
|
service_name => $service_name,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
opendaylight_host => $management_vip,
|
opendaylight_host => $management_vip,
|
||||||
|
|
|
@ -3,11 +3,11 @@ name: tacker
|
||||||
# Human-readable name for your plugin
|
# Human-readable name for your plugin
|
||||||
title: Tacker VNF manager
|
title: Tacker VNF manager
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: '0.2.0'
|
version: '1.0.0'
|
||||||
# Description
|
# Description
|
||||||
description: Tacker VNF manager
|
description: Tacker VNF manager
|
||||||
# Required fuel version
|
# Required fuel version
|
||||||
fuel_version: ['9.0']
|
fuel_version: ['10.0']
|
||||||
# Specify license of your plugin
|
# Specify license of your plugin
|
||||||
licenses: ['Apache License Version 2.0']
|
licenses: ['Apache License Version 2.0']
|
||||||
# Specify author or company name
|
# Specify author or company name
|
||||||
|
@ -25,7 +25,7 @@ is_hotpluggable: false
|
||||||
# The plugin is compatible with releases in the list
|
# The plugin is compatible with releases in the list
|
||||||
releases:
|
releases:
|
||||||
- os: ubuntu
|
- os: ubuntu
|
||||||
version: mitaka-9.0
|
version: newton-10.0
|
||||||
mode: ['ha']
|
mode: ['ha']
|
||||||
deployment_scripts_path: deployment_scripts/
|
deployment_scripts_path: deployment_scripts/
|
||||||
repository_path: repositories/ubuntu
|
repository_path: repositories/ubuntu
|
||||||
|
|
|
@ -38,7 +38,7 @@ function build_pkg {
|
||||||
ubuntu)
|
ubuntu)
|
||||||
pushd "${DIR}/repositories/${1}/"
|
pushd "${DIR}/repositories/${1}/"
|
||||||
download $TOSCA_PARSER python-tosca-parser_0.1.0-3_all.deb
|
download $TOSCA_PARSER python-tosca-parser_0.1.0-3_all.deb
|
||||||
fpm --force -s python -t deb --deb-upstart "${DIR}/tacker_package/tacker-server" --after-install "${DIR}/tacker_package/tacker-post" --no-python-fix-name --python-install-bin /usr/bin --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker/setup.py
|
fpm --force -s python -t deb --deb-systemd "${DIR}/tacker_package/systemd/tacker-server" --after-install "${DIR}/tacker_package/tacker-post" --no-python-fix-name --python-install-bin /usr/bin --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker/setup.py
|
||||||
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
|
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
|
||||||
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
|
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Author: George Paraskevopoulos <geopar@intracom-telecom.com>
|
||||||
|
# Original Upstart script author: Michal Skalski <mskalski@mirantis.com>
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Tacker VNF Manager
|
||||||
|
Requires=multi-user.target
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/var/run
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
LimitNOFILE=65535
|
||||||
|
ExecStartPre=/var/lib/tacker/systemd/tacker-pre-service
|
||||||
|
ExecStart=/var/lib/tacker/systemd/tacker-run-service
|
||||||
|
|
|
@ -1,6 +1,31 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -uxe
|
||||||
|
|
||||||
|
adduser --quiet --system --group --home /var/lib/tacker tacker
|
||||||
|
mkdir -p /var/lib/tacker/systemd
|
||||||
|
|
||||||
|
cat > /var/lib/tacker/systemd/tacker-pre-service <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
for dir in run log lib cache ; do
|
||||||
|
mkdir -p /var/\${dir}/tacker
|
||||||
|
chown tacker /var/\${dir}/tacker
|
||||||
|
done
|
||||||
|
chmod 700 /var/cache/tacker
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > /var/lib/tacker/systemd/tacker-run-service << EOF
|
||||||
|
#!/bin/sh
|
||||||
|
[ -x "/usr/bin/tacker-server" ] || exit 0
|
||||||
|
DAEMON_ARGS="--verbose --log-file=/var/log/tacker/tacker-server.log"
|
||||||
|
exec start-stop-daemon --start --chdir /var/lib/tacker \
|
||||||
|
--chuid tacker:tacker --make-pidfile --pidfile /var/run/tacker/tacker-server.pid \
|
||||||
|
--exec /usr/bin/tacker-server -- --config-file=/etc/tacker/tacker.conf \${DAEMON_ARGS}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x /var/lib/tacker/systemd/tacker-pre-service
|
||||||
|
chmod +x /var/lib/tacker/systemd/tacker-run-service
|
||||||
|
|
||||||
adduser --quiet --system --group --no-create-home --home /var/lib/tacker tacker
|
|
||||||
mv /usr/local/etc/tacker /etc/
|
mv /usr/local/etc/tacker /etc/
|
||||||
chown -R tacker:tacker /etc/tacker
|
chown -R tacker:tacker /etc/tacker
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue