d43d3fce86
Merge source and RHEL elements, allowing both source and package based installations. Allow amphora agent install from distribution packages (not limited to RHEL) Add a new option to diskimage-create.sh script to do so (default is kept to source installation from Octavia git tree) For now, amphorae built with distribution packages will have SELinux (when available) running in permissive mode. Made the rebind-sshd element generic to streamline the script Use POSIX syntax for logrotate kill command Change-Id: I391b2a95d54c7b9fd8f31d3e2c136ff9cc3451f1
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
SCRIPTDIR=$(dirname $0)
|
|
|
|
pip install -U -c /opt/upper-constraints.txt /opt/amphora-agent
|
|
|
|
# Accommodate centos default install location
|
|
ln -s /bin/amphora-agent /usr/local/bin/amphora-agent || true
|
|
|
|
mkdir /etc/octavia
|
|
# we assume certs, etc will come in through the config drive
|
|
mkdir /etc/octavia/certs
|
|
mkdir -p /var/lib/octavia
|
|
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/amphora-agent.logrotate /etc/logrotate.d/amphora-agent
|
|
|
|
case "$DIB_INIT_SYSTEM" in
|
|
upstart)
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/amphora-agent.conf /etc/init/amphora-agent.conf
|
|
;;
|
|
systemd)
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/amphora-agent.service /usr/lib/systemd/system/amphora-agent.service
|
|
;;
|
|
sysv)
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/amphora-agent.init /etc/init.d/amphora-agent.init
|
|
;;
|
|
*)
|
|
echo "Unsupported init system"
|
|
exit 1
|
|
;;
|
|
esac
|