From 19ed1afb2af27536bfc7b491cfad8f653787e2d1 Mon Sep 17 00:00:00 2001 From: mandreou Date: Thu, 5 Apr 2018 14:48:30 +0300 Subject: [PATCH] Update environment files for Q upgrade and ffwd upgrade This consolidates the upgrade and ffwd-upgrade related env files, removing no longer relevant files (like converge vs converge-docker). In line with recent/ongoing work in tripleoclient [1][2] we now have cli: overcloud [upgrade|update|ffwd-upgrade] [prepare|run|converge] With this patch we can also change the set/unset of resource 'noop' and move it from tripleo-common to python-tripleoclient, like I am pointing at in related client review below. If others agree then I will do the same with the upgrade-prepare and also the ffwd cli in [3], i.e. add explicit inclusion of the upgrade-prepare.yaml and then similarly include the upgrade-converge.yaml for the upgrade/ffwd-upgrade converge cli. Related: I1288fe68ae8af02a5d77390d237ec467d88e43d2 python-tripleoclient [1] https://github.com/openstack/python-tripleoclient/commit/96ffa3a325544206b2fa542bf52bb76531f7d4d6 [2] https://review.openstack.org/#/c/558536/5/tripleoclient/v1/overcloud_update.py [3] https://review.openstack.org/#/c/557937/4/tripleoclient/v1/overcloud_ffwd_upgrade.py@72 Change-Id: Icfe494e3219d6d6cd3251f75bb4329fc4d793c3c --- environments/lifecycle/ffwd-upgrade-converge.yaml | 10 ++++++++++ .../ffwd-upgrade-prepare.yaml} | 14 ++++++++++---- environments/lifecycle/upgrade-converge.yaml | 9 +++++++++ .../upgrade-prepare.yaml} | 9 +++++---- environments/major-upgrade-composable-steps.yaml | 15 --------------- environments/major-upgrade-converge-docker.yaml | 12 ------------ environments/major-upgrade-converge.yaml | 11 ----------- 7 files changed, 34 insertions(+), 46 deletions(-) create mode 100644 environments/lifecycle/ffwd-upgrade-converge.yaml rename environments/{fast-forward-upgrade.yaml => lifecycle/ffwd-upgrade-prepare.yaml} (50%) create mode 100644 environments/lifecycle/upgrade-converge.yaml rename environments/{major-upgrade-composable-steps-docker.yaml => lifecycle/upgrade-prepare.yaml} (65%) delete mode 100644 environments/major-upgrade-composable-steps.yaml delete mode 100644 environments/major-upgrade-converge-docker.yaml delete mode 100644 environments/major-upgrade-converge.yaml diff --git a/environments/lifecycle/ffwd-upgrade-converge.yaml b/environments/lifecycle/ffwd-upgrade-converge.yaml new file mode 100644 index 0000000000..73f394c037 --- /dev/null +++ b/environments/lifecycle/ffwd-upgrade-converge.yaml @@ -0,0 +1,10 @@ +# Environment file used in the last step of a ffwd overcloud upgrade. +# This file is required by the tripleoclient and not expected to be updated +# by the operator. Please use additional -e env.yaml. +resource_registry: + OS::TripleO::SoftwareDeployment: OS::Heat::StructuredDeployment + OS::TripleO::DeploymentSteps: OS::Heat::StructuredDeploymentGroup + OS::Heat::SoftwareDeployment: OS::TripleO::Heat::SoftwareDeployment + OS::Heat::StructuredDeployment: OS::TripleO::Heat::StructuredDeployment +parameter_defaults: + StackUpdateType: '' diff --git a/environments/fast-forward-upgrade.yaml b/environments/lifecycle/ffwd-upgrade-prepare.yaml similarity index 50% rename from environments/fast-forward-upgrade.yaml rename to environments/lifecycle/ffwd-upgrade-prepare.yaml index ead3356396..7993dcab9f 100644 --- a/environments/fast-forward-upgrade.yaml +++ b/environments/lifecycle/ffwd-upgrade-prepare.yaml @@ -1,6 +1,6 @@ -# NOTE(lyarwood): Required as these services were deprecated in O and then -# removed in P but will still be present in the initial N Overcloud stack at -# the start of a fast-forward upgrade. +# Environment file used in the first step of a ffwd overcloud upgrade. +# This file is required by the tripleoclient and not expected to be updated +# by the operator. Please use additional -e env.yaml. resource_registry: OS::TripleO::Services::Core: OS::Heat::None OS::TripleO::Services::GlanceRegistry: OS::Heat::None @@ -13,6 +13,12 @@ resource_registry: OS::TripleO::Services::CephMds: OS::Heat::None OS::TripleO::Services::CephRbdMirror: OS::Heat::None OS::TripleO::Services::CephRgw: OS::Heat::None - + # Set the config-download environment for the stack update: + OS::TripleO::SoftwareDeployment: ../../config-download-structured.yaml + OS::Heat::SoftwareDeployment: ../../config-download-software.yaml + OS::Heat::StructuredDeployment: ../../config-download-structured.yaml + OS::TripleO::DeploymentSteps: OS::Heat::None + OS::TripleO::Ssh::KnownHostsDeployment: OS::Heat::None + OS::TripleO::Ssh::HostPubKey: OS::Heat::None parameter_defaults: StackUpdateType: FASTFORWARDUPGRADE diff --git a/environments/lifecycle/upgrade-converge.yaml b/environments/lifecycle/upgrade-converge.yaml new file mode 100644 index 0000000000..080ab06462 --- /dev/null +++ b/environments/lifecycle/upgrade-converge.yaml @@ -0,0 +1,9 @@ +# Environment file used in the last step of an overcloud upgrade. +# This file is required by the tripleoclient and not expected to be updated +# by the operator. Please use additional -e env.yaml. +resource_registry: + OS::TripleO::DeploymentSteps: OS::Heat::StructuredDeploymentGroup +parameter_defaults: + UpgradeLevelNovaCompute: '' + UpgradeInitCommonCommand: '' + UpgradeInitCommand: '' diff --git a/environments/major-upgrade-composable-steps-docker.yaml b/environments/lifecycle/upgrade-prepare.yaml similarity index 65% rename from environments/major-upgrade-composable-steps-docker.yaml rename to environments/lifecycle/upgrade-prepare.yaml index ea4c0c18a0..a3ea8c2c92 100644 --- a/environments/major-upgrade-composable-steps-docker.yaml +++ b/environments/lifecycle/upgrade-prepare.yaml @@ -1,17 +1,18 @@ +# Environment file used in the first step of an overcloud upgrade. +# This file is required by the tripleoclient and not expected to be updated +# by the operator. Please use additional -e env.yaml. resource_registry: OS::TripleO::DeploymentSteps: OS::Heat::None OS::TripleO::Tasks::*PreConfig: OS::Heat::None OS::TripleO::Tasks::*PostConfig: OS::Heat::None parameter_defaults: - EnableConfigPurge: false - StackUpdateType: UPGRADE UpgradeLevelNovaCompute: auto UpgradeInitCommonCommand: | #!/bin/bash set -eu - # Pike to Queens, put any needed host-level workarounds here + yum install -y python-heat-agent-* yum update -y ansible + yum install -y ansible-pacemaker # Remove the element os-net-config config.json https://bugs.launchpad.net/tripleo/+bug/1758161/ rm /usr/libexec/os-apply-config/templates/etc/os-net-config/config.json || true - MigrationSshPort: 22 UpgradeRemoveUnusedPackages: false diff --git a/environments/major-upgrade-composable-steps.yaml b/environments/major-upgrade-composable-steps.yaml deleted file mode 100644 index 1c4a01d325..0000000000 --- a/environments/major-upgrade-composable-steps.yaml +++ /dev/null @@ -1,15 +0,0 @@ -#DEPRECATED: This environment file was last used for upgrades to stable/pike. -parameter_defaults: - EnableConfigPurge: true - StackUpdateType: UPGRADE - UpgradeLevelNovaCompute: auto - UpgradeInitCommonCommand: | - #!/bin/bash - set -eu - yum install -y python-heat-agent-* - yum update -y ansible - yum install -y ansible-pacemaker - # Remove the element os-net-config config.json https://bugs.launchpad.net/tripleo/+bug/1758161/ - rm /usr/libexec/os-apply-config/templates/etc/os-net-config/config.json || true - MigrationSshPort: 22 - UpgradeRemoveUnusedPackages: false diff --git a/environments/major-upgrade-converge-docker.yaml b/environments/major-upgrade-converge-docker.yaml deleted file mode 100644 index 279783221c..0000000000 --- a/environments/major-upgrade-converge-docker.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Use this to reset any mappings only used for upgrades after the -# update of all nodes is completed -resource_registry: - OS::TripleO::PostDeploySteps: ../common/post.yaml -parameter_defaults: - EnableConfigPurge: false - StackUpdateType: '' - UpgradeLevelNovaCompute: '' - UpgradeInitCommonCommand: '' - UpgradeInitCommand: '' - MigrationSshPort: 2022 - CephAnsiblePlaybook: /usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml diff --git a/environments/major-upgrade-converge.yaml b/environments/major-upgrade-converge.yaml deleted file mode 100644 index c5010d0267..0000000000 --- a/environments/major-upgrade-converge.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Use this to reset any mappings only used for upgrades after the -# update of all nodes is completed -resource_registry: - OS::TripleO::PostDeploySteps: ../common/post.yaml -parameter_defaults: - EnableConfigPurge: false - StackUpdateType: '' - UpgradeLevelNovaCompute: '' - UpgradeInitCommonCommand: '' - UpgradeInitCommand: '' - MigrationSshPort: 2022 \ No newline at end of file