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'
|
description: 'Upgrade for Pacemaker deployments'
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
controller_servers:
|
servers:
|
||||||
type: json
|
|
||||||
compute_servers:
|
|
||||||
type: json
|
|
||||||
blockstorage_servers:
|
|
||||||
type: json
|
|
||||||
objectstorage_servers:
|
|
||||||
type: json
|
|
||||||
cephstorage_servers:
|
|
||||||
type: json
|
type: json
|
||||||
input_values:
|
input_values:
|
||||||
type: json
|
type: json
|
||||||
@ -54,7 +46,7 @@ resources:
|
|||||||
CephMonUpgradeDeployment:
|
CephMonUpgradeDeployment:
|
||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: controller_servers}
|
servers: {get_param: servers, Controller}
|
||||||
config: {get_resource: CephMonUpgradeConfig}
|
config: {get_resource: CephMonUpgradeConfig}
|
||||||
input_values: {get_param: input_values}
|
input_values: {get_param: input_values}
|
||||||
batch_create:
|
batch_create:
|
||||||
@ -89,7 +81,7 @@ resources:
|
|||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
depends_on: CephMonUpgradeDeployment
|
depends_on: CephMonUpgradeDeployment
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: controller_servers}
|
servers: {get_param: servers, Controller}
|
||||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step1}
|
config: {get_resource: ControllerPacemakerUpgradeConfig_Step1}
|
||||||
input_values: {get_param: input_values}
|
input_values: {get_param: input_values}
|
||||||
|
|
||||||
@ -103,7 +95,7 @@ resources:
|
|||||||
BlockStorageUpgradeDeployment:
|
BlockStorageUpgradeDeployment:
|
||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: blockstorage_servers}
|
servers: {get_param: servers, BlockStorage}
|
||||||
config: {get_resource: BlockStorageUpgradeConfig}
|
config: {get_resource: BlockStorageUpgradeConfig}
|
||||||
input_values: {get_param: input_values}
|
input_values: {get_param: input_values}
|
||||||
|
|
||||||
@ -122,7 +114,7 @@ resources:
|
|||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
depends_on: BlockStorageUpgradeDeployment
|
depends_on: BlockStorageUpgradeDeployment
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: controller_servers}
|
servers: {get_param: servers, Controller}
|
||||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
|
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
|
||||||
input_values: {get_param: input_values}
|
input_values: {get_param: input_values}
|
||||||
|
|
||||||
|
@ -3,15 +3,7 @@ description: 'Upgrade for Pacemaker deployments'
|
|||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
|
|
||||||
controller_servers:
|
servers:
|
||||||
type: json
|
|
||||||
compute_servers:
|
|
||||||
type: json
|
|
||||||
blockstorage_servers:
|
|
||||||
type: json
|
|
||||||
objectstorage_servers:
|
|
||||||
type: json
|
|
||||||
cephstorage_servers:
|
|
||||||
type: json
|
type: json
|
||||||
input_values:
|
input_values:
|
||||||
type: json
|
type: json
|
||||||
@ -43,45 +35,12 @@ resources:
|
|||||||
- "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
|
- "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
|
||||||
- get_param: UpgradeInitCommand
|
- 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
|
# TODO(jistr): for Mitaka->Newton upgrades and further we can use
|
||||||
# map_merge with input_values instead of feeding params into scripts
|
# map_merge with input_values instead of feeding params into scripts
|
||||||
# via str_replace on bash snippets
|
# 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:
|
ComputeDeliverUpgradeScriptConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
properties:
|
properties:
|
||||||
@ -97,35 +56,32 @@ resources:
|
|||||||
UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute}
|
UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute}
|
||||||
- get_file: major_upgrade_compute.sh
|
- 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:
|
ObjectStorageDeliverUpgradeScriptConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
properties:
|
properties:
|
||||||
group: script
|
group: script
|
||||||
config: {get_file: major_upgrade_object_storage.sh}
|
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:
|
CephStorageDeliverUpgradeScriptConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
properties:
|
properties:
|
||||||
group: script
|
group: script
|
||||||
config: {get_file: major_upgrade_ceph_storage.sh}
|
config: {get_file: major_upgrade_ceph_storage.sh}
|
||||||
|
|
||||||
CephStorageDeliverUpgradeScriptDeployment:
|
{% for role in roles %}
|
||||||
|
UpgradeInit{{role.name}}Deployment:
|
||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: cephstorage_servers}
|
servers: {get_param: [servers, {{role.name}}]}
|
||||||
config: {get_resource: CephStorageDeliverUpgradeScriptConfig}
|
config: {get_resource: UpgradeInitConfig}
|
||||||
input_values: {get_param: input_values}
|
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
|
Software-config for performing aodh data migration
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
controller_servers:
|
servers:
|
||||||
type: json
|
|
||||||
compute_servers:
|
|
||||||
type: json
|
|
||||||
blockstorage_servers:
|
|
||||||
type: json
|
|
||||||
objectstorage_servers:
|
|
||||||
type: json
|
|
||||||
cephstorage_servers:
|
|
||||||
type: json
|
type: json
|
||||||
input_values:
|
input_values:
|
||||||
type: json
|
type: json
|
||||||
@ -28,6 +20,6 @@ resources:
|
|||||||
AodhMysqlMigrationScriptDeployment:
|
AodhMysqlMigrationScriptDeployment:
|
||||||
type: OS::Heat::SoftwareDeploymentGroup
|
type: OS::Heat::SoftwareDeploymentGroup
|
||||||
properties:
|
properties:
|
||||||
servers: {get_param: controller_servers}
|
servers: {get_param: servers, Controller}
|
||||||
config: {get_resource: AodhMysqlMigrationScriptConfig}
|
config: {get_resource: AodhMysqlMigrationScriptConfig}
|
||||||
input_values: {get_param: input_values}
|
input_values: {get_param: input_values}
|
||||||
|
@ -428,11 +428,10 @@ resources:
|
|||||||
UpdateWorkflow:
|
UpdateWorkflow:
|
||||||
type: OS::TripleO::Tasks::UpdateWorkflow
|
type: OS::TripleO::Tasks::UpdateWorkflow
|
||||||
properties:
|
properties:
|
||||||
controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
|
servers:
|
||||||
compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
|
{% for role in roles %}
|
||||||
blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
|
{{role.name}}: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
|
||||||
objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
|
{% endfor %}
|
||||||
cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
|
|
||||||
input_values:
|
input_values:
|
||||||
deploy_identifier: {get_param: DeployIdentifier}
|
deploy_identifier: {get_param: DeployIdentifier}
|
||||||
update_identifier: {get_param: UpdateIdentifier}
|
update_identifier: {get_param: UpdateIdentifier}
|
||||||
|
Loading…
Reference in New Issue
Block a user