Add HostnameMap to allow granular control of hostnames
Some operators desire more granular control of hostnames than is currently possible via the *HostnameFormat parameters, in particular mapping nodes to explicit IDs (such as inventory references) is not easily possible. So, add a HostnameMap parameter, which is optional and allows explicit overriding of the default hostnames. E.g pass an environment like this: parameter_defaults: HostnameMap: overcloud-controller-0: overcloud-controller-prod-123-0 overcloud-controller-1: overcloud-controller-prod-456-0 overcloud-controller-2: overcloud-controller-prod-789-0 Note this is mapping is global (for all roles), because we expect the keys to be unique given that they include the role name and index by default. Note that this depends on a fix for heat bug #1539737 Change-Id: Ib4d3d40e9523903ebccc06c3e14b2d71d924afa3 Depends-On: Ib934f443a8b8e4f75335a9d8b992e7f86791aa45
This commit is contained in:
parent
b9e421ec6d
commit
3c1850b780
|
@ -47,6 +47,10 @@ parameters:
|
|||
Hostname:
|
||||
type: string
|
||||
default: '' # Defaults to Heat created hostname
|
||||
HostnameMap:
|
||||
type: json
|
||||
default: {}
|
||||
description: Optional mapping to override hostnames
|
||||
ExtraConfig:
|
||||
default: {}
|
||||
description: |
|
||||
|
@ -99,7 +103,10 @@ resources:
|
|||
- network: ctlplane
|
||||
user_data_format: SOFTWARE_CONFIG
|
||||
user_data: {get_resource: UserData}
|
||||
name: {get_param: Hostname}
|
||||
name:
|
||||
str_replace:
|
||||
template: {get_param: Hostname}
|
||||
params: {get_param: HostnameMap}
|
||||
software_config_transport: {get_param: SoftwareConfigTransport}
|
||||
metadata: {get_param: ServerMetadata}
|
||||
scheduler_hints: {get_param: SchedulerHints}
|
||||
|
|
|
@ -89,6 +89,10 @@ parameters:
|
|||
Hostname:
|
||||
type: string
|
||||
default: '' # Defaults to Heat created hostname
|
||||
HostnameMap:
|
||||
type: json
|
||||
default: {}
|
||||
description: Optional mapping to override hostnames
|
||||
ServiceNetMap:
|
||||
default: {}
|
||||
description: Mapping of service_name -> network name. Typically set
|
||||
|
@ -151,7 +155,10 @@ resources:
|
|||
- network: ctlplane
|
||||
user_data_format: SOFTWARE_CONFIG
|
||||
user_data: {get_resource: UserData}
|
||||
name: {get_param: Hostname}
|
||||
name:
|
||||
str_replace:
|
||||
template: {get_param: Hostname}
|
||||
params: {get_param: HostnameMap}
|
||||
software_config_transport: {get_param: SoftwareConfigTransport}
|
||||
metadata: {get_param: ServerMetadata}
|
||||
scheduler_hints: {get_param: SchedulerHints}
|
||||
|
|
|
@ -285,6 +285,10 @@ parameters:
|
|||
Hostname:
|
||||
type: string
|
||||
default: '' # Defaults to Heat created hostname
|
||||
HostnameMap:
|
||||
type: json
|
||||
default: {}
|
||||
description: Optional mapping to override hostnames
|
||||
NetworkDeploymentActions:
|
||||
type: comma_delimited_list
|
||||
description: >
|
||||
|
@ -329,7 +333,10 @@ resources:
|
|||
- network: ctlplane
|
||||
user_data_format: SOFTWARE_CONFIG
|
||||
user_data: {get_resource: UserData}
|
||||
name: {get_param: Hostname}
|
||||
name:
|
||||
str_replace:
|
||||
template: {get_param: Hostname}
|
||||
params: {get_param: HostnameMap}
|
||||
software_config_transport: {get_param: SoftwareConfigTransport}
|
||||
metadata: {get_param: ServerMetadata}
|
||||
scheduler_hints: {get_param: SchedulerHints}
|
||||
|
|
|
@ -682,6 +682,10 @@ parameters:
|
|||
Hostname:
|
||||
type: string
|
||||
default: '' # Defaults to Heat created hostname
|
||||
HostnameMap:
|
||||
type: json
|
||||
default: {}
|
||||
description: Optional mapping to override hostnames
|
||||
NetworkDeploymentActions:
|
||||
type: comma_delimited_list
|
||||
description: >
|
||||
|
@ -727,7 +731,10 @@ resources:
|
|||
- network: ctlplane
|
||||
user_data_format: SOFTWARE_CONFIG
|
||||
user_data: {get_resource: UserData}
|
||||
name: {get_param: Hostname}
|
||||
name:
|
||||
str_replace:
|
||||
template: {get_param: Hostname}
|
||||
params: {get_param: HostnameMap}
|
||||
software_config_transport: {get_param: SoftwareConfigTransport}
|
||||
metadata: {get_param: ServerMetadata}
|
||||
scheduler_hints: {get_param: SchedulerHints}
|
||||
|
|
|
@ -68,6 +68,10 @@ parameters:
|
|||
Hostname:
|
||||
type: string
|
||||
default: '' # Defaults to Heat created hostname
|
||||
HostnameMap:
|
||||
type: json
|
||||
default: {}
|
||||
description: Optional mapping to override hostnames
|
||||
ExtraConfig:
|
||||
default: {}
|
||||
description: |
|
||||
|
@ -120,7 +124,10 @@ resources:
|
|||
- network: ctlplane
|
||||
user_data_format: SOFTWARE_CONFIG
|
||||
user_data: {get_resource: UserData}
|
||||
name: {get_param: Hostname}
|
||||
name:
|
||||
str_replace:
|
||||
template: {get_param: Hostname}
|
||||
params: {get_param: HostnameMap}
|
||||
software_config_transport: {get_param: SoftwareConfigTransport}
|
||||
metadata: {get_param: ServerMetadata}
|
||||
scheduler_hints: {get_param: SchedulerHints}
|
||||
|
|
Loading…
Reference in New Issue