Configuring the DNS server for OpenStack

Set up an external DNS server for OpenStack instances.

Procedure

  1. Specify a Linux host as the OpenStack DNS server. This host can be a controller node or another Linux host.
  2. Log on to the OpenStack DNS server as root.
  3. Copy the install_dns.sh script file to the OpenStack DNS server.
    The script is located in $LSF_TOP/<LSF_VERSION>/resource_connector/openstack/scripts/install_dns.sh.
    1. Change the following parameters
      • VAR_OPENSTACK_DOMAIN=<instance_domain>

        The instance domain must be the same as the dns_domain parameter in the OpenStack configuration file (/etc/neutron/neutron.conf).

      • VAR_OPENSTACK_INSTANCE_PREFIX=<instance_prefix>

        The instance prefix must be the same as the "InstancePrefix" parameter in the osprov_config.json file.

      • VAR_OPENSTACK_SUBNET_CIDR=<subnet_cidr>

        The public subnet for virtual instances.

      • VAR_OPENSTACK_DNS_ADDRESS=<openstack_dns_address>
      • VAR_LSF_DOMAIN=<lsf_domain>
      • VAR_LSF_REVERSE=<lsf_reverse_query>
      • VAR_LSF_DNS_ADDRESS=<lsf_dns_address>
      For example,
      VAR_OPENSTACK_DOMAIN=openstack.vm
      VAR_OPENSTACK_INSTANCE_PREFIX=host
      VAR_OPENSTACK_SUBNET_CIDR=10.110.135.0/26
      VAR_OPENSTACK_DNS_ADDRESS=10.110.135.210
      VAR_LSF_DOMAIN=lsf.domain
      VAR_LSF_REVERSE=54.42.10
      VAR_LSF_DNS_ADDRESS=10.42.54.77
      
    2. Run the script to set up a DNS server for OpenStack instances.
  4. Configure the LSF DNS server.
    To enable LSF hosts to resolve instance domain names, add the DNS forward zone for the instance domain to the DNS server. The following steps assume that you are using Linux bind as the DNS server:
    1. Log on to the LSF DNS server as root.
    2. Disable the empty-zone feature.
      Edit the configuration file /etc/named.conf to disable empty-zone:
      options {
              ...
              empty-zones-enable no;
              ...
            };
    3. Add a forward zone for the virtual instance domain.
      Edit the configuration file /etc/named.conf to add forward zones in the following format:
      zone "<instance_domain>" IN {
         type forward;
         forwarders { <openstack_dns_server> };
      };
      
      zone "<instance_reverse_zone>" IN {
          type forward;
          forwarders { <openstack_dns_server> };
      };
      
      A typical configuration is shown in the following example:
      zone "openstack.vm" IN {
         type forward;
         forwarders { 10.110.135.210; };
      };
            
      zone "135.110.10.in-addr.arpa" IN {
         type forward;
         forwarders { 10.110.135.210; };
      };
      
    4. Restart the DNS server.
      service named restart