upgrade
Upgrade is an operation available from a specific state of a cluster or hostprovider that updates the object metadata without creating a new object and moves it to another state. The upgrade mechanism allows you to safely apply changes to the object’s current state.
The update operation is described in the new version of the bundle and defines which versions and editions of an object can be upgraded to the current bundle version.
There are two types of upgrades:
-
Switch the prototypes of the current bundle to the prototypes of a new one.
-
Perform some kind of action that may consist of several subactions (including switching the prototypes).
A cluster or host prototype may contain an upgrade property. This property describes how to perform an upgrade from one bundle version to another. A prototype can contain multiple upgrade properties, which describe updates from different versions.
---
- type: cluster
name: control
version: 2.4
description: "Monitoring and Control Software"
upgrade:
- name: Upgrade 1
versions:
min: 0.4
max: 2.0
description: New cool upgrade
states:
available: any
on_success: upgradable
- name: Upgrade 2
versions:
min: 1.0
max_strict: 3.0
scripts:
- name: pre check
display_name: Pre-check before upgrade prototypes
script_type: ansible
script: ansible/pre-check.yaml
- name: bundle upgrade
display_name: Upgrade bundle
script_type: internal
script: bundle_switch
- name: post tasks
display_name: Some operations after prototype upgrades
script_type: ansible
script: ansible/post-task.yaml
from_edition: community
states:
available:
- installed
on_success: upgradable
When using upgrade, provide the properties described below.
versions
The required property versions defines the range of versions appropriate for upgrade.
upgrade:
- name: Upgrade
versions:
min: 0.4
max: 2.0
states:
available: any
on_success: upgradable
|
NOTE
The min and max parameters use non-strict comparison (including the boundary values of the cluster or host versions). Use the min_strict or max_strict parameters for strict comparison (excluding the boundary values of the cluster or host versions).
|
display_name
The optional display_name property specifies the upgrade name displayed in the web interface.
states
The required states property defines the following states:
-
available— list of permissible states of the cluster or hostprovider for performing the upgrade. Use the special valueanyto make the upgrade available regardless of the cluster or hostprovider state. -
on_success— state of the cluster or hostprovider set after a successful upgrade. -
on_fail— state of the cluster or hostprovider set after a failed upgrade.
upgrade:
- name: Upgrade 1
versions:
min: 0.4
max: 2.0
description: New cool upgrade
states:
available: [created, installed]
on_success: upgradable
from_edition
The optional from_edition property specifies the object editions from which the bundle upgrade is allowed. The default value is community.
To enable upgrading from any object edition, specify the special value any.
upgrade:
- name: Upgrade 1
versions:
min: 0.4
max: 2.0
description: New cool upgrade
states:
available: [created, installed]
on_success: upgradable
from_edition:
- community
- enterprise