diff options
author | Jiri Stransky <jistr@redhat.com> | 2016-01-21 13:11:23 +0100 |
---|---|---|
committer | Jiri Stransky <jistr@redhat.com> | 2016-02-23 16:28:43 +0100 |
commit | 0dd10ffe4fcd9b191eaceabcd7bb124a4db10b06 (patch) | |
tree | 8375a7efbc4879b4f289b8ef3f2b8794aa5d9742 | |
parent | aa5d0120f2ec3965f58ad6b8deec342853e840d7 (diff) |
Introduce update/upgrade workflow
Change-Id: I7226070aa87416e79f25625647f8e3076c9e2c9a
-rw-r--r-- | environments/major-upgrade-pacemaker.yaml | 9 | ||||
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh (renamed from extraconfig/tasks/major_upgrade_pacemaker_1.sh) | 0 | ||||
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh (renamed from extraconfig/tasks/major_upgrade_pacemaker_2.sh) | 0 | ||||
-rw-r--r-- | extraconfig/tasks/major_upgrade_pacemaker.yaml | 20 | ||||
-rw-r--r-- | extraconfig/tasks/noop.yaml | 16 | ||||
-rw-r--r-- | extraconfig/tasks/yum_update_noop.yaml | 29 | ||||
-rw-r--r-- | overcloud-resource-registry-puppet.yaml | 1 | ||||
-rw-r--r-- | overcloud.yaml | 13 |
8 files changed, 80 insertions, 8 deletions
diff --git a/environments/major-upgrade-pacemaker.yaml b/environments/major-upgrade-pacemaker.yaml index db078404..e3bbfcce 100644 --- a/environments/major-upgrade-pacemaker.yaml +++ b/environments/major-upgrade-pacemaker.yaml @@ -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 diff --git a/extraconfig/tasks/major_upgrade_pacemaker_1.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh index bee9a939..bee9a939 100755 --- a/extraconfig/tasks/major_upgrade_pacemaker_1.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh diff --git a/extraconfig/tasks/major_upgrade_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh index 0b92a3bb..0b92a3bb 100755 --- a/extraconfig/tasks/major_upgrade_pacemaker_2.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh diff --git a/extraconfig/tasks/major_upgrade_pacemaker.yaml b/extraconfig/tasks/major_upgrade_pacemaker.yaml index 58d7b6d8..12268b0e 100644 --- a/extraconfig/tasks/major_upgrade_pacemaker.yaml +++ b/extraconfig/tasks/major_upgrade_pacemaker.yaml @@ -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} diff --git a/extraconfig/tasks/noop.yaml b/extraconfig/tasks/noop.yaml index 0cff7469..dbb863be 100644 --- a/extraconfig/tasks/noop.yaml +++ b/extraconfig/tasks/noop.yaml @@ -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: {} diff --git a/extraconfig/tasks/yum_update_noop.yaml b/extraconfig/tasks/yum_update_noop.yaml new file mode 100644 index 00000000..b759d9c5 --- /dev/null +++ b/extraconfig/tasks/yum_update_noop.yaml @@ -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} diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 7288aba8..b1a5816e 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -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 diff --git a/overcloud.yaml b/overcloud.yaml index 9b95484e..0499fa67 100644 --- a/overcloud.yaml +++ b/overcloud.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]} |