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
- Log in to each API Connect VM.
- If the directory /etc/systemd/timesyncd.conf.d does not exist, then
create it.
sudo mkdir /etc/systemd/timesyncd.conf.d
- 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
- Set the contents of the cloud-init.conf file as shown:
[Time]
NTP=<ntp server hostname>
- Restart the
timesyncd
service.
sudo systemctl restart systemd-timesyncd
- Verify the connection to the NTP server.
sudo journalctl -u systemd-timesyncd
- Exit the VM, and from your project directory, update the
cloud_init
configuration and ISO files with your new NTP setting.
- 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
- 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.