From 10434a9b2bb6832a9d743b061e4d1c799189c65d Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 9 Jul 2024 15:01:32 +0300 Subject: [PATCH] Add notes about antietcd to documentation --- docs/config/monitor.en.md | 30 ++++++++++++++++++++- docs/config/monitor.ru.md | 31 ++++++++++++++++++++- docs/config/src/monitor.yml | 54 +++++++++++++++++++++++++++++++++++-- docs/intro/features.en.md | 2 ++ docs/intro/features.ru.md | 2 ++ 5 files changed, 115 insertions(+), 4 deletions(-) diff --git a/docs/config/monitor.en.md b/docs/config/monitor.en.md index eb0e0dcc..d3ff0367 100644 --- a/docs/config/monitor.en.md +++ b/docs/config/monitor.en.md @@ -8,6 +8,7 @@ These parameters only apply to Monitors. +- [use_antietcd](#use_antietcd) - [enable_prometheus](#enable_prometheus) - [mon_http_port](#mon_http_port) - [mon_http_ip](#mon_http_ip) @@ -24,12 +25,39 @@ These parameters only apply to Monitors. - [placement_levels](#placement_levels) - [use_old_pg_combinator](#use_old_pg_combinator) +## use_antietcd + +- Type: boolean +- Default: false + +Enable experimental built-in etcd replacement (clustered key-value database): +[antietcd](https://git.yourcmc.ru/vitalif/antietcd/). + +When set to true, monitor runs internal antietcd automatically if it finds +a network interface with an IP address matching one of addresses in the +`etcd_address` configuration option (in `/etc/vitastor/vitastor.conf` or in +the monitor command line). If there are multiple matching addresses, it also +checks `antietcd_port` and antietcd is started for address with matching port. +By default, antietcd accepts connection on the selected IP address, but it +can also be overridden manually in the `antietcd_ip` option. + +When antietcd is started, monitor stores cluster metadata itself and exposes +a etcd-compatible REST API. On disk, these metadata are stored in +`/var/lib/vitastor/mon_2379.json.gz` (can be overridden in antietcd_data_file +or antietcd_data_dir options). All other antietcd parameters +(see [here](https://git.yourcmc.ru/vitalif/antietcd/)) except node_id, +cluster, cluster_key, persist_filter, stale_read can also be set in +Vitastor configuration with `antietcd_` prefix. + ## enable_prometheus - Type: boolean - Default: true -Enable built-in Prometheus metrics exporter +Enable built-in Prometheus metrics exporter at mon_http_port (8060 by default). + +Note that only the active (master) monitor exposes metrics, others return +HTTP 503. So you should add all monitor URLs to your Prometheus job configuration. ## mon_http_port diff --git a/docs/config/monitor.ru.md b/docs/config/monitor.ru.md index bac6b140..17279d31 100644 --- a/docs/config/monitor.ru.md +++ b/docs/config/monitor.ru.md @@ -8,6 +8,7 @@ Данные параметры используются только мониторами Vitastor. +- [use_antietcd](#use_antietcd) - [enable_prometheus](#enable_prometheus) - [mon_http_port](#mon_http_port) - [mon_http_ip](#mon_http_ip) @@ -24,12 +25,40 @@ - [placement_levels](#placement_levels) - [use_old_pg_combinator](#use_old_pg_combinator) +## use_antietcd + +- Тип: булево (да/нет) +- Значение по умолчанию: false + +Включить экспериментальный встроенный заменитель etcd (кластерную БД ключ-значение): +[antietcd](https://git.yourcmc.ru/vitalif/antietcd/). + +Если параметр установлен в true, монитор запускает antietcd автоматически, +если обнаруживает сетевой интерфейс с одним из адресов, указанных в опции +конфигурации `etcd_address` (в `/etc/vitastor/vitastor.conf` или в опциях +командной строки монитора). Если таких адресов несколько, также проверяется +опция `antietcd_port` и antietcd запускается для адреса с соответствующим +портом. По умолчанию antietcd принимает подключения по выбранному совпадающему +IP, но его также можно определить вручную опцией `antietcd_ip`. + +При запуске antietcd монитор сам хранит центральные метаданные кластера и +выставляет etcd-совместимое REST API. На диске эти метаданные хранятся в файле +`/var/lib/vitastor/mon_2379.json.gz` (можно переопределить параметрами +antietcd_data_file или antietcd_data_dir). Все остальные параметры antietcd +(смотрите [по ссылке](https://git.yourcmc.ru/vitalif/antietcd/)), за исключением +node_id, cluster, cluster_key, persist_filter, stale_read также можно задавать +в конфигурации Vitastor с префиксом `antietcd_`. + ## enable_prometheus - Тип: булево (да/нет) - Значение по умолчанию: true -Включить встроенный Prometheus-экспортер метри +Включить встроенный Prometheus-экспортер метрик на порту mon_http_port (по умолчанию 8060). + +Обратите внимание, что метрики выставляет только активный (главный) монитор, остальные +возвращают статус HTTP 503, поэтому вам следует добавлять адреса всех мониторов +в задание по сбору метрик Prometheus. ## mon_http_port diff --git a/docs/config/src/monitor.yml b/docs/config/src/monitor.yml index 46b93e79..8d3711bd 100644 --- a/docs/config/src/monitor.yml +++ b/docs/config/src/monitor.yml @@ -1,8 +1,58 @@ +- name: use_antietcd + type: bool + default: false + info: | + Enable experimental built-in etcd replacement (clustered key-value database): + [antietcd](https://git.yourcmc.ru/vitalif/antietcd/). + + When set to true, monitor runs internal antietcd automatically if it finds + a network interface with an IP address matching one of addresses in the + `etcd_address` configuration option (in `/etc/vitastor/vitastor.conf` or in + the monitor command line). If there are multiple matching addresses, it also + checks `antietcd_port` and antietcd is started for address with matching port. + By default, antietcd accepts connection on the selected IP address, but it + can also be overridden manually in the `antietcd_ip` option. + + When antietcd is started, monitor stores cluster metadata itself and exposes + a etcd-compatible REST API. On disk, these metadata are stored in + `/var/lib/vitastor/mon_2379.json.gz` (can be overridden in antietcd_data_file + or antietcd_data_dir options). All other antietcd parameters + (see [here](https://git.yourcmc.ru/vitalif/antietcd/)) except node_id, + cluster, cluster_key, persist_filter, stale_read can also be set in + Vitastor configuration with `antietcd_` prefix. + info_ru: | + Включить экспериментальный встроенный заменитель etcd (кластерную БД ключ-значение): + [antietcd](https://git.yourcmc.ru/vitalif/antietcd/). + + Если параметр установлен в true, монитор запускает antietcd автоматически, + если обнаруживает сетевой интерфейс с одним из адресов, указанных в опции + конфигурации `etcd_address` (в `/etc/vitastor/vitastor.conf` или в опциях + командной строки монитора). Если таких адресов несколько, также проверяется + опция `antietcd_port` и antietcd запускается для адреса с соответствующим + портом. По умолчанию antietcd принимает подключения по выбранному совпадающему + IP, но его также можно определить вручную опцией `antietcd_ip`. + + При запуске antietcd монитор сам хранит центральные метаданные кластера и + выставляет etcd-совместимое REST API. На диске эти метаданные хранятся в файле + `/var/lib/vitastor/mon_2379.json.gz` (можно переопределить параметрами + antietcd_data_file или antietcd_data_dir). Все остальные параметры antietcd + (смотрите [по ссылке](https://git.yourcmc.ru/vitalif/antietcd/)), за исключением + node_id, cluster, cluster_key, persist_filter, stale_read также можно задавать + в конфигурации Vitastor с префиксом `antietcd_`. - name: enable_prometheus type: bool default: true - info: Enable built-in Prometheus metrics exporter - info_ru: Включить встроенный Prometheus-экспортер метри + info: | + Enable built-in Prometheus metrics exporter at mon_http_port (8060 by default). + + Note that only the active (master) monitor exposes metrics, others return + HTTP 503. So you should add all monitor URLs to your Prometheus job configuration. + info_ru: | + Включить встроенный Prometheus-экспортер метрик на порту mon_http_port (по умолчанию 8060). + + Обратите внимание, что метрики выставляет только активный (главный) монитор, остальные + возвращают статус HTTP 503, поэтому вам следует добавлять адреса всех мониторов + в задание по сбору метрик Prometheus. - name: mon_http_port type: int default: 8060 diff --git a/docs/intro/features.en.md b/docs/intro/features.en.md index 3b83f853..ed6976e7 100644 --- a/docs/intro/features.en.md +++ b/docs/intro/features.en.md @@ -34,6 +34,8 @@ - [Client write-back cache](../config/client.en.md#client_enable_writeback) - [Intelligent recovery auto-tuning](../config/osd.en.md#recovery_tune_interval) - [Clustered file system](../usage/nfs.en.md#vitastorfs) +- [Experimental internal etcd replacement - antietcd](../config/monitor.en.md#use_antietcd) +- [Built-in Prometheus metric exporter](../config/monitor.en.md#enable_prometheus) ## Plugins and tools diff --git a/docs/intro/features.ru.md b/docs/intro/features.ru.md index 2be4213f..58c5dd26 100644 --- a/docs/intro/features.ru.md +++ b/docs/intro/features.ru.md @@ -36,6 +36,8 @@ - [Буферизация записи на стороне клиента](../config/client.ru.md#client_enable_writeback) - [Интеллектуальная автоподстройка скорости восстановления](../config/osd.ru.md#recovery_tune_interval) - [Кластерная файловая система](../usage/nfs.ru.md#vitastorfs) +- [Экспериментальная встроенная замена etcd - antietcd](../config/monitor.ru.md#use_antietcd) +- [Встроенный Prometheus-экспортер метрик](../config/monitor.ru.md#enable_prometheus) ## Драйверы и инструменты