3c6ec654b4
Heat now supports release name aliases, so we can replace the inconsistent mix of date related versions with one consistent version that aligns with the supported version of heat for this t-h-t branch. This should also help new users who sometimes copy/paste old templates and discover intrinsic functions in the t-h-t docs don't work because their template version is too old. Change-Id: Ib415e7290fea27447460baa280291492df197e54
118 lines
3.3 KiB
YAML
118 lines
3.3 KiB
YAML
heat_template_version: ocata
|
|
|
|
description: >
|
|
Post-deploy configuration steps via puppet for all roles,
|
|
as defined in ../roles_data.yaml
|
|
|
|
parameters:
|
|
servers:
|
|
type: json
|
|
description: Mapping of Role name e.g Controller to a list of servers
|
|
|
|
role_data:
|
|
type: json
|
|
description: Mapping of Role name e.g Controller to the per-role data
|
|
|
|
DeployIdentifier:
|
|
default: ''
|
|
type: string
|
|
description: >
|
|
Setting this to a unique value will re-run any deployment tasks which
|
|
perform configuration on a Heat stack-update.
|
|
|
|
resources:
|
|
|
|
{% for role in roles %}
|
|
# Post deployment steps for all roles
|
|
# A single config is re-applied with an incrementing step number
|
|
# {{role.name}} Role steps
|
|
{{role.name}}ArtifactsConfig:
|
|
type: deploy-artifacts.yaml
|
|
|
|
{{role.name}}ArtifactsDeploy:
|
|
type: OS::Heat::StructuredDeployments
|
|
properties:
|
|
servers: {get_param: [servers, {{role.name}}]}
|
|
config: {get_resource: {{role.name}}ArtifactsConfig}
|
|
|
|
{{role.name}}PreConfig:
|
|
type: OS::TripleO::Tasks::{{role.name}}PreConfig
|
|
properties:
|
|
servers: {get_param: [servers, {{role.name}}]}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
|
|
{{role.name}}Config:
|
|
type: OS::TripleO::{{role.name}}Config
|
|
properties:
|
|
StepConfig: {get_param: [role_data, {{role.name}}, step_config]}
|
|
|
|
{% if role.name == 'Controller' %}
|
|
ControllerPrePuppet:
|
|
type: OS::TripleO::Tasks::ControllerPrePuppet
|
|
properties:
|
|
servers: {get_param: [servers, Controller]}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
{% endif %}
|
|
|
|
# Step through a series of configuration steps
|
|
{% for step in range(1, 6) %}
|
|
{% for role in roles %}
|
|
|
|
{{role.name}}Deployment_Step{{step}}:
|
|
type: OS::Heat::StructuredDeploymentGroup
|
|
{% if step == 1 %}
|
|
depends_on: [{{role.name}}PreConfig, {{role.name}}ArtifactsDeploy]
|
|
{% else %}
|
|
depends_on:
|
|
{% for dep in roles %}
|
|
- {{dep.name}}Deployment_Step{{step -1}}
|
|
{% endfor %}
|
|
{% endif %}
|
|
properties:
|
|
name: {{role.name}}Deployment_Step{{step}}
|
|
servers: {get_param: [servers, {{role.name}}]}
|
|
config: {get_resource: {{role.name}}Config}
|
|
input_values:
|
|
step: {{step}}
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
{{role.name}}PostConfig:
|
|
type: OS::TripleO::Tasks::{{role.name}}PostConfig
|
|
depends_on:
|
|
{% for dep in roles %}
|
|
- {{dep.name}}Deployment_Step5
|
|
{% endfor %}
|
|
properties:
|
|
servers: {get_param: servers}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
|
|
# Note, this should come last, so use depends_on to ensure
|
|
# this is created after any other resources.
|
|
{{role.name}}ExtraConfigPost:
|
|
depends_on:
|
|
{% for dep in roles %}
|
|
- {{dep.name}}PostConfig
|
|
{% endfor %}
|
|
type: OS::TripleO::NodeExtraConfigPost
|
|
properties:
|
|
servers: {get_param: [servers, {{role.name}}]}
|
|
|
|
{% if role.name == 'Controller' %}
|
|
ControllerPostPuppet:
|
|
depends_on:
|
|
- ControllerExtraConfigPost
|
|
type: OS::TripleO::Tasks::ControllerPostPuppet
|
|
properties:
|
|
servers: {get_param: [servers, Controller]}
|
|
input_values:
|
|
update_identifier: {get_param: DeployIdentifier}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|