Ales Nosek - The Software Practitioner

Practicing to make software perfect.

OpenStack Dynamic DNS Updates

Today’s user story is: As a private cloud user I’d like to have virtual machines registered with internal DNS. Let’s look at how a software practitioner solves this problem in a truly agile way.

The OpenStack Designate project implements DNSaaS. After trying out Designate, I realized that for simple DNS updates DNSaaS is a little too involved.

In my previous article I described how to monitor Nova events on RabbitMQ message bus. Two events of interest are compute.instance.create.end and compute.instance.delete.start that are sent by Nova on instance creation and instance deletion. Both events carry enough information for us to create a simple script to extract the hostname and IP addresses of the instance from the events and update the internal DNS using the nsupdate command.

You can find the DNS updates implementantion including the systemd startup script at GitHub: openstack-dns-updater.