Move AllNodesDeployments into jinja template loop

These are identical for all roles, so move them into the per-role
loop

Partially-Implements: blueprint custom-roles
Change-Id: I0a9918d5a2e9a73fe3ac68a96bdee02e95799bc1
This commit is contained in:
Steven Hardy 2016-07-01 17:33:07 +01:00 committed by James Slagle
parent 0a9b02b60c
commit d914f9c5c1
1 changed files with 11 additions and 51 deletions

View File

@ -252,7 +252,7 @@ resources:
NetIpMap: {get_attr: [VipMap, net_ip_map]}
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
# Jinja loop for Role in role_data.yaml
# Jinja loop for Role in roles_data.yaml
{% for role in roles %}
# Resources generated for {{role.name}} Role
{{role.name}}ServiceChain:
@ -263,6 +263,16 @@ resources:
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
{{role.name}}AllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: {{role.name}}AllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [{{role.name}}, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [{{role.name}}, resource.0.ip_address]}
{% endfor %}
Controller:
@ -646,56 +656,6 @@ resources:
StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]}
# No tenant or management VIP required
ControllerAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: ControllerAllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [Controller, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [Controller, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [Controller, resource.0.ip_address]}
ComputeAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: ComputeAllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [Compute, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [Compute, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [Compute, resource.0.ip_address]}
BlockStorageAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: BlockStorageAllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [BlockStorage, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [BlockStorage, resource.0.ip_address]}
ObjectStorageAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: ObjectStorageAllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [ObjectStorage, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [ObjectStorage, resource.0.ip_address]}
CephStorageAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
name: CephStorageAllNodesDeployment
config: {get_attr: [allNodesConfig, config_id]}
servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
input_values:
bootstrap_nodeid: {get_attr: [CephStorage, resource.0.hostname]}
bootstrap_nodeid_ip: {get_attr: [CephStorage, resource.0.ip_address]}
# All Nodes Validations
AllNodesValidationConfig:
type: OS::TripleO::AllNodes::Validation