From b639d3c7c28b6913da997b823452f33b9bd721c8 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 12 Feb 2015 21:54:57 -0500 Subject: Split out allNodesConfig SoftwareConfig This patch splits out the allNodesConfig config such that alternate implementation (puppet for example) can implement their own SoftwareConfig's via a nested stack. This is controlled by the standard overcloud heat environment. For os-apply-config deployments the implementation should work the same as before. For puppet deployments the implementation uses hiera metadata to configure rabbit_nodes. The puppet deployment doesn't support hosts, or freeform sysctl metadata yet so those are the same for now as well. Change-Id: I34ae30b1f37aca8b39586f7e350511462d66f694 --- all-nodes-config.yaml | 57 +++++++++++++++++++++++++++++++ overcloud-resource-registry-puppet.yaml | 1 + overcloud-resource-registry.yaml | 1 + overcloud-without-mergepy.yaml | 41 +++++----------------- puppet/all-nodes-config.yaml | 60 +++++++++++++++++++++++++++++++++ puppet/controller-puppet.yaml | 1 + 6 files changed, 129 insertions(+), 32 deletions(-) create mode 100644 all-nodes-config.yaml create mode 100644 puppet/all-nodes-config.yaml diff --git a/all-nodes-config.yaml b/all-nodes-config.yaml new file mode 100644 index 00000000..677c12d6 --- /dev/null +++ b/all-nodes-config.yaml @@ -0,0 +1,57 @@ +heat_template_version: 2014-10-16 +description: 'All Nodes Config' + +parameters: + compute_hosts: + type: comma_delimited_list + controller_hosts: + type: comma_delimited_list + block_storage_hosts: + type: comma_delimited_list + object_storage_hosts: + type: comma_delimited_list + ceph_storage_hosts: + type: comma_delimited_list + controller_names: + type: comma_delimited_list + +resources: + + allNodesConfigImpl: + type: OS::Heat::StructuredConfig + properties: + config: + completion-signal: {get_input: deploy_signal_id} + hosts: + list_join: + - "\n" + - - list_join: + - "\n" + - {get_param: compute_hosts} + - list_join: + - "\n" + - {get_param: controller_hosts} + - list_join: + - "\n" + - {get_param: block_storage_hosts} + - list_join: + - "\n" + - {get_param: object_storage_hosts} + - list_join: + - "\n" + - {get_param: ceph_storage_hosts} + rabbit: + nodes: + list_join: + - ',' + - {get_param: controller_names} + sysctl: + net.ipv4.tcp_keepalive_time: 5 + net.ipv4.tcp_keepalive_probes: 5 + net.ipv4.tcp_keepalive_intvl: 1 + +outputs: + config_id: + description: The ID of the allNodesConfigImpl resource. + value: + {get_resource: allNodesConfigImpl} diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index ab6be35b..56699484 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -8,6 +8,7 @@ resource_registry: OS::TripleO::CephStorage: puppet/ceph-storage-puppet.yaml OS::TripleO::ControllerPostDeployment: puppet/controller-post-puppet.yaml OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig: puppet/swift-devices-and-proxy-config.yaml + OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml # NOTE(dprince): requires a new release of python-heatclient #default_parameters: diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index 6f85efe8..f7b28b19 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -8,3 +8,4 @@ resource_registry: OS::TripleO::CephStorage: ceph-storage.yaml OS::TripleO::ControllerPostDeployment: controller-post.yaml OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig: swift-devices-and-proxy-config.yaml + OS::TripleO::AllNodes::SoftwareConfig: all-nodes-config.yaml diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 6216f6e7..42e2e0dc 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -669,37 +669,14 @@ resources: CephMonitors: {get_attr: [Controller, corosync_node]} allNodesConfig: - type: OS::Heat::StructuredConfig + type: OS::TripleO::AllNodes::SoftwareConfig properties: - config: - completion-signal: {get_input: deploy_signal_id} - hosts: - list_join: - - "\n" - - - list_join: - - "\n" - - {get_attr: [Compute, hosts_entry]} - - list_join: - - "\n" - - {get_attr: [Controller, hosts_entry]} - - list_join: - - "\n" - - {get_attr: [BlockStorage, hosts_entry]} - - list_join: - - "\n" - - {get_attr: [ObjectStorage, hosts_entry]} - - list_join: - - "\n" - - {get_attr: [CephStorage, hosts_entry]} - rabbit: - nodes: - list_join: - - ',' - - {get_attr: [Controller, hostname]} - sysctl: - net.ipv4.tcp_keepalive_time: 5 - net.ipv4.tcp_keepalive_probes: 5 - net.ipv4.tcp_keepalive_intvl: 1 + compute_hosts: {get_attr: [Compute, hosts_entry]} + controller_hosts: {get_attr: [Controller, hosts_entry]} + block_storage_hosts: {get_attr: [BlockStorage, hosts_entry]} + object_storage_hosts: {get_attr: [ObjectStorage, hosts_entry]} + ceph_storage_hosts: {get_attr: [CephStorage, hosts_entry]} + controller_names: {get_attr: [Controller, hostname]} MysqlRootPassword: type: OS::Heat::RandomString @@ -794,13 +771,13 @@ resources: ControllerAllNodesDeployment: type: OS::Heat::StructuredDeployments properties: - config: {get_resource: allNodesConfig} + config: {get_attr: [allNodesConfig, config_id]} servers: {get_attr: [Controller, attributes, nova_server_resource]} ComputeAllNodesDeployment: type: OS::Heat::StructuredDeployments properties: - config: {get_resource: allNodesConfig} + config: {get_attr: [allNodesConfig, config_id]} servers: {get_attr: [Compute, attributes, nova_server_resource]} # Nested stack deployment runs after all other controller deployments diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml new file mode 100644 index 00000000..c5193e71 --- /dev/null +++ b/puppet/all-nodes-config.yaml @@ -0,0 +1,60 @@ +heat_template_version: 2014-10-16 +description: 'All Nodes Config for Puppet' + +parameters: + compute_hosts: + type: comma_delimited_list + controller_hosts: + type: comma_delimited_list + block_storage_hosts: + type: comma_delimited_list + object_storage_hosts: + type: comma_delimited_list + ceph_storage_hosts: + type: comma_delimited_list + controller_names: + type: comma_delimited_list + +resources: + + allNodesConfigImpl: + type: OS::Heat::StructuredConfig + properties: + config: + completion-signal: {get_input: deploy_signal_id} + hosts: + list_join: + - "\n" + - - list_join: + - "\n" + - {get_param: compute_hosts} + - list_join: + - "\n" + - {get_param: controller_hosts} + - list_join: + - "\n" + - {get_param: block_storage_hosts} + - list_join: + - "\n" + - {get_param: object_storage_hosts} + - list_join: + - "\n" + - {get_param: ceph_storage_hosts} + sysctl: + net.ipv4.tcp_keepalive_time: 5 + net.ipv4.tcp_keepalive_probes: 5 + net.ipv4.tcp_keepalive_intvl: 1 + hiera: + datafiles: + rabbit: + mapped_data: + rabbit_nodes: + list_join: + - ',' + - {get_param: controller_names} + +outputs: + config_id: + description: The ID of the allNodesConfigImpl resource. + value: + {get_resource: allNodesConfigImpl} diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 845b6b63..a4d68ff3 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -555,6 +555,7 @@ resources: - controller - object - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig + - rabbit # provided by allNodesConfig - common datafiles: common: -- cgit 1.2.3-korg