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:
parent
36edb3585f
commit
5a0187499e
5
elements/dnsmasq-forwarder/README.md
Normal file
5
elements/dnsmasq-forwarder/README.md
Normal 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.
|
10
elements/dnsmasq-forwarder/dnsmasq-forwarder.service
Normal file
10
elements/dnsmasq-forwarder/dnsmasq-forwarder.service
Normal 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
|
6
elements/dnsmasq-forwarder/install.d/10-dnsmasq-forwarder
Executable file
6
elements/dnsmasq-forwarder/install.d/10-dnsmasq-forwarder
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
cp $(dirname $0)/../dnsmasq-forwarder.service /lib/systemd/system/dnsmasq-forwarder.service
|
@ -0,0 +1 @@
|
||||
export UNDERCLOUD_NAME_SERVER=${UNDERCLOUD_NAME_SERVER:-192.0.2.1}
|
@ -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
|
@ -46,7 +46,8 @@
|
||||
"os-cloud-config",
|
||||
"install-server",
|
||||
"selinux-permissive",
|
||||
"selinux-setenforce-0"
|
||||
"selinux-setenforce-0",
|
||||
"dnsmasq-forwarder"
|
||||
],
|
||||
"hook": [
|
||||
"extra-data",
|
||||
|
Loading…
Reference in New Issue
Block a user