You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

DNS/Netbox: Difference between revisions

From Wikitech-static
< DNS
Jump to navigation Jump to search
imported>Volans
(→‎Transition: Update what changes referring to the transition dedicated page)
imported>Volans
(→‎DNS records involved: Migrated ulsfo mgmt)
Line 15: Line 15:
=== Active ===
=== Active ===
==== Management ====
==== Management ====
* NONE
* <code>ulsfo</code>
==== Primary IPs ====
==== Primary IPs ====
* NONE
* NONE
Line 21: Line 21:
=== To be migrated ===
=== To be migrated ===
==== Management ====
==== Management ====
* <code>ulsfo</code>
* <code>eqsin</code>
* <code>eqsin</code>
* <code>esams</code>
* <code>esams</code>

Revision as of 14:49, 1 June 2020

Part of the DNS records are or will soon be automatically generated from data that resides in Netbox.

Infrastructure

  • Netbox data is exported via Netbox#DNS.
  • Netbox data is checked out on the authoritative DNS servers in /srv/git/netbox_dns_snippets.
  • When compiling the gdnsd final zones, the Netbox data is copied into /etc/gdnsd/zones/netbox for later inclusion.
  • In the actual zonefiles, within an $ORIGIN, the related snippet file is included using the $INCLUDE directive.

DNS records involved

  • Management forward (A) and reverse (PTR) records for both the hostname (foo.mgmt.eqiad.wmnet) and the asset tag (wmf1234.mgmt.eqiad.wmnet)
  • Primary IPv4 (A) and IPv6 (AAAA) and related reverse (PTR) records for the hostname (foo.eqiad.wmnet or foo.wikimedia.org)

Active

Management

  • ulsfo

Primary IPs

  • NONE

To be migrated

Management

  • eqsin
  • esams
  • frack in codfw
  • frack in eqiad
  • codfw
  • eqiad

Primary IPs

  • ulsfo
  • eqsin
  • esams
  • frack in codfw
  • frack in eqiad
  • codfw
  • eqiad

Operations

Update generated records

To update the dynamically generated records based on the current Netbox data and deploy them to all the authoritative DNS servers, the sre.dns.netbox cookbook must be run. See also Cookbooks#Cookbook_Operations. For example:

 sudo cookbook sre.dns.netbox -t T12345 "Add newly racked cp hosts in eqiad"

Convert an hardcoded $ORIGIN to Netbox

This is an example patch to convert an hardcoded $ORIGIN to the dynamically generated data.

Transition

The records involved in the transition from hardcoded records to the Netbox driven ones and the order of the transition is listed above, see the To be migrated section.

Here's an example patch of the transition of management records for ulsfo.

What changes

The changes in procedure are outlined in the Server_Lifecycle/DNS_Transition page.