fuel-plugin-lma-infrastruct.../deployment_tasks.yaml
Guillaume Thouvenin aa00dd2a95 Fix a cycle in graph of tasks
This patch removes a dependency that causes a cycle in the graph of
tasks in MOS 8. The cycle was <custom>-netconfig -> hosts -> cluster ->
virtual_ips -> <custom>-netconfig.

We cannot remove hosts.pp as we tried previously because doing this
also remove a dependency between globals and hosts. So we create the
following dependency: tools -> <custom>-netconfig -> hosts
in place of the former: tools -> netconfig -> hosts

Change-Id: I21f6c04eb38406a22a3a400975233bfc775357d0
Partial-Bug: #1616391
2016-09-16 08:21:46 +00:00

213 lines
6.2 KiB
YAML

# Groups definitions
- id: primary-infrastructure_alerting
type: group
version: 2.0.0
role: [primary-infrastructure_alerting]
tasks:
- hiera
- setup_repositories
- fuel_pkgs
- globals
- tools
- logging
- lma-alerting-netconfig
- hosts
- lma-alerting-hiera
- lma-alerting-validate-certificate
- lma-alerting-firewall
- lma-alerting-cluster
- lma-alerting-vip
required_for: [deploy_end]
requires: [deploy_start]
parameters:
strategy:
type: one_by_one
- id: infrastructure_alerting
type: group
version: 2.0.0
role: [infrastructure_alerting]
tasks:
- hiera
- setup_repositories
- fuel_pkgs
- globals
- tools
- logging
- lma-alerting-netconfig
- hosts
- lma-alerting-hiera
- lma-alerting-firewall
- lma-alerting-cluster
- lma-alerting-vip
required_for: [deploy_end]
requires: [deploy_start, primary-infrastructure_alerting]
parameters:
strategy:
type: parallel
# Tasks definitions for deployment
- id: lma-alerting-hiera
type: puppet
version: 2.0.0
requires: [globals]
required_for: [deploy_end]
parameters:
puppet_manifest: "puppet/manifests/hiera.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
# We cannot use the legacy 'netconfig' task because with MOS 9, it won't create
# the proper dependency on the 'virtual_ips' task for the Infrastructure-Alerting
# nodes. As a consequence, the deployment will fail because the nodes will
# perform operations that download stuff from the Internet (like running
# 'apt-get update') while the virtual router isn't ready yet. For MOS 8, the
# task depends on the 'tools' task and not on the 'virtual_ips' task otherwise
# it creates a dependency cycle. In this case, this isn't an issue because the
# default gateway is only changed at post-deployment (see the
# 'influxdb-configure-default-route' task).
- id: lma-alerting-netconfig
type: puppet
version: 2.0.0
requires: [lma-alerting-hiera, tools]
required_for: [deploy_end, hosts]
cross-depends:
- name: virtual_ips
role: [primary-controller, controller]
parameters:
puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp"
puppet_modules: /etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-alerting-validate-certificate
type: puppet
version: 2.0.0
requires: [lma-alerting-hiera]
required_for: [logging, lma-alerting-firewall]
parameters:
puppet_manifest: "puppet/manifests/validate_certificate.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
# reexecute_on is needed for scale-down operations
reexecute_on:
- deploy_changes
- id: lma-alerting-firewall
type: puppet
version: 2.0.0
requires: [lma-alerting-netconfig, lma-alerting-hiera]
required_for: [deploy_end]
parameters:
puppet_manifest: "puppet/manifests/firewall.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
- id: lma-alerting-cluster
type: puppet
version: 2.0.0
requires: [lma-alerting-firewall, lma-alerting-hiera]
required_for: [deploy_end]
parameters:
puppet_manifest: "puppet/manifests/cluster.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-alerting-vip
type: puppet
version: 2.0.0
requires: [lma-alerting-cluster]
required_for: [deploy_end]
parameters:
puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp"
puppet_modules: /etc/puppet/modules
timeout: 600
# Tasks definitions for post-deployment
# Configure the default gateway (required for MOS 8 only)
- id: lma-alerting-configure-default-route
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting, infrastructure_alerting]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: "puppet/manifests/configure_default_route.pp"
puppet_modules: /etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
- id: lma-alerting-dns-client
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting, infrastructure_alerting]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/dns/dns-client.pp
puppet_modules: /etc/puppet/modules
timeout: 600
- id: lma-alerting-ntp-client
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting, infrastructure_alerting]
requires: [lma-alerting-dns-client]
required_for: [post_deployment_end]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/ntp/ntp-client.pp
puppet_modules: /etc/puppet/modules
timeout: 600
# This task needs to be reexecuted to reconfigure the no-quorum-policy every
# time the cluster is scaled up or down
- id: lma-alerting-enable-quorum
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: "puppet/manifests/enable_quorum.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
# These tasks need to be run after the LMA collectors have been deployed.
- id: lma-alerting-nagios
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting, infrastructure_alerting]
# update_hosts is used as an anchor to ensure that LMA collectors are
# deployed before executing this task.
# Note that it is only required for MOS 8 that doesn't support task-based deployment
requires: [update_hosts]
required_for: [post_deployment_end]
cross-depends:
- name: lma-cleanup-apt-config
role: /.*/
parameters:
puppet_manifest: puppet/manifests/nagios.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-alerting-nagios-dashboard-url
type: puppet
version: 2.0.0
role: [primary-infrastructure_alerting]
requires: [lma-alerting-nagios]
required_for: [post_deployment_end]
parameters:
puppet_manifest: puppet/manifests/nagios_dashboard_url.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120