From dd80103568c275ca8405c5a146a3bb010e1a7fc7 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 22 Jan 2015 15:03:03 -0500 Subject: Puppet: Ntp support 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 | 10 ++++++++++ compute-puppet.yaml | 8 ++++++-- controller-puppet.yaml | 8 ++++++-- overcloud-without-mergepy.yaml | 2 ++ puppet/overcloud_compute.pp | 2 ++ puppet/overcloud_controller.pp | 2 ++ puppet/overcloud_object.pp | 2 ++ puppet/overcloud_volume.pp | 2 ++ swift-storage-puppet.yaml | 9 +++++++++ 9 files changed, 41 insertions(+), 4 deletions(-) diff --git a/cinder-storage-puppet.yaml b/cinder-storage-puppet.yaml index 31dae229..508b483c 100644 --- a/cinder-storage-puppet.yaml +++ b/cinder-storage-puppet.yaml @@ -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 diff --git a/compute-puppet.yaml b/compute-puppet.yaml index 843898fe..000ca8d8 100644 --- a/compute-puppet.yaml +++ b/compute-puppet.yaml @@ -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: diff --git a/controller-puppet.yaml b/controller-puppet.yaml index 8b8a4eff..62fe2f1f 100644 --- a/controller-puppet.yaml +++ b/controller-puppet.yaml @@ -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} diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 329f2224..b7f529a3 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -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: diff --git a/puppet/overcloud_compute.pp b/puppet/overcloud_compute.pp index 798fb544..d187e031 100644 --- a/puppet/overcloud_compute.pp +++ b/puppet/overcloud_compute.pp @@ -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')]), } diff --git a/puppet/overcloud_controller.pp b/puppet/overcloud_controller.pp index 90f69eb1..6535afe1 100644 --- a/puppet/overcloud_controller.pp +++ b/puppet/overcloud_controller.pp @@ -15,6 +15,8 @@ if hiera('step') >= 1 { + include ::ntp + # TODO Galara class { 'mysql::server': override_options => { diff --git a/puppet/overcloud_object.pp b/puppet/overcloud_object.pp index ffd80886..92b2a66f 100644 --- a/puppet/overcloud_object.pp +++ b/puppet/overcloud_object.pp @@ -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')) diff --git a/puppet/overcloud_volume.pp b/puppet/overcloud_volume.pp index 460a82b4..e21eca50 100644 --- a/puppet/overcloud_volume.pp +++ b/puppet/overcloud_volume.pp @@ -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 diff --git a/swift-storage-puppet.yaml b/swift-storage-puppet.yaml index ba32a81e..26efffdb 100644 --- a/swift-storage-puppet.yaml +++ b/swift-storage-puppet.yaml @@ -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: -- cgit 1.2.3-korg