Convert UpdateWorkflow to support composable roles
We need to remove the hard-coded roles from overcloud.j2.yaml as now it's valid to e.g remove BlockStorage completely. The previous behavior for the per-role upgrade scripts is maintained but we'll need to rework this for newton->ocata upgrades where we can no longer be sure the servers mapping will contain all roles. Change-Id: I25e6c84757e3c00fba2aae834cd8206c62e44acf Partially-Implements: blueprint custom-roles
This commit is contained in:
parent
da283a785b
commit
3a8d20a63d
@ -2,15 +2,7 @@ heat_template_version: 2014-10-16
|
||||
description: 'Upgrade for Pacemaker deployments'
|
||||
|
||||
parameters:
|
||||
controller_servers:
|
||||
type: json
|
||||
compute_servers:
|
||||
type: json
|
||||
blockstorage_servers:
|
||||
type: json
|
||||
objectstorage_servers:
|
||||
type: json
|
||||
cephstorage_servers:
|
||||
servers:
|
||||
type: json
|
||||
input_values:
|
||||
type: json
|
||||
@ -54,7 +46,7 @@ resources:
|
||||
CephMonUpgradeDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: controller_servers}
|
||||
servers: {get_param: servers, Controller}
|
||||
config: {get_resource: CephMonUpgradeConfig}
|
||||
input_values: {get_param: input_values}
|
||||
batch_create:
|
||||
@ -89,7 +81,7 @@ resources:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
depends_on: CephMonUpgradeDeployment
|
||||
properties:
|
||||
servers: {get_param: controller_servers}
|
||||
servers: {get_param: servers, Controller}
|
||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step1}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
@ -103,7 +95,7 @@ resources:
|
||||
BlockStorageUpgradeDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: blockstorage_servers}
|
||||
servers: {get_param: servers, BlockStorage}
|
||||
config: {get_resource: BlockStorageUpgradeConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
@ -122,7 +114,7 @@ resources:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
depends_on: BlockStorageUpgradeDeployment
|
||||
properties:
|
||||
servers: {get_param: controller_servers}
|
||||
servers: {get_param: servers, Controller}
|
||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
|
@ -3,15 +3,7 @@ description: 'Upgrade for Pacemaker deployments'
|
||||
|
||||
parameters:
|
||||
|
||||
controller_servers:
|
||||
type: json
|
||||
compute_servers:
|
||||
type: json
|
||||
blockstorage_servers:
|
||||
type: json
|
||||
objectstorage_servers:
|
||||
type: json
|
||||
cephstorage_servers:
|
||||
servers:
|
||||
type: json
|
||||
input_values:
|
||||
type: json
|
||||
@ -43,45 +35,12 @@ resources:
|
||||
- "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
|
||||
- get_param: UpgradeInitCommand
|
||||
|
||||
UpgradeInitControllerDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: controller_servers}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
UpgradeInitComputeDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: compute_servers}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
UpgradeInitBlockStorageDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: blockstorage_servers}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
UpgradeInitObjectStorageDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: objectstorage_servers}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
UpgradeInitCephStorageDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: cephstorage_servers}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
# TODO(jistr): for Mitaka->Newton upgrades and further we can use
|
||||
# map_merge with input_values instead of feeding params into scripts
|
||||
# via str_replace on bash snippets
|
||||
|
||||
# FIXME(shardy) we have hard-coded per-role *ScriptConfig's here
|
||||
# Would be better to have a common config for all roles
|
||||
ComputeDeliverUpgradeScriptConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
@ -97,35 +56,32 @@ resources:
|
||||
UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute}
|
||||
- get_file: major_upgrade_compute.sh
|
||||
|
||||
ComputeDeliverUpgradeScriptDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: compute_servers}
|
||||
config: {get_resource: ComputeDeliverUpgradeScriptConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
ObjectStorageDeliverUpgradeScriptConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
group: script
|
||||
config: {get_file: major_upgrade_object_storage.sh}
|
||||
|
||||
ObjectStorageDeliverUpgradeScriptDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: objectstorage_servers}
|
||||
config: {get_resource: ObjectStorageDeliverUpgradeScriptConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
CephStorageDeliverUpgradeScriptConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
group: script
|
||||
config: {get_file: major_upgrade_ceph_storage.sh}
|
||||
|
||||
CephStorageDeliverUpgradeScriptDeployment:
|
||||
{% for role in roles %}
|
||||
UpgradeInit{{role.name}}Deployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: cephstorage_servers}
|
||||
config: {get_resource: CephStorageDeliverUpgradeScriptConfig}
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: UpgradeInitConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
{% if not role.name in ['Controller', 'BlockStorage'] %}
|
||||
{{role.name}}DeliverUpgradeScriptDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: [servers, {{role.name}}]}
|
||||
config: {get_resource: {{role.name}}DeliverUpgradeScriptConfig}
|
||||
input_values: {get_param: input_values}
|
||||
{% endif %}
|
||||
{% endfor %}
|
@ -4,15 +4,7 @@ description: >
|
||||
Software-config for performing aodh data migration
|
||||
|
||||
parameters:
|
||||
controller_servers:
|
||||
type: json
|
||||
compute_servers:
|
||||
type: json
|
||||
blockstorage_servers:
|
||||
type: json
|
||||
objectstorage_servers:
|
||||
type: json
|
||||
cephstorage_servers:
|
||||
servers:
|
||||
type: json
|
||||
input_values:
|
||||
type: json
|
||||
@ -28,6 +20,6 @@ resources:
|
||||
AodhMysqlMigrationScriptDeployment:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: controller_servers}
|
||||
servers: {get_param: servers, Controller}
|
||||
config: {get_resource: AodhMysqlMigrationScriptConfig}
|
||||
input_values: {get_param: input_values}
|
||||
|
@ -428,11 +428,10 @@ resources:
|
||||
UpdateWorkflow:
|
||||
type: OS::TripleO::Tasks::UpdateWorkflow
|
||||
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]}
|
||||
servers:
|
||||
{% for role in roles %}
|
||||
{{role.name}}: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
|
||||
{% endfor %}
|
||||
input_values:
|
||||
deploy_identifier: {get_param: DeployIdentifier}
|
||||
update_identifier: {get_param: UpdateIdentifier}
|
||||
|
Loading…
Reference in New Issue
Block a user