Merge "Remove support for Prometheus v1"
This commit is contained in:
commit
bb05cf1150
@ -113,21 +113,13 @@ prometheus_mysql_exporter_database_user: "{% if use_preconfigured_databases | bo
|
|||||||
# For a list of modules see the alertmanager config.
|
# For a list of modules see the alertmanager config.
|
||||||
prometheus_blackbox_exporter_endpoints: []
|
prometheus_blackbox_exporter_endpoints: []
|
||||||
|
|
||||||
####################
|
|
||||||
# Compatibility
|
|
||||||
####################
|
|
||||||
|
|
||||||
# Whether to keep using Prometheus server v1 (due to no data-preserving migration path to v2)
|
|
||||||
# NOTE(piotrp): Deprecated in Wallaby and will be removed in Xena
|
|
||||||
prometheus_use_v1: no
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Docker
|
# Docker
|
||||||
####################
|
####################
|
||||||
prometheus_install_type: "{{ kolla_install_type }}"
|
prometheus_install_type: "{{ kolla_install_type }}"
|
||||||
prometheus_tag: "{{ openstack_tag }}"
|
prometheus_tag: "{{ openstack_tag }}"
|
||||||
|
|
||||||
prometheus_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ prometheus_install_type }}-{% if not prometheus_use_v1 | bool %}prometheus-v2-server{% else %}prometheus-server{% endif %}"
|
prometheus_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ prometheus_install_type }}-prometheus-v2-server"
|
||||||
prometheus_server_tag: "{{ prometheus_tag }}"
|
prometheus_server_tag: "{{ prometheus_tag }}"
|
||||||
prometheus_server_image_full: "{{ prometheus_server_image }}:{{ prometheus_server_tag }}"
|
prometheus_server_image_full: "{{ prometheus_server_image }}:{{ prometheus_server_tag }}"
|
||||||
|
|
||||||
@ -183,7 +175,7 @@ prometheus_server_default_volumes:
|
|||||||
- "{{ node_config_directory }}/prometheus-server/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/prometheus-server/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
||||||
- "{{ 'prometheus_v2' if not prometheus_use_v1 | bool else 'prometheus' }}:/var/lib/prometheus"
|
- "prometheus_v2:/var/lib/prometheus"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
prometheus_haproxy_exporter_default_volumes:
|
prometheus_haproxy_exporter_default_volumes:
|
||||||
- "{{ node_config_directory }}/prometheus-haproxy-exporter/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/prometheus-haproxy-exporter/:{{ container_config_directory }}/:ro"
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
{
|
||||||
{% if not prometheus_use_v1 | bool %}
|
|
||||||
"command": "/opt/prometheus/prometheus --config.file /etc/prometheus/prometheus.yml --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_port }} --web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_port }} --storage.tsdb.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
|
"command": "/opt/prometheus/prometheus --config.file /etc/prometheus/prometheus.yml --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_port }} --web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_port }} --storage.tsdb.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
|
||||||
{% else %}
|
|
||||||
"command": "/opt/prometheus/prometheus -config.file /etc/prometheus/prometheus.yml -web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_port }} -web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_port }} -log.format logger:stdout -storage.local.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
|
|
||||||
{% endif %}
|
|
||||||
"config_files": [
|
"config_files": [
|
||||||
{
|
{
|
||||||
"source": "{{ container_config_directory }}/prometheus.yml",
|
"source": "{{ container_config_directory }}/prometheus.yml",
|
||||||
|
@ -20,25 +20,11 @@ and change the following:
|
|||||||
|
|
||||||
enable_prometheus: "yes"
|
enable_prometheus: "yes"
|
||||||
|
|
||||||
This will, by default, deploy Prometheus version 2.x. Since Prometheus 1.x data
|
Note: This will deploy Prometheus version 2.x. Any potentially existing
|
||||||
is not compatible with Prometheus 2.x and no automatic data migration is
|
Prometheus 1.x instances deployed by previous Kolla Ansible releases will
|
||||||
provided, any previous Prometheus 1.x deployment will be replaced and all its
|
conflict with current version and should be manually stopped and/or removed.
|
||||||
stored metrics will become inacessible (but still available in the old data
|
If you would like to stay with version 1.x, set the ``enable_prometheus``
|
||||||
volume: ``prometheus``; the new data volume defaults to ``prometheus_v2``).
|
variable to ``no``.
|
||||||
If you rely on Prometheus only as e.g. a source of alert notifications (in pair
|
|
||||||
with Alertmanager), it might not be worth migrating old metrics and they could
|
|
||||||
be discarded. Otherwise, it's either possible to use
|
|
||||||
`remote storage <https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations>`_
|
|
||||||
or scrape Kolla's Prometheus ``/federate`` endpoint with an external system.
|
|
||||||
However, if you want to stay on 1.x series, set the following variable:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
prometheus_use_v1: yes
|
|
||||||
|
|
||||||
.. warning::
|
|
||||||
Support for Prometheus 1.x is deprecated and will be removed in next
|
|
||||||
Kolla Ansible release (Xena).
|
|
||||||
|
|
||||||
In order to remove leftover volume containing Prometheus 1.x data, execute:
|
In order to remove leftover volume containing Prometheus 1.x data, execute:
|
||||||
|
|
||||||
|
@ -710,9 +710,6 @@
|
|||||||
# - host1:port1
|
# - host1:port1
|
||||||
# - host2:port2
|
# - host2:port2
|
||||||
|
|
||||||
# Whether to keep using Prometheus server v1 (due to no data-preserving migration path to v2)
|
|
||||||
#prometheus_use_v1: no
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# Freezer
|
# Freezer
|
||||||
#########
|
#########
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Removes support for Prometheus v1 deployment. Any previously deployed
|
||||||
|
Prometheus v1 instances will create a conflict during an upgrade thus
|
||||||
|
should be either manually stopped/removed or Prometheus v2 deployment
|
||||||
|
should be disabled by setting ``enable_prometheus`` to ``no``.
|
Loading…
Reference in New Issue
Block a user