Add DeploymentSwiftDataMap parameter

The DeploymentSwiftDataMap parameter is used to set the
deployment_swift_data property on the Server resoures. The parameter is
a map of role names and node indexes to Swift container and object names
to be used for storing deployment data.

The parameter allows for using predefined Swift objects for storing
deployment data instead of container/object names with generated uuid's
from Heat.

implements blueprint split-stack-default
Depends-On: Ia07e9374a4b95bd0e74fc47fb9df4bf6ad096715

Change-Id: I471037de35e7f349d900462ec3ffb16fe2d6ebd9
This commit is contained in:
James Slagle 2017-04-24 12:10:23 -04:00
parent c8a266d99e
commit c47ca9c3a1
8 changed files with 191 additions and 1 deletions

View File

@ -44,6 +44,9 @@ parameters:
Command or script snippet to run on all overcloud nodes to
initialize the upgrade process. E.g. a repository switch.
default: ''
deployment_swift_data:
type: json
default: {}
resources:
deployed-server:
@ -51,6 +54,7 @@ resources:
properties:
name: {get_param: name}
software_config_transport: {get_param: software_config_transport}
deployment_swift_data: {get_param: deployment_swift_data}
UpgradeInitConfig:
type: OS::Heat::SoftwareConfig

View File

@ -142,6 +142,24 @@ parameters:
RoleParameters:
type: json
description: Role Specific Parameters
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
conditions:
@ -150,6 +168,12 @@ conditions:
equals:
- {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
- 1
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
resources:
BlockStorage:
@ -178,6 +202,12 @@ resources:
- {get_param: BlockStorageServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: BlockStorageSchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -148,6 +148,24 @@ parameters:
RoleParameters:
type: json
description: Role Specific Parameters
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
conditions:
@ -156,6 +174,12 @@ conditions:
equals:
- {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
- 1
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
resources:
CephStorage:
@ -184,6 +208,12 @@ resources:
- {get_param: CephStorageServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: CephStorageSchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -160,9 +160,33 @@ parameters:
RoleParameters:
type: json
description: Role Specific Parameters
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
conditions:
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
server_not_blacklisted:
not:
equals:
@ -198,6 +222,12 @@ resources:
- {get_param: NovaComputeServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: NovaComputeSchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -174,6 +174,24 @@ parameters:
RoleParameters:
type: json
description: Role Specific Parameters
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
parameter_groups:
@ -188,7 +206,12 @@ conditions:
equals:
- {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
- 1
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
resources:
@ -218,6 +241,12 @@ resources:
- {get_param: ControllerServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: ControllerSchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -143,6 +143,25 @@ parameters:
type: json
description: Role Specific Parameters
default: {}
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
conditions:
server_not_blacklisted:
@ -150,6 +169,12 @@ conditions:
equals:
- {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
- 1
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
resources:
@ -178,6 +203,12 @@ resources:
- {get_param: SwiftStorageServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: ObjectStorageSchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -164,6 +164,24 @@ parameters:
RoleParameters:
type: json
description: Role Specific Parameters
DeploymentSwiftDataMap:
type: json
description: |
Map of servers to Swift container and object for storing deployment data.
The keys are the Heat assigned hostnames, and the value is a map of the
container/object name in Swift. Example value:
overcloud-controller-0:
container: overcloud-controller
object: 0
overcloud-controller-1:
container: overcloud-controller
object: 1
overcloud-controller-2:
container: overcloud-controller
object: 2
overcloud-novacompute-0:
container: overcloud-compute
object: 0
default: {}
conditions:
@ -172,6 +190,12 @@ conditions:
equals:
- {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
- 1
deployment_swift_data_map_unset:
equals:
- get_param:
- DeploymentSwiftDataMap
- {get_param: Hostname}
- ""
resources:
{{role}}:
@ -200,6 +224,12 @@ resources:
- {get_param: {{role}}ServerMetadata}
- {get_param: ServiceMetadataSettings}
scheduler_hints: {get_param: {{role}}SchedulerHints}
deployment_swift_data:
if:
- deployment_swift_data_map_unset
- {}
- {get_param: [DeploymentSwiftDataMap,
{get_param: Hostname}]}
# Combine the NodeAdminUserData and NodeUserData mime archives
UserData:

View File

@ -0,0 +1,6 @@
---
features:
- Added new DeploymentSwiftDataMap parameter, which is used to set the
deployment_swift_data property on the Server resoures. The parameter is a
map where the keys are the Heat assigned hostnames, and the value is a map
of the container/object name in Swift.