Configuring NTP
Configuring NTP on the Controller Node
- Install chrony.
1yum -y install chrony
- Set a unified time zone for all nodes, for example, set the time zone to Asia.
1timedatectl set-timezone Asia/Shanghai
- Configure the controller node as the internal NTP server and edit the /etc/chrony.conf file.
- Open the file.
1vi /etc/chrony.conf - Press i to enter the insert mode and add the following commands in the blank area:
1 2 3 4 5 6 7
# server 0.centos.pool.ntp.org iburst # server 1.centos.pool.ntp.org iburst # server 2.centos.pool.ntp.org iburst # server 3.centos.pool.ntp.org iburst server controller iburst allow 192.168.100.0/24 local stratum 10

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Enable the chrony service and configure it to start as the system boots.
1 2
systemctl enable chronyd.service systemctl start chronyd.service
- Enable NTP time synchronization.
1timedatectl set-ntp yes
Configuring NTP on the Compute Nodes (x86-compute and arm-compute)
- Install chrony.
1yum -y install chrony
- Modify the /etc/chrony.conf file.
- Open the file.
1vi /etc/chrony.conf - Press i to enter the insert mode, add the following content to the file, and delete or comment out other contents related to server:
1server controller iburst

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Enable the chrony service and configure it to start as the system boots.
1 2
systemctl enable chronyd.service systemctl restart chronyd.service
- Verify time synchronization.
1chronyc sourcescontroller is displayed as the clock source for the controller node and compute node (x86-compute and arm-compute).

Run the date command to check whether the time is synchronized. If time synchronization fails, restart the NTP service.
timedatectl set-ntp no timedatectl set-ntp yes
Parent topic: Configuring the Deployment Environment