From 1773b2043f5f60e9613e8a3f25ef4c44ee367c7e Mon Sep 17 00:00:00 2001 From: Alexandr Sorokin Date: Wed, 24 Apr 2024 15:33:58 +0300 Subject: [PATCH] ### State --- After each execution of the `genin build` command, the cluster state will be generated. By default, the state will be stored in the `.geninstate` directory. For all cluster changes, Genin is based on the "latest" state and after updating it overwrites it. :exclamation: Loss of `.geninstate` directory or `latest` state, `genin build` command recreates configuration with new state :exclamation: `genin build --recreate` recreates the configuration with a new state --- The `--fd-as-zone` option takes the value 1..255, which indicates at what level nesting `hosts` contains the required name `zone` For example, when configuring: ```yaml hosts: - name: region hosts: - name: datacenter hosts: - name: host ``` Team: ```shell genin build --fd-as-zone=2 ``` We get: ```yaml hosts: role: zone: datacenter config: ``` --- README.md | 16 ++++++++++++++++ README.ru.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index d3ca033..2c3abc5 100644 --- a/README.md +++ b/README.md @@ -312,6 +312,22 @@ launched `Genin`. Now we can set up the cluster: ansible-playbook -i inventory.yaml playbook.yaml ``` +### State + +--- + +After each execution of the `genin build` command, the cluster state will be generated. +By default, the state will be stored in the `.geninstate` directory. +For all cluster changes, Genin is based on the "latest" state and +after updating it overwrites it. + +:exclamation: Loss of `.geninstate` directory or `latest` state, `genin build` command recreates +configuration with new state + +:exclamation: `genin build --recreate` recreates the configuration with a new state + +--- + --- ### Editing the cluster configuration diff --git a/README.ru.md b/README.ru.md index 4ec842b..8f5871f 100644 --- a/README.ru.md +++ b/README.ru.md @@ -331,6 +331,22 @@ ansible-playbook -i inventory.yaml playbook.yaml --- +### Состояние + +--- + +После каждого выполнения команды `genin build` будет сформировано состояние кластера. +По умолчанию состояние будет храниться в директории `.geninstate`. +При всех последующих обновлениях кластера `Genin` основывается на состоянии `latest` и +после обновления перезапишет его. + +:exclamation: Потеря директории `.geninstate` или состояния `latest` команда `genin build` пересоздаст +конфигруацию с новым состоянием + +:exclamation: `genin build --recreate` пересоздаст конфигурацию с новым состоянием + +--- + ### Редактирование конфигурации кластера ---