Merge "Set DNS nameserver while configuring tenant network"
This commit is contained in:
@@ -26,10 +26,10 @@ CIRROS_URL="http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img"
|
|||||||
# DEMO_NET
|
# DEMO_NET
|
||||||
: ${TENANT_NETWORK_GATEWAY:=192.168.1.1}
|
: ${TENANT_NETWORK_GATEWAY:=192.168.1.1}
|
||||||
: ${TENANT_NETWORK_CIDR:=192.168.1.0/24}
|
: ${TENANT_NETWORK_CIDR:=192.168.1.0/24}
|
||||||
# Comma-separated list of DNS name servers used by dnsmasq to serve instance
|
|
||||||
# VMs in neutron subnets with dns_nameservers unset.
|
# DNS name server used by instance VMs.
|
||||||
# Default is Google Public DNS (8.8.8.8); to disable, set to "".
|
# Default is Google Public DNS (8.8.4.4).
|
||||||
: ${TENANT_VM_DNS_SERVER:=8.8.8.8}
|
: ${TENANT_VM_DNS_SERVER:=8.8.4.4}
|
||||||
|
|
||||||
: ${REGION:=RegionOne}
|
: ${REGION:=RegionOne}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ echo "Creating a subnet on the tenant network."
|
|||||||
neutron subnet-create demo-net \
|
neutron subnet-create demo-net \
|
||||||
"$TENANT_NETWORK_CIDR" \
|
"$TENANT_NETWORK_CIDR" \
|
||||||
--name demo-subnet \
|
--name demo-subnet \
|
||||||
|
--dns-nameserver "$TENANT_VM_DNS_SERVER" \
|
||||||
--gateway "$TENANT_NETWORK_GATEWAY"
|
--gateway "$TENANT_NETWORK_GATEWAY"
|
||||||
|
|
||||||
echo "Creating a router on the tenant network."
|
echo "Creating a router on the tenant network."
|
||||||
|
|||||||
@@ -116,11 +116,6 @@ iniset_sudo $conf DEFAULT dhcp_delete_namespaces True
|
|||||||
iniset_sudo $conf DEFAULT verbose True
|
iniset_sudo $conf DEFAULT verbose True
|
||||||
iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf
|
iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf
|
||||||
|
|
||||||
# Configure a DNS server to be used by VM instances
|
|
||||||
if [ -n "${TENANT_VM_DNS_SERVER:-''}" ]; then
|
|
||||||
iniset_sudo $conf DEFAULT dnsmasq_dns_servers "$TENANT_VM_DNS_SERVER"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << DNSMASQ | sudo tee /etc/neutron/dnsmasq-neutron.conf
|
cat << DNSMASQ | sudo tee /etc/neutron/dnsmasq-neutron.conf
|
||||||
# Set interface MTU to 1454 (for instance, ssh authentication may fail
|
# Set interface MTU to 1454 (for instance, ssh authentication may fail
|
||||||
# otherwise due to GRE overhead)
|
# otherwise due to GRE overhead)
|
||||||
|
|||||||
Reference in New Issue
Block a user