Overriding NTP server configuration

Override the hostname set for the NTP server on your VMs.

About this task

If you did not specify your NTP server during installation, or you want to change the configuration, then follow the steps in this topic.

Important: All API Connect subsystems must set their time from the same NTP server. Repeat these steps on all subsystem VMs in your deployment.

Procedure

  1. Log in to each API Connect VM.
    ssh apicadm@<hostname>
  2. If the directory /etc/systemd/timesyncd.conf.d does not exist, then create it.
    sudo mkdir /etc/systemd/timesyncd.conf.d
  3. Edit the file /etc/systemd/timesyncd.conf.d/cloud-init.conf. If this file does not exist, then create it.
    sudo vi /etc/systemd/timesyncd.conf.d/cloud-init.conf
  4. Set the contents of the cloud-init.conf file as shown:
    [Time]
    
    NTP=<ntp server hostname>
  5. Restart the timesyncd service.
    sudo systemctl restart systemd-timesyncd
  6. Verify the connection to the NTP server.
    sudo journalctl -u systemd-timesyncd
  7. Exit the VM, and from your project directory, update the cloud_init configuration and ISO files with your new NTP setting.
    1. Create a file called cloud-init.yaml (if it does not already exist) and paste in the details of your NTP server.
      ntp:
        enabled: true
        ntp_client: systemd-timesyncd
        servers:
          - ntp.example.com
    2. Set additional-cloud-init-file to your cloud-init.yaml file.
      apicup subsys set <subsys> additional-cloud-init-file cloud-init.yaml
    Note: Updating the project directory cloud_init configuration with your new NTP settings is necessary so that if you encounter a disaster recovery situation (where you must re-create the ISO files and redeploy API Connect), your new deployment does not use your old NTP configuration.