Configure auto-generation of records in a DNS zone

Configure auto-generation of records in a DNS zone

After you create a DNS zone and a record for this zone as described in Create a DNS zone and record, you can configure auto-generation of records in the created DNS zone.

To configure auto-generation of records in the created DNS zone:

  1. In your Git project repository, change the directory to classes/cluster/<cluster_name>/openstack/.

  2. In init.yml, set the designate_domain_id parameter according to the created DNS zone. For example:

    designate_domain_id: ce9836a9-ba78-4960-9c89-6a4989a9e095
    
  3. Refresh pillars on the Salt Minion nodes:

    salt '*' saltutil.pillar_refresh
    
  4. Apply the Designate states:

    salt -C 'I@designate:server and *01*' state.sls designate.server
    salt -C 'I@designate:server' state.sls designate
    
  5. Using the Nova CLI, boot the VM which you have created a DNS zone for.

  6. Verify that the DNS record related to the VM was created by running the salt 'ctl01*' cmd.run "openstack recordset list [zone_id]" command. For example:

    salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack recordset list \
    ce9836a9-ba78-4960-9c89-6a4989a9e095"
    

    Example of system response:

    ctl01.virtual-mcp-ocata-ovs.local:
    +------------------------------------+---------------------------+----+-----------+------+------+
    |id                                  |name                       |type|records    |status|action|
    +------------------------------------+---------------------------+----+-----------+------+------+
    |d099f013-460b-41ee-8cf1-3cf0e3c49bc7|tstserver01.testdomain.tld.|A   |192.168.0.1|ACTIVE|NONE  |
    +------------------------------------+---------------------------+----+-----------+------+------+