fuel-plugin-lma-collector/deployment_tasks.yaml

219 lines
6.2 KiB
YAML

# Groups definitions
# ##################
- id: primary-controller
type: group
version: 2.0.0
role: [primary-controller]
tasks:
- lma-hiera-override
- install-ocf-script
requires: [deploy_start]
required_for: [deploy_end]
parameters:
strategy:
type: one_by_one
- id: controller
type: group
version: 2.0.0
role: [controller]
tasks:
- lma-hiera-override
- install-ocf-script
requires: [primary-controller]
required_for: [deploy_end]
parameters:
strategy:
type: parallel
# Tasks definitions for the deployment
# ####################################
- id: lma-hiera-override
type: puppet
version: 2.0.0
requires: [globals]
required_for: [logging]
parameters:
puppet_manifest: puppet/manifests/hiera_override.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
# The OCF script should exist before any nodes try to configure the
# collector services with Pacemaker.
- id: install-ocf-script
type: puppet
version: 2.0.0
requires: [fuel_pkgs, lma-hiera-override]
required_for: [cluster]
parameters:
puppet_manifest: puppet/manifests/install_ocf_script.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
# Tasks definitions for the post-deployment
# #########################################
# The Hiera data needs to be populated first so that other plugins (eg LMA
# Infrastructure Alerting) can use it. In the deployment phase, the hiera is
# executed only for controllers. We need to execute it for each role. It will
# be executed twice for controllers.
- id: lma-hiera-override-for-all
type: puppet
version: 2.0.0
requires: [post_deployment_start]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/hiera_override.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-configure-apt
type: puppet
version: 2.0.0
# We use upload_nodes_info as an anchor to order the post-deployment tasks executed
# by this plugin and the InfluxDB & Elasticsearch plugins. The dependency chain is:
# Other plugins tasks -> upload_nodes_info -> (LMA collector tasks)
requires: [post_deployment_start, upload_nodes_info, lma-hiera-override-for-all]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/configure_apt.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-base
type: puppet
version: 2.0.0
requires: [lma-configure-apt]
required_for: [post_deployment_end]
role: '*'
# lma-configure-apt ships the OCF script so the task should wait for the
# script to be available on all the necessary nodes otherwise Pacemaker may
# fail to start the resource and keep it in failed state forever.
# See https://bugs.launchpad.net/lma-toolchain/+bug/1593137 for details
cross-depends:
- name: lma-configure-apt
role: /.*/
parameters:
puppet_manifest: puppet/manifests/base.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-collectd
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/collectd.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
# All tasks lma-main-* must be executed before lma-aggregator. So we don't
# need to add a requirement to post_deployment_end because it is implied
# by the one to lma-aggregator.
- id: lma-main-controller
type: puppet
version: 2.0.0
requires: [lma-base, lma-collectd]
required_for: [lma-aggregator]
role: [controller, primary-controller]
parameters:
puppet_manifest: puppet/manifests/controller.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-main-compute
type: puppet
version: 2.0.0
requires: [lma-base, lma-collectd]
required_for: [lma-aggregator]
role: [compute]
parameters:
puppet_manifest: puppet/manifests/compute.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-main-cinder
type: puppet
version: 2.0.0
requires: [lma-base, lma-collectd]
required_for: [lma-aggregator]
role: [cinder]
parameters:
puppet_manifest: puppet/manifests/cinder.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-aggregator
type: puppet
version: 2.0.0
requires: [lma-base, lma-collectd]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/aggregator.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-configure-afd-filters
type: puppet
version: 2.0.0
requires: [lma-aggregator]
# Required for post_deployment_end is induced by lma-cleanup-apt-config
required_for: [lma-cleanup-apt-config]
role: '*'
# The AFD filters shouldn't send data before the aggregator service is
# configured on all the controllers, hence the cross-depends parameter that
# is required when running in a task-based deployment mode.
cross-depends:
- name: lma-aggregator
role: [primary-controller, controller]
parameters:
puppet_manifest: puppet/manifests/configure_afd_filters.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
# This task must be executed at the very end of the deployment.
- id: lma-cleanup-apt-config
type: puppet
version: 2.0.0
# We use update_hosts as an anchor to order the post-deployment tasks
# executed by the LMA infrastructure plugin. The dependency chain is:
# LMA collector tasks -> update_hosts -> (LMA Infrastructure Alerting tasks)
required_for: [post_deployment_end, update_hosts]
role: '*'
parameters:
puppet_manifest: puppet/manifests/cleanup_apt_config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes