Update ironic-discoverd element for version 0.2.0

This commit is contained in:
Dmitry Tantsur 2014-10-13 14:53:08 +02:00
parent cf0b464e35
commit 2d08f79987
5 changed files with 20 additions and 22 deletions

View File

@ -2,36 +2,25 @@
# just starts the discovery dnsmasq process
set -eux
# TODO(marios): add systemd Environment or EnvironmentFile and upstart
# env for IFACE and DISCOVERY_POOL
# IFACE=br-ctlplane
# DISCOVERY_POOL=192.0.2.100,192.0.2.120
install-packages dnsmasq dnsmasq-utils
# make sure tftpboot is labelled correctly
mkdir -p /tftpboot
restorecon -R /tftpboot
cat > /lib/systemd/system/discovery-dhcp-dnsmasq.service << eof
cat > /lib/systemd/system/openstack-ironic-discoverd-dnsmasq.service << eof
[Unit]
Description=Discovery dhcp dnsmasq service
Description=PXE boot dnsmasq service for ironic-discoverd
After=openvswitch.service
[Service]
Type=forking
ExecStart=/sbin/dnsmasq --conf-file= \\
--port=0 \\
--enable-tftp \\
--tftp-root=/tftpboot \\
--dhcp-boot=pxelinux.0,localhost.localdomain,192.0.2.1 \\
--bind-interfaces \\
--pid-file=/var/run/dnsmasq.pid \\
--interface=br-ctlplane \\
--dhcp-range=192.0.2.100,192.0.2.120,29
ExecStart=/sbin/dnsmasq --conf-file=/etc/ironic-discoverd/dnsmasq.conf
[Install]
WantedBy=multi-user.target
Alias=discovery-dhcp-dnsmasq.service
Alias=openstack-ironic-discoverd-dnsmasq.service
eof
# Enable the service
os-svc-enable -n discovery-dhcp-dnsmasq
os-svc-enable -n openstack-ironic-discoverd-dnsmasq

View File

@ -3,9 +3,9 @@
set -eux
pip install ironic-discoverd
os-svc-daemon -n ironic-discoverd -i /usr -u root -c ironic-discoverd /etc/ironic-discoverd/discoverd.conf
os-svc-daemon -n openstack-ironic-discoverd -i /usr -u root -c ironic-discoverd /etc/ironic-discoverd/discoverd.conf
install -d -m 0750 -o root -g root /etc/ironic-discoverd
install -d -m 0755 -o ironic -g ironic /tftpboot/pxelinux.cfg
# Enable the service
os-svc-enable -n ironic-discoverd
os-svc-enable -n openstack-ironic-discoverd

View File

@ -1,5 +1,7 @@
[discoverd]
debug = false
os_auth_url = http://{{keystone.host}}:5000/v2.0
os_username = ironic
os_password = {{ironic.service-password}}
os_tenant_name = service
dnsmasq_interface = br-ctlplane

View File

@ -0,0 +1,7 @@
port=0
interface=br-ctlplane
bind-interfaces
dhcp-range=192.0.2.100,192.0.2.120,29
enable-tftp
tftp-root=/tftpboot
dhcp-boot=pxelinux.0,localhost.localdomain,192.0.2.1

View File

@ -5,5 +5,5 @@
set -eux
os-svc-restart -n discovery-dhcp-dnsmasq
os-svc-restart -n ironic-discoverd
os-svc-restart -n openstack-ironic-discoverd-dnsmasq
os-svc-restart -n openstack-ironic-discoverd