Changing the DNS server configuration

Update the DNS addresses on your API Connect VMs.

About this task

This task covers how to update the DNS name servers list on your API Connect VMs. Other network properties such as the VM IP address and hostname cannot be changed after deployment.

Procedure

  1. Log in to each API Connect VM.
    ssh apicadm@<vm hostname>
  2. Edit the /etc/netplan/50-cloud-init.yaml file and update the list of name server addresses.
    sudo vi /etc/netplan/50-cloud-init.yaml

    The following example shows what the list of name server addresses looks like in the file:

    network:
        ethernets:
            eth0:
                addresses:
                - 192.168.122.242/24
                nameservers:
                    addresses:
                    - 1.1.1.1
                    - 1.0.0.1
                    - 8.8.8.8
                    search:
                    - nip.io
                routes:
                -   metric: 10
                    to: 0.0.0.0/0
                    via: 192.168.122.1
        version: 2
    
    Attention: Do not change anything else in this file. Change only the namerservers.addresses contents.
  3. Run the following command to apply the changes:
    sudo netplan apply
  4. Run the following command to verify the changes:
    cat /run/systemd/resolve/resolv.conf
  5. Repeat steps 1 to 4 on all your API Connect VMs.
  6. From your project directory, specify the DNS servers with the apicup command:
    apicup subsys set <subsystem name> dns-servers=ip_address_of_dns_server[,ip_address_of_another_dns_server_if_necessary]

    Use a comma to separate multiple server addresses.

  7. Create new ISO files for your API Connect deployment
    apicup subsys install <subsystem name> --out <subsystem name>plan-out
    Important: Setting dns-servers with apicup does not update the DNS servers on the deployed VMs, but it does ensure that the new ISO files you create contain these updated settings. In a disaster recovery scenario where you must redeploy your VMs, if you deploy with your original ISO files (that contain your old DNS config), then you must repeat this task after the VMs are deployed.