# Groups definitions - id: primary-influxdb_grafana type: group version: 2.0.0 role: [primary-influxdb_grafana] tasks: - hiera - setup_repositories - fuel_pkgs - globals - tools - logging - influxdb-netconfig - influxdb-hiera - grafana-validate-certificate - influxdb-firewall - influxdb-cluster - influxdb-cluster-haproxy - influxdb-vip - influxdb-haproxy - primary-influxdb-installation requires: [deploy_start] required_for: [deploy_end] parameters: strategy: type: one_by_one - id: influxdb_grafana type: group version: 2.0.0 role: [influxdb_grafana] tasks: - hiera - setup_repositories - fuel_pkgs - globals - tools - logging - influxdb-netconfig - hosts - influxdb-hiera - influxdb-firewall - influxdb-cluster - influxdb-cluster-haproxy - influxdb-vip - influxdb-haproxy - influxdb-installation requires: [deploy_start, primary-influxdb_grafana] required_for: [deploy_end] parameters: strategy: type: parallel # Tasks definitions for the deployment ###################################### - id: influxdb-hiera type: puppet version: 2.0.0 requires: [globals] required_for: [logging] parameters: puppet_manifest: "puppet/manifests/hiera.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 120 # reexecute_on is needed for scale-down operations 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 InfluxDB-Grafana # 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: influxdb-netconfig type: puppet version: 2.0.0 requires: [influxdb-hiera, 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: grafana-validate-certificate type: puppet version: 2.0.0 requires: [influxdb-hiera] required_for: [influxdb-firewall] parameters: puppet_manifest: "puppet/manifests/validate_certificate.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 120 # reexecute_on is needed for scale-down operations reexecute_on: - deploy_changes - id: influxdb-firewall type: puppet version: 2.0.0 requires: [influxdb-netconfig] required_for: [deploy_end] parameters: puppet_manifest: "puppet/manifests/firewall.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 - id: influxdb-cluster type: puppet version: 2.0.0 requires: [influxdb-firewall] required_for: [deploy_end] parameters: puppet_manifest: "puppet/manifests/cluster.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 # reexecute_on is needed for scale-down operations reexecute_on: - deploy_changes - id: influxdb-cluster-haproxy type: puppet version: 2.0.0 requires: [influxdb-cluster] required_for: [deploy_end] parameters: puppet_manifest: "puppet/manifests/cluster-haproxy.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 # reexecute_on is needed for scale-down operations reexecute_on: - deploy_changes - id: influxdb-vip type: puppet version: 2.0.0 requires: [influxdb-cluster] required_for: [deploy_end] parameters: puppet_manifest: "/etc/puppet/modules/osnailyfacter/modular/virtual_ips/virtual_ips.pp" puppet_modules: /etc/puppet/modules timeout: 600 - id: influxdb-haproxy type: puppet version: 2.0.0 requires: [influxdb-cluster-haproxy, influxdb-vip] required_for: [deploy_end] parameters: puppet_manifest: "puppet/manifests/haproxy.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 # reexecute_on is needed for scale-down operations reexecute_on: - deploy_changes - id: primary-influxdb-installation type: puppet version: 2.0.0 requires: [influxdb-haproxy] required_for: [deploy_end] parameters: puppet_manifest: "puppet/manifests/influxdb.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 - id: influxdb-installation type: puppet version: 2.0.0 requires: [influxdb-haproxy, primary-influxdb-installation] required_for: [deploy_end] # The cross-depends parameter is required because the installation on the # secondary nodes should only happen once the InfluxDB service has been # started on the primary. cross-depends: - name: primary-influxdb-installation role: [primary-influxdb_grafana] parameters: puppet_manifest: "puppet/manifests/influxdb.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 # Tasks definitions for the post-deployment ########################################### - id: influxdb-dns-client type: puppet version: 2.0.0 role: [primary-influxdb_grafana, influxdb-grafana] 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: influxdb-ntp-client type: puppet version: 2.0.0 role: [primary-influxdb_grafana, influxdb-grafana] requires: [influxdb-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: influxdb-configure-default-route type: puppet version: 2.0.0 role: [primary-influxdb_grafana, influxdb-grafana] 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 - id: influxdb-enable-quorum type: puppet version: 2.0.0 role: [primary-influxdb_grafana] requires: [post_deployment_start] required_for: [post_deployment_end] parameters: puppet_manifest: "puppet/manifests/enable_quorum.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 120 # reexecute_on is needed for scale-down operations reexecute_on: - deploy_changes - id: influxdb-configuration type: puppet version: 2.0.0 role: [primary-influxdb_grafana] requires: [post_deployment_start] # 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: # influxdb-configuration -> upload_nodes_info -> (LMA collector tasks) # Note that it is only required for MOS 8 that doesn't support task-based deployment required_for: [post_deployment_end, upload_nodes_info] cross-depended-by: - name: lma-configure-apt role: /.*/ parameters: puppet_manifest: "puppet/manifests/influxdb_configuration.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 - id: grafana-mysql-provisioning type: puppet version: 2.0.0 role: [primary-influxdb_grafana] requires: [post_deployment_start] required_for: [post_deployment_end] parameters: puppet_manifest: "puppet/manifests/grafana_mysql.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 # Start Grafana only on the primary node since it will take care of the SQL # migrations. # See https://bugs.launchpad.net/lma-toolchain/+bug/1578183 for details - id: primary-grafana-installation type: puppet version: 2.0.0 role: [primary-influxdb_grafana] requires: [post_deployment_start, grafana-mysql-provisioning] required_for: [post_deployment_end] parameters: puppet_manifest: "puppet/manifests/grafana.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 - id: grafana-installation type: puppet version: 2.0.0 role: [influxdb_grafana] requires: [post_deployment_start, primary-grafana-installation] required_for: [post_deployment_end] # The cross-depends parameter is required because the installation on the # secondary nodes should only happen once the Grafana service has been # started on the primary. cross-depends: - name: primary-grafana-installation role: [primary-influxdb_grafana] parameters: puppet_manifest: "puppet/manifests/grafana.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600 - id: grafana-configuration type: puppet version: 2.0.0 role: [primary-influxdb_grafana] requires: [post_deployment_start, primary-grafana-installation] required_for: [post_deployment_end] parameters: puppet_manifest: "puppet/manifests/grafana_configuration.pp" puppet_modules: puppet/modules:/etc/puppet/modules timeout: 600