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
This commit is contained in:
Dan Prince 2015-01-22 15:03:03 -05:00
parent a536d3c888
commit dd80103568
9 changed files with 41 additions and 4 deletions

View 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

View 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:

View 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}

View 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:

View 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')]),
}

View File

@ -15,6 +15,8 @@
if hiera('step') >= 1 {
include ::ntp
# TODO Galara
class { 'mysql::server':
override_options => {

View 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'))

View 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

View 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: