2014-06-27 11:54:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-06-27 11:54:29 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
2015-04-29 05:40:30 +00:00
|
|
|
install-packages python-dev qemu-utils parted hdparm util-linux genisoimage gcc
|
|
|
|
|
|
|
|
# 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
|
|
|
|
pip install -U setuptools
|
2014-06-27 11:54:29 +00:00
|
|
|
|
|
|
|
pip install -r /tmp/ironic-python-agent/requirements.txt
|
|
|
|
pip install /tmp/ironic-python-agent
|
2015-04-29 05:40:30 +00:00
|
|
|
rm -f /tmp/get-pip.py
|
2014-06-27 11:54:29 +00:00
|
|
|
|
|
|
|
sudo echo $'[Unit]
|
|
|
|
Description=Ironic Python Agent\n
|
|
|
|
[Service]
|
|
|
|
ExecStart=/usr/bin/ironic-python-agent
|
|
|
|
Restart=always
|
2014-12-16 16:37:22 +00:00
|
|
|
RestartSec=30s\n
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target\n' > /usr/lib/systemd/system/ironic-python-agent.service
|
2014-06-27 11:54:29 +00:00
|
|
|
|
|
|
|
sudo systemctl enable ironic-python-agent.service
|