diskimage-builder/elements/ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install
Ben Nemec 46ef8e3f93 Revert "Use pip 7 for ironic"
Supposedly pip 8.0.1 fixes this.  Trying a revert to verify.

This reverts commit f068230a5f.

Change-Id: I35b88668bf16ad6205ec678f87e3981aebab32e9
2016-01-22 15:34:46 +00:00

41 lines
1.2 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)
# Install the latest version of pip and setuptools which has some
# fixes for building behind proxy.
curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
python /tmp/get-pip.py
rm -f /tmp/get-pip.py
pip install -U setuptools
pip install -r /tmp/ironic-python-agent/requirements.txt
pip install /tmp/ironic-python-agent
if [ ! -f /usr/bin/ironic-python-agent ]; then
ln -s /usr/local/bin/ironic-python-agent /usr/bin/ironic-python-agent
fi
case "$DIB_INIT_SYSTEM" in
upstart)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf
;;
systemd)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/$(svc-map ironic-python-agent).service
;;
sysv)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.init /etc/init.d/ironic-python-agent.init
update-rc.d ironic-python-agent.init defaults
;;
*)
echo "Unsupported init system"
exit 1
;;
esac