Puppet: Ntp support
authorDan Prince <dprince@redhat.com>
Thu, 22 Jan 2015 20:03:03 +0000 (15:03 -0500)
committerDan Prince <dprince@redhat.com>
Wed, 4 Feb 2015 14:33:13 +0000 (09:33 -0500)
This patch adds NTP support to all roles.

As part of this change overcloud-without-mergepy.yaml has
also been updated so that it passes the NtpServer parameters into
the Swift and Cinder storage node templates so that Ntp can
also be configured on those machines as well.

NOTE: The puppet support here uses the puppetlabs-ntp modules
which we add in Ib10ccbfdb3140b19f40049707548c6655d250e1c.

Change-Id: If2ef236fa42a714e84c6944eee5fe4daddf3fedf

cinder-storage-puppet.yaml
compute-puppet.yaml
controller-puppet.yaml
overcloud-without-mergepy.yaml
puppet/overcloud_compute.pp
puppet/overcloud_controller.pp
puppet/overcloud_object.pp
puppet/overcloud_volume.pp
swift-storage-puppet.yaml

index 31dae22..508b483 100644 (file)
@@ -81,6 +81,10 @@ parameters:
     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
     type: string
     hidden: true
+  NtpServer:
+    type: string
+    default: ''
+
 resources:
   BlockStorage:
     type: OS::Nova::Server
@@ -115,6 +119,11 @@ resources:
               host: {get_param: VirtualIP}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
+        ntp_servers:
+          str_replace:
+            template: '["server"]'
+            params:
+              server: {get_param: NtpServer}
       signal_transport: NO_SIGNAL
 
   # Map heat metadata into hiera datafiles
@@ -143,6 +152,7 @@ resources:
                 cinder::rabbit_hosts: {get_input: rabbit_hosts}
                 cinder::rabbit_userid: {get_input: rabbit_username}
                 cinder::rabbit_password: {get_input: rabbit_password}
+                ntp::servers: {get_input: ntp_servers}
 
   VolumePuppetConfig:
     type: OS::Heat::SoftwareConfig
index 843898f..000ca8d 100644 (file)
@@ -335,7 +335,7 @@ resources:
                 nova::rabbit_password: {get_input: rabbit_password}
                 neutron::rabbit_password: {get_input: rabbit_password}
                 ceilometer::rabbit_password: {get_input: rabbit_password}
-                ntp_server: {get_input: ntp_server}
+                ntp::servers: {get_input: ntp_servers}
 
   NovaComputeDeployment:
     type: OS::TripleO::SoftwareDeployment
@@ -380,7 +380,11 @@ resources:
         rabbit_host: {get_param: RabbitHost}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
-        ntp_server: {get_param: NtpServer}
+        ntp_servers:
+          str_replace:
+            template: '["server"]'
+            params:
+              server: {get_param: NtpServer}
 
 outputs:
   ip_address:
index 8b8a4ef..62fe2f1 100644 (file)
@@ -524,7 +524,11 @@ resources:
         rabbit_cookie: {get_param: RabbitCookie}
         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
         rabbit_client_port: {get_param: RabbitClientPort}
-        ntp_server: {get_param: NtpServer}
+        ntp_servers:
+          str_replace:
+            template: '["server"]'
+            params:
+              server: {get_param: NtpServer}
         control_virtual_interface: {get_param: ControlVirtualInterface}
         public_virtual_interface: {get_param: PublicVirtualInterface}
         public_virtual_ip: {get_param: PublicVirtualIP}
@@ -685,7 +689,7 @@ resources:
                 rabbit_client_port: {get_input: rabbit_client_port}
                 # Misc
                 neutron_public_interface_ip: {get_input: neutron_public_interface_ip}
-                ntp_server: {get_input: ntp_server}
+                ntp::servers: {get_input: ntp_servers}
                 control_virtual_interface: {get_input: control_virtual_interface}
                 controller_virtual_ip: {get_input: controller_virtual_ip}
                 public_virtual_interface: {get_input: public_virtual_interface}
index 329f222..b7f529a 100644 (file)
@@ -611,6 +611,7 @@ resources:
           Flavor: {get_param: OvercloudBlockStorageFlavor}
           RabbitPassword: {get_param: RabbitPassword}
           RabbitUserName: {get_param: RabbitUserName}
+          NtpServer: {get_param: NtpServer}
 
   ObjectStorage:
     type: OS::Heat::ResourceGroup
@@ -627,6 +628,7 @@ resources:
           PartPower: {get_param: SwiftPartPower}
           Image: {get_param: SwiftStorageImage}
           Replicas: { get_param: SwiftReplicas}
+          NtpServer: {get_param: NtpServer}
 
 
   allNodesConfig:
index 798fb54..d187e03 100644 (file)
@@ -13,6 +13,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+include ::ntp
+
 class { 'nova':
   glance_api_servers => join([hiera('glance_protocol'), '://', hiera('glance_host'), ':', hiera('glance_port')]),
 }
index 90f69eb..6535afe 100644 (file)
@@ -15,6 +15,8 @@
 
 if hiera('step') >= 1 {
 
+  include ::ntp
+
   # TODO Galara
   class { 'mysql::server':
     override_options => {
index ffd8088..92b2a66 100644 (file)
@@ -13,6 +13,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+include ::ntp
+
 include ::swift
 class {'swift::storage::all':
   mount_check => str2bool(hiera('swift_mount_check'))
index 460a82b..e21eca5 100644 (file)
@@ -13,6 +13,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+include ::ntp
+
 include ::cinder
 include ::cinder::volume
 include ::cinder::volume::iscsi
index ba32a81..26efffd 100644 (file)
@@ -44,6 +44,9 @@ parameters:
     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
     type: string
     hidden: true
+  NtpServer:
+    type: string
+    default: ''
 
 resources:
 
@@ -114,6 +117,7 @@ resources:
                 swift::storage::all::storage_local_net_ip: {get_input: local_ip}
                 swift_mount_check: {get_input: swift_mount_check }
                 tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
+                ntp::servers: {get_input: ntp_servers}
                 # NOTE(dprince): build_ring support is currently not wired in.
                 # See: https://review.openstack.org/#/c/109225/
                 tripleo::ringbuilder::build_ring: True
@@ -134,6 +138,11 @@ resources:
         swift_min_part_hours: {get_param: MinPartHours}
         swift_part_power: {get_param: PartPower}
         swift_replicas: { get_param: Replicas}
+        ntp_servers:
+          str_replace:
+            template: '["server"]'
+            params:
+              server: {get_param: NtpServer}
 
 outputs:
   hosts_entry: