fuel-plugin-elasticsearch-k.../deployment_tasks.yaml

289 lines
9.0 KiB
YAML

# Groups definitions
####################
- id: primary-elasticsearch_kibana
type: group
version: 2.0.0
role: [primary-elasticsearch_kibana]
tasks:
- hiera
- setup_repositories
- fuel_pkgs
- globals
- tools
- logging
- elasticsearch-netconfig
- hosts
- elasticsearch-check-configuration
- elasticsearch-hiera
- elasticsearch-firewall
- elasticsearch-cluster
- elasticsearch-cluster-haproxy
- elasticsearch-virtual-ip
- elasticsearch-haproxy
- elasticsearch-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:
- hiera
- setup_repositories
- fuel_pkgs
- globals
- tools
- logging
- elasticsearch-netconfig
- hosts
- elasticsearch-check-configuration
- elasticsearch-hiera
- elasticsearch-firewall
- elasticsearch-cluster
- elasticsearch-cluster-haproxy
- elasticsearch-virtual-ip
- elasticsearch-haproxy
- elasticsearch-installation
requires: [deploy_start, primary-elasticsearch_kibana]
required_for: [deploy_end]
parameters:
strategy:
type: parallel
# Tasks definitions for the deployment
######################################
# This task needs to be reexecuted to adapt the configuration parameters which
# depend on the number of nodes in the cluster
- id: elasticsearch-hiera
type: puppet
version: 2.0.0
requires: [globals]
required_for: [deploy_end]
parameters:
puppet_manifest: "puppet/manifests/hiera_override.pp"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
# This task needs to be reexecuted to recheck that the configuration parameters
# match the node's characteristics (eg JVM size).
- id: elasticsearch-check-configuration
type: puppet
version: 2.0.0
requires: [elasticsearch-hiera]
required_for: [deploy_end]
parameters:
puppet_manifest: puppet/manifests/check_environment_configuration.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
# 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 Elasticsearch-Kibana
# 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: elasticsearch-netconfig
type: puppet
version: 2.0.0
requires: [elasticsearch-check-configuration, 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: elasticsearch-firewall
type: puppet
version: 2.0.0
requires: [elasticsearch-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"
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
reexecute_on:
- deploy_changes
# This task needs to be reexecuted to reconfigure Elasticsearch instances
- id: elasticsearch-installation
type: puppet
version: 2.0.0
requires: [elasticsearch-haproxy]
required_for: [deploy_end]
cross-depends:
- name: telemetry-hiera
parameters:
puppet_manifest: puppet/manifests/elasticsearch.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
# Tasks defintions for the post-deployment
##########################################
- id: elasticsearch-dns-client
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana, elasticsearch_kibana]
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: elasticsearch-ntp-client
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana, elasticsearch_kibana]
requires: [elasticsearch-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
# Configure the default gateway (required for MOS 8 only)
- id: elasticsearch-configure-default-route
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana, elasticsearch_kibana]
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
# In order to automatically import dashboards, it is mandatory to create and
# configure the Kibana index before Kibana4 starts. This task is ran at post-deployment
# stage because the index creation must occur when the Elasticsearch cluster is ready
# (eg. all instances are started). This is required for MOS 8 (role-based deployment).
- id: provision-kibana-index
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana]
requires: [post_deployment_start]
required_for: [post_deployment_end]
parameters:
puppet_manifest: puppet/manifests/kibana_index_configuration.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
- id: kibana-installation
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana, elasticsearch_kibana]
cross-depends:
- name: provision-kibana-index
role: [primary-elasticsearch_kibana]
requires: [post_deployment_start, provision-kibana-index]
required_for: [post_deployment_end]
parameters:
puppet_manifest: puppet/manifests/kibana.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
# This task needs to be reexecuted to reconfigure the index templates with an
# appropriate number_of_replicas.
# This is done at post_deployment time to ensure that the cluster is ready.
- id: elasticsearch-kibana-configuration
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana]
requires: [post_deployment_start, kibana-installation]
# We use upload_nodes_info as an anchor to order the post-deployment tasks executed
# by this plugin and the LMA collector plugin. The dependency chain is like this:
# elasticsearch-kibana-configuration -> upload_nodes_info -> (LMA collector tasks)
required_for: [upload_nodes_info, post_deployment_end]
cross-depended-by:
- name: lma-configure-apt
role: /.*/
parameters:
puppet_manifest: puppet/manifests/provision_services.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
reexecute_on:
- deploy_changes
# 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: elasticsearch-enable-quorum
type: puppet
version: 2.0.0
role: [primary-elasticsearch_kibana]
requires: [elasticsearch-kibana-configuration]
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