Skip to content

Commit

Permalink
### State
Browse files Browse the repository at this point in the history
    ---

    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.

    ❗ Loss of `.geninstate` directory or `latest` state, `genin build` command recreates
    configuration with new state
    ❗ `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:
        ```
  • Loading branch information
Alexandr Sorokin committed Apr 24, 2024
1 parent 744f5f2 commit 1773b20
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` пересоздаст конфигурацию с новым состоянием

---

### Редактирование конфигурации кластера

---
Expand Down

0 comments on commit 1773b20

Please sign in to comment.