Integrate Elasticsearch and Kibana with Fuel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

deployment_tasks.yaml 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. # Groups definitions
  2. ####################
  3. - id: primary-elasticsearch_kibana
  4. type: group
  5. version: 2.0.0
  6. role: [primary-elasticsearch_kibana]
  7. tasks:
  8. - hiera
  9. - setup_repositories
  10. - fuel_pkgs
  11. - globals
  12. - tools
  13. - logging
  14. - elasticsearch-netconfig
  15. - hosts
  16. - elasticsearch-check-configuration
  17. - elasticsearch-hiera
  18. - elasticsearch-firewall
  19. - elasticsearch-cluster
  20. - elasticsearch-cluster-haproxy
  21. - elasticsearch-virtual-ip
  22. - elasticsearch-haproxy
  23. - elasticsearch-installation
  24. requires: [deploy_start]
  25. required_for: [deploy_end]
  26. parameters:
  27. strategy:
  28. type: one_by_one
  29. - id: elasticsearch_kibana
  30. type: group
  31. version: 2.0.0
  32. role: [elasticsearch_kibana]
  33. tasks:
  34. - hiera
  35. - setup_repositories
  36. - fuel_pkgs
  37. - globals
  38. - tools
  39. - logging
  40. - elasticsearch-netconfig
  41. - hosts
  42. - elasticsearch-check-configuration
  43. - elasticsearch-hiera
  44. - elasticsearch-firewall
  45. - elasticsearch-cluster
  46. - elasticsearch-cluster-haproxy
  47. - elasticsearch-virtual-ip
  48. - elasticsearch-haproxy
  49. - elasticsearch-installation
  50. requires: [deploy_start, primary-elasticsearch_kibana]
  51. required_for: [deploy_end]
  52. parameters:
  53. strategy:
  54. type: parallel
  55. # Tasks definitions for the deployment
  56. ######################################
  57. # This task needs to be reexecuted to adapt the configuration parameters which
  58. # depend on the number of nodes in the cluster
  59. - id: elasticsearch-hiera
  60. type: puppet
  61. version: 2.0.0
  62. requires: [globals]
  63. required_for: [deploy_end]
  64. parameters:
  65. puppet_manifest: "puppet/manifests/hiera_override.pp"
  66. puppet_modules: puppet/modules:/etc/puppet/modules
  67. timeout: 120
  68. reexecute_on:
  69. - deploy_changes
  70. # This task needs to be reexecuted to recheck that the configuration parameters
  71. # match the node's characteristics (eg JVM size).
  72. - id: elasticsearch-check-configuration
  73. type: puppet
  74. version: 2.0.0
  75. requires: [elasticsearch-hiera]
  76. required_for: [deploy_end]
  77. parameters:
  78. puppet_manifest: puppet/manifests/check_environment_configuration.pp
  79. puppet_modules: puppet/modules:/etc/puppet/modules
  80. timeout: 120
  81. reexecute_on:
  82. - deploy_changes
  83. # We cannot use the legacy 'netconfig' task because it won't create the proper
  84. # dependency on the virtual management router task.
  85. - id: elasticsearch-netconfig
  86. type: puppet
  87. version: 2.0.0
  88. requires: [elasticsearch-check-configuration, virtual_ips]
  89. required_for: [deploy_end]
  90. cross-depends:
  91. - name: virtual_ips
  92. role: [primary-controller, controller]
  93. parameters:
  94. puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp"
  95. puppet_modules: /etc/puppet/modules
  96. timeout: 600
  97. reexecute_on:
  98. - deploy_changes
  99. - id: elasticsearch-firewall
  100. type: puppet
  101. version: 2.0.0
  102. requires: [elasticsearch-netconfig]
  103. required_for: [deploy_end]
  104. parameters:
  105. puppet_manifest: "puppet/manifests/firewall.pp"
  106. puppet_modules: puppet/modules:/etc/puppet/modules
  107. timeout: 3600
  108. - id: elasticsearch-cluster
  109. type: puppet
  110. version: 2.0.0
  111. requires: [elasticsearch-firewall]
  112. required_for: [deploy_end]
  113. parameters:
  114. puppet_manifest: "puppet/manifests/cluster.pp"
  115. puppet_modules: puppet/modules:/etc/puppet/modules
  116. timeout: 3600
  117. reexecute_on:
  118. - deploy_changes
  119. - id: elasticsearch-cluster-haproxy
  120. type: puppet
  121. version: 2.0.0
  122. requires: [elasticsearch-cluster]
  123. required_for: [deploy_end]
  124. parameters:
  125. puppet_manifest: "puppet/manifests/cluster-haproxy.pp"
  126. puppet_modules: puppet/modules:/etc/puppet/modules
  127. timeout: 3600
  128. reexecute_on:
  129. - deploy_changes
  130. - id: elasticsearch-virtual-ip
  131. type: puppet
  132. version: 2.0.0
  133. requires: [elasticsearch-cluster]
  134. required_for: [deploy_end]
  135. parameters:
  136. puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp"
  137. puppet_modules: /etc/puppet/modules
  138. timeout: 3600
  139. # This task needs to be reexecuted to reconfigure HAProxy backends
  140. - id: elasticsearch-haproxy
  141. type: puppet
  142. version: 2.0.0
  143. requires: [elasticsearch-cluster-haproxy, elasticsearch-virtual-ip]
  144. required_for: [deploy_end]
  145. parameters:
  146. puppet_manifest: "puppet/manifests/haproxy.pp"
  147. puppet_modules: puppet/modules:/etc/puppet/modules
  148. timeout: 120
  149. reexecute_on:
  150. - deploy_changes
  151. # This task needs to be reexecuted to reconfigure Elasticsearch instances
  152. - id: elasticsearch-installation
  153. type: puppet
  154. version: 2.0.0
  155. requires: [elasticsearch-haproxy]
  156. required_for: [deploy_end]
  157. parameters:
  158. puppet_manifest: puppet/manifests/elasticsearch.pp
  159. puppet_modules: puppet/modules:/etc/puppet/modules
  160. timeout: 600
  161. reexecute_on:
  162. - deploy_changes
  163. # Tasks defintions for the post-deployment
  164. ##########################################
  165. - id: elasticsearch-dns-client
  166. type: puppet
  167. version: 2.0.0
  168. role: [primary-elasticsearch_kibana, elasticsearch_kibana]
  169. requires: [post_deployment_start]
  170. required_for: [post_deployment_end]
  171. parameters:
  172. puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/dns/dns-client.pp
  173. puppet_modules: /etc/puppet/modules
  174. timeout: 600
  175. - id: elasticsearch-ntp-client
  176. type: puppet
  177. version: 2.0.0
  178. role: [primary-elasticsearch_kibana, elasticsearch_kibana]
  179. requires: [elasticsearch-dns-client]
  180. required_for: [post_deployment_end]
  181. parameters:
  182. puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/ntp/ntp-client.pp
  183. puppet_modules: /etc/puppet/modules
  184. timeout: 600
  185. # Configure the default gateway (required for MOS 8 only)
  186. - id: elasticsearch-configure-default-route
  187. type: puppet
  188. version: 2.0.0
  189. role: [primary-elasticsearch_kibana, elasticsearch_kibana]
  190. requires: [post_deployment_start]
  191. required_for: [post_deployment_end]
  192. parameters:
  193. puppet_manifest: "puppet/manifests/configure_default_route.pp"
  194. puppet_modules: /etc/puppet/modules
  195. timeout: 120
  196. reexecute_on:
  197. - deploy_changes
  198. # In order to automatically import dashboards, it is mandatory to create and
  199. # configure the Kibana index before Kibana4 starts. This task is ran at post-deployment
  200. # stage because the index creation must occur when the Elasticsearch cluster is ready
  201. # (eg. all instances are started). This is required for MOS 8 (role-based deployment).
  202. - id: provision-kibana-index
  203. type: puppet
  204. version: 2.0.0
  205. role: [primary-elasticsearch_kibana]
  206. requires: [post_deployment_start]
  207. required_for: [post_deployment_end]
  208. parameters:
  209. puppet_manifest: puppet/manifests/kibana_index_configuration.pp
  210. puppet_modules: puppet/modules:/etc/puppet/modules
  211. timeout: 600
  212. - id: kibana-installation
  213. type: puppet
  214. version: 2.0.0
  215. role: [primary-elasticsearch_kibana, elasticsearch_kibana]
  216. cross-depends:
  217. - name: provision-kibana-index
  218. role: [primary-elasticsearch_kibana]
  219. requires: [post_deployment_start, provision-kibana-index]
  220. required_for: [post_deployment_end]
  221. parameters:
  222. puppet_manifest: puppet/manifests/kibana.pp
  223. puppet_modules: puppet/modules:/etc/puppet/modules
  224. timeout: 600
  225. # This task needs to be reexecuted to reconfigure the index templates with an
  226. # appropriate number_of_replicas.
  227. # This is done at post_deployment time to ensure that the cluster is ready.
  228. - id: elasticsearch-kibana-configuration
  229. type: puppet
  230. version: 2.0.0
  231. role: [primary-elasticsearch_kibana]
  232. requires: [post_deployment_start, kibana-installation]
  233. # We use upload_nodes_info as an anchor to order the post-deployment tasks executed
  234. # by this plugin and the LMA collector plugin. The dependency chain is like this:
  235. # elasticsearch-kibana-configuration -> upload_nodes_info -> (LMA collector tasks)
  236. required_for: [upload_nodes_info, post_deployment_end]
  237. parameters:
  238. puppet_manifest: puppet/manifests/provision_services.pp
  239. puppet_modules: puppet/modules:/etc/puppet/modules
  240. timeout: 600
  241. reexecute_on:
  242. - deploy_changes
  243. # This task needs to be reexecuted to reconfigure the no-quorum-policy every
  244. # time the cluster is scaled up or down. In case of scale up, it should happen
  245. # after the new nodes have added themselves to the Pacemaker cluster.
  246. - id: elasticsearch-enable-quorum
  247. type: puppet
  248. version: 2.0.0
  249. role: [primary-elasticsearch_kibana]
  250. requires: [elasticsearch-kibana-configuration]
  251. required_for: [post_deployment_end]
  252. parameters:
  253. puppet_manifest: "puppet/manifests/enable_quorum.pp"
  254. puppet_modules: puppet/modules:/etc/puppet/modules
  255. timeout: 120
  256. reexecute_on:
  257. - deploy_changes