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 adds version to the deployment tasks to be fully compatible with the v2 engine. Change-Id: Iea7528712b65ce1430c1d8bcb8386908f485a757
This commit is contained in:
parent
4cd9570fa8
commit
aa6137d3c2
|
@ -1,5 +1,7 @@
|
|||
# Groups definitions
|
||||
- id: primary-elasticsearch_kibana
|
||||
type: group
|
||||
version: 2.0.0
|
||||
role: [primary-elasticsearch_kibana]
|
||||
tasks: &common_tasks
|
||||
- hiera
|
||||
|
@ -10,26 +12,38 @@
|
|||
- logging
|
||||
- netconfig
|
||||
- hosts
|
||||
required_for: [deploy_end]
|
||||
- elasticsearch-check-configuration
|
||||
- elasticsearch-hiera
|
||||
- elasticsearch-firewall
|
||||
- elasticsearch-cluster
|
||||
- elasticsearch-cluster-haproxy
|
||||
- elasticsearch-virtual-ip
|
||||
- elasticsearch-haproxy
|
||||
- elasticsearch-installation
|
||||
- kibana-installation
|
||||
requires: [deploy_start]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
strategy:
|
||||
type: one_by_one
|
||||
|
||||
- id: elasticsearch_kibana
|
||||
type: group
|
||||
version: 2.0.0
|
||||
role: [elasticsearch_kibana]
|
||||
tasks: *common_tasks
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start, primary-elasticsearch_kibana]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
|
||||
# Tasks definitions for deployment
|
||||
#
|
||||
# This task needs to be reexecuted to recheck the configuration
|
||||
- id: lma-es-check-configuration
|
||||
- id: elasticsearch-check-configuration
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana]
|
||||
version: 2.0.0
|
||||
requires: [netconfig]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
|
@ -39,56 +53,13 @@
|
|||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
|
||||
- id: lma-es-firewall
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
required_for: [deploy_end]
|
||||
requires: [netconfig]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/firewall.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
- id: lma-es-cluster
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [lma-es-firewall]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/cluster.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: lma-es-cluster-haproxy
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [lma-es-cluster]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/cluster-haproxy.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: lma-es-virtual-ip
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
required_for: [deploy_end]
|
||||
requires: [lma-es-cluster]
|
||||
parameters:
|
||||
puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp"
|
||||
puppet_modules: /etc/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
|
||||
- id: elasticsearch-hiera
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
version: 2.0.0
|
||||
requires: [globals]
|
||||
required_for: [logging, lma-es-cluster, lma-es-kibana-haproxy]
|
||||
required_for: [logging]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/hiera_override.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
@ -96,11 +67,55 @@
|
|||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
# This task needs to be reexecuted to reconfigure HAProxy backends
|
||||
- id: lma-es-kibana-haproxy
|
||||
- id: elasticsearch-firewall
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [lma-es-cluster-haproxy, lma-es-virtual-ip]
|
||||
version: 2.0.0
|
||||
requires: [netconfig]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/firewall.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
- id: elasticsearch-cluster
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-firewall]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/cluster.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: elasticsearch-cluster-haproxy
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-cluster]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/cluster-haproxy.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: elasticsearch-virtual-ip
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-cluster]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp"
|
||||
puppet_modules: /etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
# This task needs to be reexecuted to reconfigure HAProxy backends
|
||||
- id: elasticsearch-haproxy
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-cluster-haproxy, elasticsearch-virtual-ip]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/haproxy.pp"
|
||||
|
@ -110,10 +125,10 @@
|
|||
- deploy_changes
|
||||
|
||||
# This task needs to be reexecuted to reconfigure Elasticsearch instances
|
||||
- id: lma-install-elasticsearch
|
||||
- id: elasticsearch-installation
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [lma-es-kibana-haproxy]
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-haproxy]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/elasticsearch.pp
|
||||
|
@ -122,24 +137,27 @@
|
|||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: lma-install-kibana
|
||||
- id: kibana-installation
|
||||
type: puppet
|
||||
groups: [primary-elasticsearch_kibana, elasticsearch_kibana]
|
||||
requires: [lma-es-kibana-haproxy]
|
||||
version: 2.0.0
|
||||
requires: [elasticsearch-haproxy]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/kibana.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 600
|
||||
|
||||
# Tasks definitions for post-deployment
|
||||
#
|
||||
# This task needs to be reexecuted to reconfigure index templates with an
|
||||
# appropriate number_of_replicas. This is done at post_deployment time to
|
||||
# ensure that the cluster is ready (the number of expected master nodes is reached)
|
||||
- id: lma-provision-services
|
||||
- id: elasticsearch-kibana-configuration
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
role: [primary-elasticsearch_kibana]
|
||||
requires: [post_deployment_start]
|
||||
required_for: [lma-es-kibana-enable-quorum, post_deployment_end]
|
||||
required_for: [post_deployment_end]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/provision_services.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
@ -150,10 +168,11 @@
|
|||
# This task needs to be reexecuted to reconfigure the no-quorum-policy every
|
||||
# time the cluster is scaled up or down. In case of scale up, it should happen
|
||||
# after the new nodes have added themselves to the Pacemaker cluster.
|
||||
- id: lma-es-kibana-enable-quorum
|
||||
- id: elasticsearch-enable-quorum
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
role: [primary-elasticsearch_kibana]
|
||||
requires: [post_deployment_start]
|
||||
requires: [elasticsearch-kibana-configuration]
|
||||
required_for: [post_deployment_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/enable_quorum.pp"
|
||||
|
|
Loading…
Reference in New Issue