diff options
Diffstat (limited to 'overcloud.j2.yaml')
-rw-r--r-- | overcloud.j2.yaml | 181 |
1 files changed, 151 insertions, 30 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 56a10a52..ddf2701a 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -55,6 +55,28 @@ parameters: Control the IP allocation for the ControlVirtualIP port. E.g. [{'ip_address':'1.2.3.4'}] type: json + ExtraConfig: + default: {} + description: | + Additional hiera configuration to inject into the cluster. + type: json +{%- for role in roles %} + {{role.name}}ExtraConfig: + default: {} + description: | + Role specific additional hiera configuration to inject into the cluster. + type: json +{%- endfor %} + controllerExtraConfig: + default: {} + description: | + DEPRECATED use ControllerExtraConfig instead + type: json + NovaComputeExtraConfig: + default: {} + description: | + DEPRECATED use ComputeExtraConfig instead + type: json InternalApiVirtualFixedIPs: default: [] description: > @@ -154,7 +176,6 @@ parameters: {% else %} default: "%stackname%-{{role.name.lower()}}-%index%" {% endif %} - {{role.name}}RemovalPolicies: default: [] type: json @@ -203,6 +224,13 @@ parameters: description: > List of server hostnames to blacklist from any triggered deployments. +parameter_groups: +- label: deprecated + description: Do not use deprecated params, they will be removed. + parameters: + - controllerExtraConfig + - NovaComputeExtraConfig + conditions: add_vips_to_etc_hosts: {equals : [{get_param: AddVipsToEtcHosts}, True]} @@ -254,6 +282,20 @@ resources: properties: length: 10 + NetCidrMapValue: + type: OS::Heat::Value + properties: + type: json + value: + map_replace: + - map_merge: + - {get_attr: [Networks, net_cidr_map]} + - ctlplane: {get_attr: [ControlVirtualIP, subnets, 0, cidr]} + - keys: + ctlplane: {get_param: NeutronControlPlaneID} + values: + disabled: {get_attr: [ControlVirtualIP, subnets, 0, cidr]} + ServiceNetMap: type: OS::TripleO::ServiceNetMap @@ -294,6 +336,8 @@ resources: Services: get_param: {{role.name}}Services ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]} + ServiceData: + net_cidr_map: {get_attr: [NetCidrMapValue, value]} EndpointMap: {get_attr: [EndpointMap, endpoint_map]} DefaultPasswords: {get_attr: [DefaultPasswords, passwords]} RoleName: {{role.name}} @@ -307,6 +351,56 @@ resources: type: json value: {get_attr: [{{role.name}}ServiceChain, role_data]} + {{role.name}}ServiceConfigSettings: + type: OS::Heat::Value + properties: + type: json + value: + map_merge: + - get_attr: [{{role.name}}ServiceChainRoleData, value, config_settings] + {% for r in roles %} + - get_attr: [{{r.name}}ServiceChainRoleData, value, global_config_settings] + {% endfor %} + # This next step combines two yaql passes: + # - The inner one does a deep merge on the service_config_settings for all roles + # - The outer one filters the map based on the services enabled for the role + # then merges the result into one map. + - yaql: + expression: let(root => $) -> $.data.map.items().where($[0] in coalesce($root.data.services, [])).select($[1]).reduce($1.mergeWith($2), {}) + data: + map: + yaql: + expression: $.data.where($ != null).reduce($1.mergeWith($2), {}) + data: + {% for r in roles %} + - get_attr: [{{r.name}}ServiceChainRoleData, value, service_config_settings] + {% endfor %} + services: {get_attr: [{{role.name}}ServiceNames, value]} + + {{role.name}}MergedConfigSettings: + type: OS::Heat::Value + properties: + type: json + value: + config_settings: {} + global_config_settings: {} + service_config_settings: {} + merged_config_settings: + map_merge: + - get_attr: [{{role.name}}ServiceConfigSettings, value] + - get_param: ExtraConfig + {%- if role.name == 'Controller' %} + - map_merge: + - get_param: controllerExtraConfig + - get_param: {{role.name}}ExtraConfig + {%- elif role.name == 'Compute' %} + - map_merge: + - get_param: NovaComputeExtraConfig + - get_param: {{role.name}}ExtraConfig + {%- else %} + - get_param: {{role.name}}ExtraConfig + {%- endif %} + # Filter any null/None service_names which may be present due to mapping # of services to OS::Heat::None {{role.name}}ServiceNames: @@ -421,27 +515,7 @@ resources: {% else %} NovaComputeSchedulerHints: {get_param: NovaComputeSchedulerHints} {% endif %} - ServiceConfigSettings: - map_merge: - - get_attr: [{{role.name}}ServiceChainRoleData, value, config_settings] - {% for r in roles %} - - get_attr: [{{r.name}}ServiceChain, role_data, global_config_settings] - {% endfor %} - # This next step combines two yaql passes: - # - The inner one does a deep merge on the service_config_settings for all roles - # - The outer one filters the map based on the services enabled for the role - # then merges the result into one map. - - yaql: - expression: let(root => $) -> $.data.map.items().where($[0] in coalesce($root.data.services, [])).select($[1]).reduce($1.mergeWith($2), {}) - data: - map: - yaql: - expression: $.data.where($ != null).reduce($1.mergeWith($2), {}) - data: - {% for r in roles %} - - get_attr: [{{r.name}}ServiceChain, role_data, service_config_settings] - {% endfor %} - services: {get_attr: [{{role.name}}ServiceNames, value]} + ServiceConfigSettings: {get_attr: [{{role.name}}ServiceConfigSettings, value]} ServiceNames: {get_attr: [{{role.name}}ServiceNames, value]} MonitoringSubscriptions: {get_attr: [{{role.name}}ServiceChainRoleData, value, monitoring_subscriptions]} ServiceMetadataSettings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]} @@ -581,8 +655,6 @@ resources: {% for role in roles %} - {get_attr: [{{role.name}}IpListMap, short_service_bootstrap_hostnames]} {% endfor %} - # FIXME(shardy): These require further work to move into service_ips - memcache_node_ips: {get_attr: [{{primary_role_name}}IpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MemcachedNetwork]}]} NetVipMap: {get_attr: [VipMap, net_ip_map]} RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]} ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]} @@ -680,6 +752,10 @@ resources: StorageMgmtIp: {get_attr: [StorageMgmtVirtualIP, ip_address]} StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]} # No tenant or management VIP required + # Because of nested get_attr functions in the KeystoneAdminVip output, we + # can't determine which attributes of VipMap are used until after + # ServiceNetMap's attribute values are available. + depends_on: ServiceNetMap # All Nodes Validations AllNodesValidationConfig: @@ -766,7 +842,10 @@ resources: {% endfor %} role_data: {% for role in roles %} - {{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]} + {{role.name}}: + map_merge: + - {get_attr: [{{role.name}}ServiceChainRoleData, value]} + - {get_attr: [{{role.name}}MergedConfigSettings, value]} {% endfor %} ServerOsCollectConfigData: @@ -778,6 +857,38 @@ resources: {{role.name}}: {get_attr: [{{role.name}}, attributes, os_collect_config]} {% endfor %} + DeployedServerEnvironment: + type: OS::TripleO::DeployedServerEnvironment + properties: + RoleCounts: +{% for role in roles %} + {{role.name}}DeployedServerCount: {get_param: {{role.name}}Count} +{% endfor %} + VipMap: + map_merge: + - {get_attr: [VipMap, net_ip_map]} + - redis: {get_attr: [RedisVirtualIP, ip_address]} + DeployedServerPortMap: + map_merge: + list_concat: +{% for role in roles %} + - {get_attr: [{{role.name}}, deployed_server_port_map]} +{% endfor %} + DeployedServerDeploymentSwiftDataMap: + map_merge: + list_concat: +{% for role in roles %} + - {get_attr: [{{role.name}}, deployed_server_deployment_swift_data_map]} +{% endfor %} + DefaultRouteIp: + str_split: + - ':' + - str_split: + - '/' + - {get_attr: [ServerOsCollectConfigData, value, {{primary_role_name}}, '0', request, metadata_url]} + - 2 + - 0 + outputs: ManagedEndpoints: description: Asserts that the keystone endpoints have been provisioned. @@ -787,6 +898,11 @@ outputs: value: {get_attr: [EndpointMapData, value, KeystonePublic, uri]} KeystoneAdminVip: description: Keystone Admin VIP endpoint + # Note that these nested get_attr functions require a dependency + # relationship between VipMap and ServiceNetMap, since we can't determine + # which attributes of VipMap are used until after ServiceNetMap's attribute + # values are available. If this is ever reworked to not use nested + # get_attr, that dependency can be removed. value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]} EndpointMap: description: | @@ -814,7 +930,10 @@ outputs: description: The configuration data associated with each role value: {% for role in roles %} - {{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]} + {{role.name}}: + map_merge: + - {get_attr: [{{role.name}}ServiceChainRoleData, value]} + - {get_attr: [{{role.name}}MergedConfigSettings, value]} {% endfor %} RoleNetIpMap: description: Mapping of each network to a list of IPs for each role @@ -830,10 +949,7 @@ outputs: {% endfor %} ServerOsCollectConfigData: description: The os-collect-config configuration associated with each server resource - value: -{% for role in roles %} - {{role.name}}: {get_attr: [{{role.name}}, attributes, os_collect_config]} -{% endfor %} + value: {get_attr: [ServerOsCollectConfigData, value]} VipMap: description: Mapping of each network to VIP addresses. Also includes the Redis VIP. value: @@ -843,3 +959,8 @@ outputs: ServerIdData: description: Mapping of each role to a list of nova server IDs and the bootstrap ID value: {get_attr: [ServerIdMap, value]} + DeployedServerEnvironment: + description: + Environment data that can be used as input into the services stack when + using split-stack. + value: {get_attr: [DeployedServerEnvironment, deployed_server_environment]} |