Skip to content

Resource nubes_clickhouse · v1.0.0 · Service ID: 120 · Service Name: ClickHouse

Manual · Create params · Modify params · Output params · Operations · Example

Create params

Параметр Тип Обязательный По умолчанию Описание Ограничения
startup_configuration map-fixed да Развернуть ↓
cluster_configuration map-fixed да Развернуть ↓
access_configuration map-fixed да Развернуть ↓
clickhouse_keeper_configuration map-fixed да Развернуть ↓
clickhouse_configuration map-fixed да Развернуть ↓
backup_configuration map-fixed да Развернуть ↓
autoscale_configuration map-fixed да Развернуть ↓
clickhouse_files_configuration array-map-fixed Формат:
- path: somethings3.xml
xmlConfig: '<clickhouse>......</clickhouse>'

startupConfiguration (map-fixed)

Code Type Required Default Description Constraints
resource_realm string yes k8s-4-ext-nubes-ru Кластер Kubernetes, на котором будет развернут экземпляр Допустимые значения: k8s-4-ext-nubes-ru

clusterConfiguration (map-fixed)

Code Type Required Default Description Constraints
cpu integer yes 1000 Указывается в Milicores
1000 Mili == 1 Ядро
memory integer yes 2048 Указывается в Megabytes
replicas integer yes 1 Допустимые значения: 1, 3, 5, 7
shards integer yes 1 Шард - это часть данных, разделенная на разные узлы (серверы) для горизонтального масштабирования и обработки больших объемов информации.
Реплика - это точная копия данных внутри одного шарда
Допустимые значения: 1, 2, 3
disk integer yes 10 Указывается в GIGAbytes

accessConfiguration (map-fixed)

Code Type Required Default Description Constraints
master_ip_space string yes Из какого Ip-Space резервировать внешний IP
Список предоставляется из Организации, в котором развёрнута ресурсная платформа
master_access_list json yes [] Необходимо настраивать, когда зарезервирован внешний адрес
Если передан пустой массив, доступ выделяется всем

clickhouseKeeperConfiguration (map-fixed)

Code Type Required Default Description Constraints
cpu integer yes 500 Указывается в Milicores
1000 Mili == 1 Ядро
memory integer yes 512 Указывается в Megabytes
replicas integer yes 0 Если указан 0, то инстансы ClickHouse Keeper развёрнуты не будут Допустимые значения: 0, 1, 3

clickhouseConfiguration (map-fixed)

Code Type Required Default Description Constraints
version string yes 25.10 Допустимые значения: 25.10

backupConfiguration (map-fixed)

Code Type Required Default Description Constraints
s3_uid uuid yes Экземпляр S3 обязателен
retain integer yes 7
schedule string yes 0 0 * * * regex=^((((\d+,)+\d+|(\d+(\/|-|#)\d+)|(\d+L?)|(*(\/\d+)?)|(L(-\d+)?)|(\?)|([A-Z]{3}(-[A-Z]{3})?)) ?){5,7})|(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)$

autoscaleConfiguration (map-fixed)

Code Type Required Default Description Constraints
enabled boolean yes false Включает автоскейлинг PV. При включении параметра необходимо настроить autoScalePercentage и autoScaleTechWindow. Алерт при срабатывании вызывает modify у текущей услуги Допустимые значения: false, true
schedule integer yes 0 Требует включения autoScale. Окно обновления (пока не реализовано). Указывается час в виде Integer (0 / 5 / 12 / 23) Допустимые значения: 0, 5, 12, 23
quota integer yes 100 До какого размера возможно увеличивать диск, когда включен Autoscale
percent integer yes 10 Требует включения autoScale. Позволяет указать в процентах расширение от текущего макс объема
Минимальный размер на который расширяется - 1Gb
Допустимые значения: 10, 15, 20

clickhouseFilesConfiguration (map-fixed)

Code Type Required Default Description Constraints
path string yes something.xml regex=^[a-zA-Z0-9]+.xml$
xml_config string yes <clickhouse></clickhouse> Предварительно xml необходимо отформатировать через
<br/>$ tr -d &#39;\n \t&#39; &amp;lt; input.xml &amp;gt; output.xml<br/>

Позже будет исправлено

Важно: поведение при destroy

По умолчанию: suspend_on_destroy = True, adopt_existing_on_create = False.

При terraform destroy или удалении ресурса из манифеста: - suspend_on_destroy=true — инстанс переводится в Suspend (не удаляется). - suspend_on_destroy=false — Terraform удаляет ресурс только из state.

При apply флаг adopt_existing_on_create работает как авто-import: - false — если ресурс уже есть, будет ошибка. - true — Terraform может взять существующий инстанс под управление.

Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.