Re-execute cluster configuration on redeployment

This change upgrades the package version to 4.0.0 to use the reexecute_on
option.
All tasks defined in tasks.yaml are moved in deployment_tasks.yaml
to leverage this new feature.
The deployment order with 'priority' cannot be set but the only
requirement this plugin has is to be deployed before lma_collector,
which is always the case as long as lma_collector is deployed at
post_deployment time.

Change-Id: I08259f1646122aed0674610ddaf7a327d31b9a1a
This commit is contained in:
Swann Croiset 2016-01-11 12:37:21 +01:00
parent 2c9c0876bd
commit f0cebee783
4 changed files with 65 additions and 35 deletions

View File

@ -34,6 +34,20 @@
strategy:
type: parallel
# This task needs to be reexecuted to recheck configuration
- id: lma-es-check-configuration
type: puppet
groups: [primary-elasticsearch_kibana]
requires: [netconfig]
required_for: [deploy_end]
parameters:
puppet_manifest: puppet/manifests/check_environment_configuration.pp
puppet_modules: puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
- id: lma-es-firewall
type: puppet
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
@ -53,6 +67,8 @@
puppet_manifest: "puppet/manifests/cluster.pp"
puppet_modules: "puppet/modules"
timeout: 3600
reexecute_on:
- deploy_changes
- id: lma-es-virtual-ip
type: puppet
@ -64,16 +80,21 @@
puppet_modules: "puppet/modules"
timeout: 3600
# This task needs to be reexecuted to adapt configuration variables depending
# on the number of nodes in the cluster
- id: lma-es-hiera
type: puppet
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
requires: [globals]
required_for: [logging]
required_for: [logging, lma-es-cluster, lma-es-kibana-haproxy]
parameters:
puppet_manifest: "puppet/manifests/hiera_override.pp"
puppet_modules: "puppet/modules"
timeout: 120
reexecute_on:
- deploy_changes
# This task needs to be reexecuted to reconfigure HAProxy backends
- id: lma-es-kibana-haproxy
type: puppet
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
@ -83,3 +104,42 @@
puppet_manifest: "puppet/manifests/haproxy.pp"
puppet_modules: "puppet/modules"
timeout: 120
reexecute_on:
- deploy_changes
# This task needs to be reexecuted to reconfigure Elasticsearch instances
- id: lma-install-elasticsearch
type: puppet
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
requires: [lma-es-kibana-haproxy]
required_for: [deploy_end]
parameters:
puppet_manifest: puppet/manifests/elasticsearch.pp
puppet_modules: puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
- id: lma-install-kibana
type: puppet
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
requires: [lma-es-kibana-haproxy]
required_for: [deploy_end]
parameters:
puppet_manifest: puppet/manifests/kibana.pp
puppet_modules: puppet/modules
timeout: 600
# This task needs to be reexecuted to reconfigure index templates with an
# appropriate number_of_replicas
- id: lma-provision-services
type: puppet
groups: [primary-elasticsearch_kibana]
requires: [lma-install-elasticsearch, lma-install-kibana]
required_for: [deploy_end]
parameters:
puppet_manifest: puppet/manifests/provision_services.pp
puppet_modules: puppet/modules
timeout: 600
reexecute_on:
- deploy_changes

View File

@ -15,6 +15,7 @@ authors: ['Mirantis Inc.']
# A link to the plugin homepage
homepage: 'https://github.com/openstack/fuel-plugin-elasticsearch-kibana'
groups: ['monitoring']
is_hotpluggable: false
# The plugin is compatible with releases in the list
releases:
@ -25,4 +26,4 @@ releases:
repository_path: repositories/ubuntu
# Version of plugin package
package_version: '3.0.0'
package_version: '4.0.0'

View File

@ -1,32 +1 @@
# This task is executed before any real deployment task
- role: ['primary-elasticsearch_kibana']
stage: post_deployment/8000
type: puppet
parameters:
puppet_manifest: puppet/manifests/check_environment_configuration.pp
puppet_modules: puppet/modules
timeout: 300
- role: ['elasticsearch_kibana', 'primary-elasticsearch_kibana']
stage: post_deployment/8100
type: puppet
parameters:
puppet_manifest: puppet/manifests/elasticsearch.pp
puppet_modules: puppet/modules
timeout: 600
- role: ['elasticsearch_kibana', 'primary-elasticsearch_kibana']
stage: post_deployment/8100
type: puppet
parameters:
puppet_manifest: puppet/manifests/kibana.pp
puppet_modules: puppet/modules
timeout: 1200
- role: ['primary-elasticsearch_kibana']
stage: post_deployment/8100
type: puppet
parameters:
puppet_manifest: puppet/manifests/provision_services.pp
puppet_modules: puppet/modules
timeout: 600
[]

View File

@ -1,2 +1,2 @@
Sphinx
fuel-plugin-builder>=3.0
-e git+https://github.com/openstack/fuel-plugins.git#egg=fuel-plugin-builder