DNS Integration via BOSH Director Network Configuration
Note: anynines does not recommend using this pattern for production setups. Use the DNS Delegation Integration pattern instead.
When using this integration pattern, all DNS queries of the whole PCF platform will be handled by the a9s Consul DNS for PCF tile. The DNS queries to the public Internet will be first redirected to the a9s Consul DNS for PCF tile and then dispatched to your company’s internal nameservers or to public nameservers.
Within the a9s Consul DNS tile there are three consul servers and three dnsmasq servers handling the DNS requests. If one server fails, there are two remaining servers to handle the DNS queries.
Installing and integrating the a9s Consul DNS for PCF tile using this pattern includes the following steps:
- Review network configuration in the BOSH Director.
- Add/configure the a9s Consul DNS tile for PCF and apply changes.
- Find out the IP addresses of the dnsmasq servers within the a9s Consul DNS for PCF tile.
- Register the dnsmasq IP addresses in the appropriate subnets of the BOSH Director settings.
The goal of this section is to ensure that the nameservers included in the a9s Consul DNS for PCF tile can be configured in the DNS fields of the network settings in the BOSH Director tile.
Before you start installing the a9s Consul for PCF tile, ensure you have one of the following network configurations in place:
- At least three subnets within the network where the Elastic Runtime is deployed.
- A dedicated network (not subnet) for the a9s Consul DNS for PCF tile. In this case, you would have one network where the Pivotal Elastic Runtime is deployed and one network where the a9s Consul DNS tile is deployed. When you have only one network in your IaaS layer, you can still create two networks in the BOSH Director. In this case you would use the same network name and CIDR block for both networks. This configuration is marked red in the screenshot below. It requires that you tell the BOSH Director which IP addresses should be used for the corresponding network. This is done using the Reserved IP Ranges field, marked blue in the screenshot below, of the corresponding network. A detailed description of how to configure this can be found below.
Complete the following steps to download and install a9s Consule DNS for PCF.
Download the product file from the Pivotal Network.
Navigate to the Ops Manager Installation Dashboard and click Import a Product to upload the product file.
Click Add next to the uploaded a9s Consul DNS for PCF tile in the Ops Manager Available Products view to add it to your staging area.
Click the a9s Consul DNS for PCF tile.
Click on Assign AZs and Networks and assign the networks and AZs that should be used for this tile. If you created a dedicated network for the a9s Consul DNS tile as described in 1. Review network configuration in the PCF Ops Director, please select this network here. In the screenshot in the Review network configuration in the PCF Ops Director section, this network is named
Click Upstream Nameservers.
In the General upstream nameservers field, enter your default nameservers. These nameservers resolve DNS queries except those from the following targets:
- Domain-specific nameservers that will be defined in the Domain Specific Nameservers field
- Hosts containing the
.a9svspattern in the hostname, which is reserved for services provided by anynines
Perform the following procedure for each additional domain you want to add:
- Click Add to add a domain-specific name server.
- In the Domain field, enter an internal domain or top-level domain.
- In the Nameservers field, enter a corresponding name server. The name server resolves DNS queries matching the domain. For example, this could be the name server of your specific provider or data center. When using vSphere, this could be an internal name server that resolves vSphere host names.
Return to the Installation Dashboard and click Apply changes to deploy the service.
Once the tile is successfully installed, it is required to find out the IP addresses of the nameserver within the a9s Consul DNS for PCF tile.
For this reason, click on the a9s Consul DNS tile and then Status. It takes a few seconds until the required information are displayed.
Record the three IP addresses of the dnsmasq servers.
After this step each DNS lookup made by applications running in the Pivotal Elastic Runtime will be routed to the a9s Consul DNS for PCF tile.
The settings in this step differ regarding to the networks configured in the BOSH Director. See “Review network configuration in the PCF Ops Director”.
- If you have created a dedicated network for the a9s Consul DNS tile, go to the Create Network section of the BOSH Director and replace the DNS IP addresses in the Network where the Pivotal Elastic Runtime is running. Configure at least two out of the three IP addresses you noted in step 3 in this field. Note: Don’t change the DNS settings of the network you have created for the a9s Consul DNS for PCF tile.
- If you have three subnets in you BOSH Director configured, go to the BOSH Director Create Network section and configure two of the three IP addresses (from step 3) in the DNS field of each subnet. Attention: For each subnet, ensure that you did not configure the IP address that belongs to the subnet itself and configure the two IP addresses that belong to the other subnets instead.