Merge "Add tags to roles"
This commit is contained in:
commit
05440b0007
|
@ -1,7 +1,14 @@
|
||||||
# certain initialization steps (run in a container) will occur
|
# certain initialization steps (run in a container) will occur
|
||||||
# on the first role listed in the roles file
|
# on the role marked as primary controller or the first role listed
|
||||||
{% set primary_role_name = roles[0].name -%}
|
{%- set primary_role = [roles[0]] -%}
|
||||||
|
{%- for role in roles -%}
|
||||||
|
{%- if 'primary' in role.tags and 'controller' in role.tags -%}
|
||||||
|
{%- set _ = primary_role.pop() -%}
|
||||||
|
{%- set _ = primary_role.append(role) -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set primary_role_name = primary_role[0].name -%}
|
||||||
|
# primary role is: {{primary_role_name}}
|
||||||
heat_template_version: ocata
|
heat_template_version: ocata
|
||||||
|
|
||||||
description: >
|
description: >
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
{% set primary_role_name = roles[0].name -%}
|
{%- set primary_role = [roles[0]] -%}
|
||||||
|
{%- for role in roles -%}
|
||||||
|
{%- if 'primary' in role.tags and 'controller' in role.tags -%}
|
||||||
|
{%- set _ = primary_role.pop() -%}
|
||||||
|
{%- set _ = primary_role.append(role) -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set primary_role_name = primary_role[0].name -%}
|
||||||
|
# primary role is: {{primary_role_name}}
|
||||||
heat_template_version: ocata
|
heat_template_version: ocata
|
||||||
|
|
||||||
description: >
|
description: >
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds tags to roles that allow an operator to specify custom tags to use
|
||||||
|
when trying to find functionality available from a role. Currently a role
|
||||||
|
with both the 'primary' and 'controller' tag is consider to be the primary
|
||||||
|
role. Historically the role named 'Controller' was the 'primary' role and
|
||||||
|
this primary designation is used to determine items like memcache ip
|
||||||
|
addresses. If no roles have the both the 'primary' and 'controller' tags,
|
||||||
|
the first role specified in the roles_data.yaml is used as the primary
|
||||||
|
role.
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
If using custom roles data, the logic was changed to leverage the first
|
||||||
|
role listed in the roles_data.yaml file to be the primary role. This can
|
||||||
|
be worked around by adding the 'primary' and 'controller' tags to the
|
||||||
|
custom controller role in your roles_data.yaml to ensure that the defined
|
||||||
|
custom controller role is still considered the primary role.
|
|
@ -28,9 +28,18 @@
|
||||||
# ServicesDefault: (list) optional default list of services to be deployed
|
# ServicesDefault: (list) optional default list of services to be deployed
|
||||||
# on the role, defaults to an empty list. Sets the default for the
|
# on the role, defaults to an empty list. Sets the default for the
|
||||||
# {{role.name}}Services parameter in overcloud.yaml
|
# {{role.name}}Services parameter in overcloud.yaml
|
||||||
|
#
|
||||||
- name: Controller # the 'primary' role goes first
|
# tags: (list) list of tags used by other parts of the deployment process to
|
||||||
|
# find the role for a specific type of functionality. Currently a role
|
||||||
|
# with both 'primary' and 'controller' is used as the primary role for the
|
||||||
|
# deployment process. If no roles have have 'primary' and 'controller', the
|
||||||
|
# first role in this file is used as the primary role.
|
||||||
|
#
|
||||||
|
- name: Controller
|
||||||
CountDefault: 1
|
CountDefault: 1
|
||||||
|
tags:
|
||||||
|
- primary
|
||||||
|
- controller
|
||||||
ServicesDefault:
|
ServicesDefault:
|
||||||
- OS::TripleO::Services::CACerts
|
- OS::TripleO::Services::CACerts
|
||||||
- OS::TripleO::Services::CertmongerUser
|
- OS::TripleO::Services::CertmongerUser
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
- name: Undercloud # the 'primary' role goes first
|
- name: Undercloud
|
||||||
CountDefault: 1
|
CountDefault: 1
|
||||||
disable_constraints: True
|
disable_constraints: True
|
||||||
|
tags:
|
||||||
|
- primary
|
||||||
|
- controller
|
||||||
ServicesDefault:
|
ServicesDefault:
|
||||||
- OS::TripleO::Services::Ntp
|
- OS::TripleO::Services::Ntp
|
||||||
- OS::TripleO::Services::MySQL
|
- OS::TripleO::Services::MySQL
|
||||||
|
|
Loading…
Reference in New Issue