tripleo-heat-templates/puppet/all-nodes-config.yaml
Steven Hardy 10a24b2faa Move ceph cluster config out of allNodesConfig
Pass the list of ceph nodes to the ceph_mon profile via
the service template - this requires some fixup to the
profile to handle the ipv6 case.

Note this also aligns the ServiceNetMap keys so that the
composable node_ips logic will generate the lists when
the ceph_mon service is enabled.

Change-Id: If8a5c65f17e677fe62243b3aa746fd642f72d2b0
Depends-On: I481dd2cd2cde7f1491080e6d9c7dcb7047c22de1
Partially-Implements: blueprint custom-roles
2016-08-30 12:51:50 +02:00

156 lines
5.9 KiB
YAML

heat_template_version: 2016-10-14
description: 'All Nodes Config for Puppet'
parameters:
hosts:
type: comma_delimited_list
# FIXME(shardy) this can be comma_delimited_list when
# https://bugs.launchpad.net/heat/+bug/1617019 is fixed
enabled_services:
type: string
controller_ips:
type: comma_delimited_list
service_ips:
type: json
controller_names:
type: comma_delimited_list
rabbit_node_ips:
type: comma_delimited_list
memcache_node_ips:
type: comma_delimited_list
keystone_public_api_node_ips:
type: comma_delimited_list
keystone_admin_api_node_ips:
type: comma_delimited_list
ceph_mon_node_names:
type: comma_delimited_list
DeployIdentifier:
type: string
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
UpdateIdentifier:
type: string
description: >
Setting to a previously unused value during stack-update will trigger
package update on all nodes
StackAction:
type: string
description: >
Heat action on performed top-level stack.
constraints:
- allowed_values: ['CREATE', 'UPDATE']
resources:
allNodesConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: os-apply-config
config:
hosts:
list_join:
- "\n"
- {get_param: hosts}
hiera:
datafiles:
bootstrap_node:
mapped_data:
bootstrap_nodeid: {get_input: bootstrap_nodeid}
bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
all_nodes:
mapped_data:
map_merge:
- enabled_services: {get_param: enabled_services}
# This writes out a mapping of service_name_enabled: 'true'
# For any services not enabled, hiera foo_enabled will
# return nil, as it's undefined
- map_merge:
repeat:
template:
# Note this must be string 'true' due to
# https://bugs.launchpad.net/heat/+bug/1617203
SERVICE_enabled: 'true'
for_each:
SERVICE:
str_split: [',', {get_param: enabled_services}]
# provides a mapping of service_name_ips to a list of IPs
- {get_param: service_ips}
- controller_node_ips:
list_join:
- ','
- {get_param: controller_ips}
controller_node_names:
list_join:
- ','
- {get_param: controller_names}
galera_node_names:
list_join:
- ','
- {get_param: controller_names}
rabbitmq_node_ips: &rabbit_nodes_array
str_replace:
template: "['SERVERS_LIST']"
params:
SERVERS_LIST:
list_join:
- "','"
- {get_param: rabbit_node_ips}
memcached_node_ips_v6:
str_replace:
template: "['inet6:[SERVERS_LIST]']"
params:
SERVERS_LIST:
list_join:
- "]','inet6:["
- {get_param: memcache_node_ips}
keystone_public_api_node_ips:
str_replace:
template: "['SERVERS_LIST']"
params:
SERVERS_LIST:
list_join:
- "','"
- {get_param: keystone_public_api_node_ips}
keystone_admin_api_node_ips:
str_replace:
template: "['SERVERS_LIST']"
params:
SERVERS_LIST:
list_join:
- "','"
- {get_param: keystone_admin_api_node_ips}
tripleo::profile::base::ceph::ceph_mon_initial_members:
list_join:
- ','
- {get_param: ceph_mon_node_names}
# NOTE(gfidente): interpolation with %{} in the
# hieradata file can't be used as it returns string
ceilometer::rabbit_hosts: *rabbit_nodes_array
aodh::rabbit_hosts: *rabbit_nodes_array
cinder::rabbit_hosts: *rabbit_nodes_array
glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array
manila::rabbit_hosts: *rabbit_nodes_array
heat::rabbit_hosts: *rabbit_nodes_array
neutron::rabbit_hosts: *rabbit_nodes_array
nova::rabbit_hosts: *rabbit_nodes_array
keystone::rabbit_hosts: *rabbit_nodes_array
sahara::rabbit_hosts: *rabbit_nodes_array
ironic::rabbit_hosts: *rabbit_nodes_array
deploy_identifier: {get_param: DeployIdentifier}
update_identifier: {get_param: UpdateIdentifier}
stack_action: {get_param: StackAction}
outputs:
config_id:
description: The ID of the allNodesConfigImpl resource.
value:
{get_resource: allNodesConfigImpl}
hosts_entries:
description: |
The content that should be appended to your /etc/hosts if you want to get
hostname-based access to the deployed nodes (useful for testing without
setting up a DNS).
value: {get_attr: [allNodesConfigImpl, config, hosts]}