Introduce update/upgrade workflow
Change-Id: I7226070aa87416e79f25625647f8e3076c9e2c9a
This commit is contained in:
parent
aa5d0120f2
commit
0dd10ffe4f
@ -1,3 +1,8 @@
|
||||
resource_registry:
|
||||
OS::TripleO::Tasks::ControllerPrePuppet: ../extraconfig/tasks/major_upgrade_pacemaker.yaml
|
||||
OS::TripleO::Tasks::ControllerPostPuppet: ../extraconfig/tasks/noop.yaml
|
||||
OS::TripleO::Tasks::UpdateWorkflow: ../extraconfig/tasks/major_upgrade_pacemaker.yaml
|
||||
OS::TripleO::Tasks::PackageUpdate: ../extraconfig/tasks/yum_update_noop.yaml
|
||||
OS::TripleO::ControllerPostDeployment: OS::Heat::None
|
||||
OS::TripleO::ComputePostDeployment: OS::Heat::None
|
||||
OS::TripleO::ObjectStoragePostDeployment: OS::Heat::None
|
||||
OS::TripleO::BlockStoragePostDeployment: OS::Heat::None
|
||||
OS::TripleO::CephStoragePostDeployment: OS::Heat::None
|
||||
|
@ -2,7 +2,15 @@ heat_template_version: 2014-10-16
|
||||
description: 'Upgrade for Pacemaker deployments'
|
||||
|
||||
parameters:
|
||||
servers:
|
||||
controller_servers:
|
||||
type: json
|
||||
compute_servers:
|
||||
type: json
|
||||
blockstorage_servers:
|
||||
type: json
|
||||
objectstorage_servers:
|
||||
type: json
|
||||
cephstorage_servers:
|
||||
type: json
|
||||
input_values:
|
||||
type: json
|
||||
@ -17,12 +25,12 @@ resources:
|
||||
list_join:
|
||||
- ''
|
||||
- - get_file: pacemaker_common_functions.sh
|
||||
- get_file: major_upgrade_pacemaker_1.sh
|
||||
- get_file: major_upgrade_controller_pacemaker_1.sh
|
||||
|
||||
ControllerPacemakerUpgradeDeployment_Step1:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
properties:
|
||||
servers: {get_param: servers}
|
||||
servers: {get_param: controller_servers}
|
||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step1}
|
||||
input_values: {get_param: input_values}
|
||||
|
||||
@ -34,12 +42,12 @@ resources:
|
||||
list_join:
|
||||
- ''
|
||||
- - get_file: pacemaker_common_functions.sh
|
||||
- get_file: major_upgrade_pacemaker_2.sh
|
||||
- get_file: major_upgrade_controller_pacemaker_2.sh
|
||||
|
||||
ControllerPacemakerUpgrade2Deployment_Step2:
|
||||
ControllerPacemakerUpgradeDeployment_Step2:
|
||||
type: OS::Heat::SoftwareDeploymentGroup
|
||||
depends_on: ControllerPacemakerUpgradeDeployment_Step1
|
||||
properties:
|
||||
servers: {get_param: servers}
|
||||
servers: {get_param: controller_servers}
|
||||
config: {get_resource: ControllerPacemakerUpgradeConfig_Step2}
|
||||
input_values: {get_param: input_values}
|
||||
|
@ -4,6 +4,22 @@ description: 'No-op task'
|
||||
parameters:
|
||||
servers:
|
||||
type: json
|
||||
default: []
|
||||
controller_servers:
|
||||
type: json
|
||||
default: []
|
||||
compute_servers:
|
||||
type: json
|
||||
default: []
|
||||
blockstorage_servers:
|
||||
type: json
|
||||
default: []
|
||||
objectstorage_servers:
|
||||
type: json
|
||||
default: []
|
||||
cephstorage_servers:
|
||||
type: json
|
||||
default: []
|
||||
input_values:
|
||||
type: json
|
||||
default: {}
|
||||
|
29
extraconfig/tasks/yum_update_noop.yaml
Normal file
29
extraconfig/tasks/yum_update_noop.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
heat_template_version: 2014-10-16
|
||||
description: 'No-op yum update task'
|
||||
|
||||
resources:
|
||||
|
||||
config:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
group: script
|
||||
config: |
|
||||
#!/bin/bash
|
||||
echo -n "false" > $heat_outputs_path.update_managed_packages
|
||||
inputs:
|
||||
- name: update_identifier
|
||||
description: yum will only run for previously unused values of update_identifier
|
||||
default: ''
|
||||
- name: command
|
||||
description: yum sub-command to run, defaults to "update"
|
||||
default: update
|
||||
- name: command_arguments
|
||||
description: yum command arguments, defaults to ""
|
||||
default: ''
|
||||
outputs:
|
||||
- name: update_managed_packages
|
||||
description: boolean value indicating whether to upgrade managed packages
|
||||
|
||||
outputs:
|
||||
OS::stack_id:
|
||||
value: {get_resource: config}
|
@ -23,6 +23,7 @@ resource_registry:
|
||||
OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
|
||||
|
||||
# Tasks (for internal TripleO usage)
|
||||
OS::TripleO::Tasks::UpdateWorkflow: extraconfig/tasks/noop.yaml
|
||||
OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml
|
||||
OS::TripleO::Tasks::ControllerPrePuppet: extraconfig/tasks/noop.yaml
|
||||
OS::TripleO::Tasks::ControllerPostPuppet: extraconfig/tasks/noop.yaml
|
||||
|
@ -1522,10 +1522,23 @@ resources:
|
||||
config: {get_resource: AllNodesValidationConfig}
|
||||
servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
|
||||
|
||||
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]}
|
||||
input_values:
|
||||
deploy_identifier: {get_param: DeployIdentifier}
|
||||
update_identifier: {get_param: UpdateIdentifier}
|
||||
|
||||
# Optional ExtraConfig for all nodes - all roles are passed in here, but
|
||||
# the nested template may configure each role differently (or not at all)
|
||||
AllNodesExtraConfig:
|
||||
type: OS::TripleO::AllNodesExtraConfig
|
||||
depends_on: UpdateWorkflow
|
||||
properties:
|
||||
controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
|
||||
compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
|
||||
|
Loading…
Reference in New Issue
Block a user