openstack-manuals/doc/install-guide/section_installing-ntp.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
Current folder name	New folder name	        Book title
----------------------------------------------------------
basic-install 	        DELETE
cli-guide	        DELETE
common	                common
NEW	                admin-guide-cloud	Cloud Administrators Guide
docbkx-example	        DELETE
openstack-block-storage-admin 	DELETE
openstack-compute-admin 	DELETE
openstack-config 	config-reference	OpenStack Configuration Reference
openstack-ha 	        high-availability-guide	OpenStack High Availabilty Guide
openstack-image	        image-guide	OpenStack Virtual Machine Image Guide
openstack-install 	install-guide	OpenStack Installation Guide
openstack-network-connectivity-admin 	admin-guide-network 	OpenStack Networking Administration Guide
openstack-object-storage-admin 	DELETE
openstack-security 	security-guide	OpenStack Security Guide
openstack-training 	training-guide	OpenStack Training Guide
openstack-user 	        user-guide	OpenStack End User Guide
openstack-user-admin 	user-guide-admin	OpenStack Admin User Guide
glossary	        NEW        	OpenStack Glossary

bug: #1220407

Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7
author: diane fleming
2013-09-08 15:15:50 -07:00

38 lines
2.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="installing-ntp"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Installing Network Time Protocol (NTP)</title>
<para>To keep all the services in sync across multiple machines,
you need to install NTP, and if you do a multi-node
configuration you will configure one server to be the
reference server.</para>
<screen os="ubuntu"><prompt>$</prompt> <userinput>sudo apt-get install ntp</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>$</prompt> <userinput>sudo yum install ntp</userinput></screen>
<screen os="opensuse"><prompt>$</prompt> <userinput>sudo zypper install ntp</userinput></screen>
<para>Set up the NTP server on your controller node so that it
receives data by modifying the <filename>ntp.conf</filename>
file and restarting the service. As root:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>sed -i 's/server ntp.ubuntu.com/server ntp.ubuntu.com\nserver 127.127.1.0\nfudge 127.127.1.0 stratum 10/g' /etc/ntp.conf</userinput>
<prompt>#</prompt> <userinput>service ntp restart</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>$</prompt> <userinput>sudo service ntpd start</userinput>
<prompt>$</prompt> <userinput>sudo chkconfig ntpd on</userinput></screen>
<screen os="opensuse"><prompt>$</prompt> <userinput>sudo systemctl start ntp.service</userinput>
<prompt>$</prompt> <userinput>sudo systemctl enable ntp.service</userinput></screen>
<para>Set up the NTP client on your compute node so that the time
between controller node and compute node is synchronized. The
simplest way to do this is to add a daily cron job that
synchronizes the compute node's clock with the controller
node. You can accomplish this by adding a file, owned by root,
marked executable, at
<filename>/etc/cron.daily/ntpdate</filename> that contains
the
following:<programlisting>ntpdate <replaceable>&lt;hostname or IP address of controller></replaceable>
hwclock -w</programlisting></para>
<para>If a large clock skew builds up between the compute nodes and the controller node, then
the time change that occurs when the ntpdate cron job runs may confuse some programs running
on the compute nodes. To allow more gradual time updates, install the NTP package on the
compute nodes in addition to the API nodes.</para>
</section>