From b738e9ca7839772065f3db3ea29b057a7152eed5 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 8 Sep 2016 12:14:09 +0100 Subject: Convert AllNodesExtraConfig to support composable roles This adjusts the interface to OS::TripleO::AllNodesExtraConfig so it supports custom/composable/optional roles. Note this does break backwards compatibility, and I can't see any way to avoid that. I've converted the in-tree templates, and we'll have to document carefully and or provide a script (or automated conversion via mistral perhaps?) to allow folks to easily adjust any out of tree templates to the new format. Basically you just have to: 1. Remove all the *_servers parameters, replace with one "servers" json parameter 2. Replace references to e.g "controller_servers" with "servers, Controller" which does a path-based lookup into the json map provided by overcloud.yaml Change-Id: I5eebf853646b2f6300d6b542fcd4f43e82d3b413 Partially-Implements: blueprint custom-roles --- overcloud.j2.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'overcloud.j2.yaml') diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 5c0d9148..067f1517 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -442,17 +442,13 @@ resources: type: OS::TripleO::AllNodesExtraConfig depends_on: - UpdateWorkflow - - ComputeAllNodesValidationDeployment - - BlockStorageAllNodesValidationDeployment - - ObjectStorageAllNodesValidationDeployment - - CephStorageAllNodesValidationDeployment - - ControllerAllNodesValidationDeployment +{% for role in roles %} + - {{role.name}}AllNodesValidationDeployment +{% endfor %} properties: - controller_servers: {get_attr: [Controller, attributes, nova_server_resource]} - compute_servers: {get_attr: [Compute, attributes, nova_server_resource]} - blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]} - objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]} - cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]} +{% for role in roles %} + servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]} +{% endfor %} # Post deployment steps for all roles AllNodesDeploySteps: -- cgit 1.2.3-korg