Browse Source

Update to task based deployment

MOS 9 comes with a new orchestration engine (so-called v2 or task-based
deployement) which reduces greatly the time necessary to deploy new
environments. This change updates the deployment tasks to be fully
compatible with the v2 engine since when a deployment mixes v1 and
v2 tasks, the engine falls back to the v1 (slower) mode.

Note that we need to keep the backward compatibility with MOS 8 so the
deployment tasks still define the v1 attributes like 'requires' and
'required_for'.

Related-bug: #1558669

Change-Id: I92ede3808ad0b2bc9a39d4ec6560b1cc7ae256c3
tags/0.10.0
Guillaume Thouvenin 3 years ago
parent
commit
a6ff1ac1ab
2 changed files with 152 additions and 110 deletions
  1. 151
    2
      deployment_tasks.yaml
  2. 1
    108
      tasks.yaml

+ 151
- 2
deployment_tasks.yaml View File

@@ -1,2 +1,151 @@
---
[]
# The Hiera data needs to be populated first so that other plugins (eg LMA
# Infrastructure Alerting) can use it
- id: lma-hiera-override
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

- id: lma-check-configuration
type: puppet
version: 2.0.0
requires: [post_deployment_start]
required_for: [post_deployment_end]
role: [primary-controller]
parameters:
puppet_manifest: puppet/manifests/check_environment_configuration.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 300

- id: lma-configure-apt
type: puppet
version: 2.0.0
requires: [post_deployment_start]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/configure_apt.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- id: lma-base
type: puppet
version: 2.0.0
requires: [lma-hiera-override, lma-configure-apt]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/base.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

# 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]
required_for: [lma-aggregator]
role: [controller, primary-controller]
parameters:
puppet_manifest: puppet/manifests/controller.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- id: lma-main-compute
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [lma-aggregator]
role: [compute]
parameters:
puppet_manifest: puppet/manifests/compute.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- id: lma-main-cinder
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [lma-aggregator]
role: [cinder]
parameters:
puppet_manifest: puppet/manifests/cinder.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- id: lma-main-ceph-osd
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [lma-aggregator]
role: [ceph-osd]
parameters:
puppet_manifest: puppet/manifests/ceph_osd.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- id: lma-aggregator
type: puppet
version: 2.0.0
requires: [lma-base]
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/aggregator.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- 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

# The influxdb-configuration task is declared by the influxdb-grafana plugin.
# The elasticsearch-kibana-configuration task is declared by the
# elasticsearch-kibana plugin.
- id: lma-backends
type: puppet
version: 2.0.0
requires: [lma-base, influxdb-configuration, elasticsearch-kibana-configuration]
required_for: [lma-cleanup-apt-config]
role:
- primary-elasticsearch_kibana
- elasticsearch_kibana
- primary-influxdb_grafana
- influxdb_grafana
parameters:
puppet_manifest: puppet/manifests/lma_backends.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

# This task must be executed at the very end of the deployment.
- id: lma-cleanup-apt-config
type: puppet
version: 2.0.0
required_for: [post_deployment_end]
role: '*'
parameters:
puppet_manifest: puppet/manifests/cleanup_apt_config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600


+ 1
- 108
tasks.yaml View File

@@ -1,108 +1 @@
# This task is executed before any real deployment task
- role: ['primary-controller']
stage: post_deployment/8000
type: puppet
parameters:
puppet_manifest: puppet/manifests/check_environment_configuration.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 300

# The Hiera data needs to be populated first so that other plugins (eg LMA
# Infrastructure Alerting) can use it
- role: '*'
stage: post_deployment/8000
type: puppet
parameters:
puppet_manifest: puppet/manifests/hiera_override.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

# The following tasks are executed in the order they are declared

# We need to control what is deployed when we install a new package. So
# we need to prevent the installation of recommended packages.
# See https://bugs.launchpad.net/fuel-plugins/+bug/1494186
- role: '*'
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/configure_apt.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: '*'
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/base.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: '*'
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/aggregator.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: ['controller', 'primary-controller']
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/controller.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: [ 'compute' ]
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/compute.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: ['cinder']
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/cinder.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: ['ceph-osd']
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/ceph_osd.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: '*'
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/configure_afd_filters.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role:
- primary-elasticsearch_kibana
- elasticsearch_kibana
- primary-influxdb_grafana
- influxdb_grafana
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/lma_backends.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

- role: '*'
stage: post_deployment/8200
type: puppet
parameters:
puppet_manifest: puppet/manifests/cleanup_apt_config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600

[]

Loading…
Cancel
Save