Add a dnsmasq-forwarder element so that launched instances can install packages

from internal hosts.

Uses an environment.d file so that when setup-neutron gets run, the subnet will
get created with 192.0.2.1 as the nameserver.
This commit is contained in:
James Slagle 2015-01-13 15:49:30 -05:00
parent 36edb3585f
commit 5a0187499e
6 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,5 @@
Sets up a dnsmasq process for forwarding dns requests. Also opens port 53 and
adds a rule to forward all traffic.
When applied to the undercloud, this will allow launched instances to install
packages from internal hosts.

View File

@ -0,0 +1,10 @@
[Unit]
Description=dnsmasq service to forward dns requests
After=openvswitch.service
[Service]
Type=simple
ExecStart=/sbin/dnsmasq -d -q
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eux
set -o pipefail
cp $(dirname $0)/../dnsmasq-forwarder.service /lib/systemd/system/dnsmasq-forwarder.service

View File

@ -0,0 +1 @@
export UNDERCLOUD_NAME_SERVER=${UNDERCLOUD_NAME_SERVER:-192.0.2.1}

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -eux
set -o pipefail
systemctl enable dnsmasq-forwarder
systemctl start dnsmasq-forwarder
iptables -I INPUT -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -j ACCEPT

View File

@ -46,7 +46,8 @@
"os-cloud-config",
"install-server",
"selinux-permissive",
"selinux-setenforce-0"
"selinux-setenforce-0",
"dnsmasq-forwarder"
],
"hook": [
"extra-data",