This directory contains some sample scripts for various DNS operations in Microsoft Azure.
Note: these scripts are not intended for production usage. Please use them only as a basis for your own tailored scripts.
To use a bootstrap script:
- Copy it to the "bootstrap scripts" section for instance templates in the Cloudera Altus Director UI. OR
- Update the
bootstrapScripts
section for instance templates in your Cloudera Altus Director configuration file.
These scripts assume there is a DNS server already set up with proper zone files, and that VM hosts have permission to update DNS records.
This is a sample bootstrap script that sets up automatic DNS record updating, using dhclient
, for
CentOS and RHEL 6 VMs provisioned by Altus Director.
This is a sample bootstrap script that sets up automatic DNS record updating, using Network Manager
,
for CentOS and RHEL 7 VMs provisioned by Altus Director.
This is a DHCP client exit hook script that automatically updates DNS records, via nsupdate
, when a
VM network service is restarted. This script assumes the host VM is running dhclient
.
Note: These scripts will bootstrap CentOS and RHEL 6.x and 7.x.
This is a BIND setup script that turns a newly created VM into a BIND server and walks you through
changing Azure DNS settings. This script assumes it's running on a newly provisioned VM, or that
bind-dns-reset.sh
has been executed (see below).
This is a reset script that walks you through resetting a host's DNS settings back to the default,
so that you can run bind-dns-setup.sh
again.
This script runs basic DNS sanity checks (e.g., forward and reverse resolution).
- The BIND VM must be in the same VNET as the future clusters.
- Port 53 on the BIND host must be accessible for DNS to work.
bind-dns-setup.sh
creates one zone file which supports at most 255 hosts. If required, additional zone files can be added and configured manually.- The scripts assume that the Azure nameserver IP address will always be
168.63.129.16
(see here).
-
On the fresh host that you'll install BIND on, run
bind-dns-setup.sh
. The script prompts you for the internal host FQDN suffix to use, and then asks you to swap DNS from Azure to BIND. Steps to swap DNS can be found here. -
To revert these changes (e.g., to use a different host FQDN suffix, or if the execution of
bind-dns-setup.sh
was interrupted), runbind-dns-reset.sh
. This reverts everything done inbind-dns-setup.sh
and allows you to re-runbind-dns-setup.sh
. -
After
bind-dns-setup.sh
has completed, rundns-test.sh
to verify that DNS is correctly functioning on the host. Any errors indicate that there is a problem with the DNS configuration.