kolla-ansible/ansible/roles/monasca/tasks/precheck.yml
Doug Szumski b39a0f805a Switch to Monasca API for logs
The Monasca Log API has been removed and in this change we switch
to using the unified API. If dedicated log APIs are required then
this can be supported through configuration. Out of the box the
Monasca API is used for both logs and metrics which is envisaged to
work for most use cases.

In order to use the unified API for logs, we need to disable the
legacy Kafka client. We also rename the Monasca API config file
to remove a warning about using the old style name.

Depends-On: https://review.opendev.org/#/c/728638
Change-Id: I9b6bf5b6690f4b4b3445e7d15a40e45dd42d2e84
2020-05-23 17:49:32 +01:00

57 lines
1.7 KiB
YAML

---
- import_role:
name: service-precheck
vars:
service_precheck_services: "{{ monasca_services }}"
service_name: "{{ project_name }}"
- name: Get container facts
become: true
kolla_container_facts:
name: "{{ monasca_services.values()|map(attribute='container_name')|list }}"
register: container_facts
- name: Checking free port for monasca-api
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_api_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-api']['group']]
- container_facts['monasca_api'] is not defined
- name: Checking free port for monasca-agent-forwarder
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_agent_forwarder_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-agent-forwarder']['group']]
- container_facts['monasca_agent_forwarder'] is not defined
- name: Checking free port for monasca-agent-statsd
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_agent_statsd_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-agent-statsd']['group']]
- container_facts['monasca_agent_statsd'] is not defined
- name: Checking free port for monasca-grafana server
wait_for:
host: "{{ api_interface_address }}"
port: "{{ monasca_grafana_server_port }}"
connect_timeout: 1
timeout: 1
state: stopped
when:
- inventory_hostname in groups[monasca_services['monasca-grafana']['group']]
- container_facts['monasca_grafana'] is not defined