1、统一时区,在所有节点(controller、compute01、compute02)上执行
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 

2、在控制节点controller安装chrony,将控制节点作为NTP服务端
# yum install chrony -y

修改配置
vim /etc/chrony.conf

#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 ntp1.aliyun.com iburst
server controller iburst

allow 192.168.0.0/16
allow 172.16.0.0/16

3、设置开机自启动,设置时区
# systemctl enable chronyd.service
# systemctl start chronyd.service
# sudo timedatectl set-timezone Asia/Shanghai

4、在ntp服务器上启用NTP同步
# timedatectl set-ntp yes
# timedatectl status

5、在所有计算节点(compute01、compute02)安装chrony
# yum install chrony -y

修改配置文件
# vim /etc/chrony.conf

#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

设置开机自启动
# systemctl enable chronyd
# systemctl start chronyd

验证时间同步:
chronyc sources