diskimage-builder/elements/ironic-agent/install.d/60-ironic-agent-install
Yuriy Zveryanskyy 676b1b738d Add element for building ramdisk with ironic-python-agent
This element creates kernel and ramdisk files based on Fedora,
example:
disk-image-create -a i386 -o test fedora ironic-agent disable-selinux

Change-Id: Ifa133d1680b81cb87d32a405aa7d7b40fe91f835
2014-11-13 19:30:44 +02:00

19 lines
465 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
install-packages python-dev python-pip qemu-utils parted hdparm util-linux genisoimage gcc
pip install -r /tmp/ironic-python-agent/requirements.txt
pip install /tmp/ironic-python-agent
sudo echo $'[Unit]
Description=Ironic Python Agent\n
[Service]
ExecStart=/usr/bin/ironic-python-agent
Restart=always
RestartSec=30s\n' > /usr/lib/systemd/system/ironic-python-agent.service
sudo systemctl enable ironic-python-agent.service