tripleo-heat-templates/extraconfig/tasks/swift-ring-deploy.yaml
Christian Schwede af74df75c6 Automatically backup and restore Swift rings from the undercloud
Swift rings created or updated on the overcloud nodes will now be
stored on the undercloud at the end of the deployment.  An
additional consistency check is executed before storing them,
ensuring all rings within the cluster are identical.

These rings will be retrieved (before Puppet runs) by every node
when an UPDATE is executed, and by doing this will be in a
consistent state across the cluster.

This makes it possible to add, remove or replace nodes in an
existing cluster without manual operator interaction.

Closes-Bug: 1609421
Depends-On: Ic3da38cffdd993c768bdb137c17d625dff1aa372
Change-Id: I758179182265da5160c06bb95f4c6258dc0edcd6
(cherry picked from commit b323f8a160)
2017-02-18 09:47:23 +01:00

32 lines
768 B
YAML

heat_template_version: newton
parameters:
servers:
type: json
SwiftRingGetTempurl:
default: ''
description: A temporary Swift URL to download rings from.
type: string
resources:
SwiftRingDeployConfig:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: swift_ring_get_tempurl
config: |
#!/bin/sh
pushd /
curl --insecure --silent "${swift_ring_get_tempurl}" | tar xz || true
popd
SwiftRingDeploy:
type: OS::Heat::SoftwareDeployments
properties:
name: SwiftRingDeploy
config: {get_resource: SwiftRingDeployConfig}
servers: {get_param: servers}
input_values:
swift_ring_get_tempurl: {get_param: SwiftRingGetTempurl}