Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Configuration examples #102

Merged
merged 28 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5331adb
add example
AleksZimin Oct 22, 2024
93c3cea
some fixes
AleksZimin Oct 26, 2024
be9f5be
improve logging
AleksZimin Oct 26, 2024
55cdb3f
add some cases
AleksZimin Oct 27, 2024
2d91721
some logs improvement
AleksZimin Oct 30, 2024
26b3764
some fixes
AleksZimin Oct 30, 2024
006596b
some fixes
AleksZimin Oct 30, 2024
70ec888
update go ver
AleksZimin Oct 30, 2024
3a288ce
fix
AleksZimin Nov 4, 2024
d6787b9
add some docs
AleksZimin Nov 4, 2024
6b3e615
add set
AleksZimin Nov 9, 2024
8fcd857
revert all fixes to code
AleksZimin Nov 24, 2024
118600c
fixes after review
AleksZimin Nov 24, 2024
64b40d7
add eng translate for faq
AleksZimin Nov 24, 2024
a5b881c
add translate for LAYOUTS
AleksZimin Nov 24, 2024
d7b1ce4
Update formatting and style in config examples docs
maxinsky Dec 11, 2024
1772422
docs: review module sds-node-configurator usage scenarios
Dec 25, 2024
3bed81a
[docs] Add info about LVMVolumeGroup for sds-node-configurator
Jan 16, 2025
7359692
Update docs/LAYOUTS_RU.md
denmaloyreb Jan 16, 2025
c457a5a
Update docs/LAYOUTS_RU.md
denmaloyreb Jan 16, 2025
3d72df4
[docs] Add info about LVMVolumeGroup (sds-node-configurator)
Jan 16, 2025
00f31a0
Update docs/FAQ_RU.md
z9r5 Jan 17, 2025
94dc446
Translate latest edits and diagram
maxinsky Jan 21, 2025
15c0b46
Translate edits to English
maxinsky Jan 21, 2025
05f38c2
Updates
z9r5 Jan 22, 2025
a53a825
Fixed indentation for the spec.actualVGNameOnTheNode in the LVMVolume…
Nov 21, 2024
3fde8b7
Merge branch 'main' into configuration-examples
z9r5 Jan 22, 2025
adb1600
merge main
AleksZimin Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,33 @@ The controller will then stop tracking the selected `Volume Group` and delete th
This can happen if you created the `LVM Volume Group` using the `LVMVolumeGroup` resource, in which case the controller will automatically add this LVM tag to the created `LVM Volume Group`. This is also possible if the `Volume Group` or its `Thin-pool` already had the `linstor-*` LVM tag of the `linstor` module.

When you switch from the `linstor` module to the `sds-node-configurator` and `sds-drbd` modules, the `linstor-*` LVM tags are automatically replaced with the `storage.deckhouse.io/enabled=true` LVM tag in the `Volume Group`. This way, the `sds-node-configurator` gains control over these `Volume Groups`.

## How to use the `LVMVolumeGroupSet` resource to create `LVMVolumeGroup`?

To create an `LVMVolumeGroup` using the `LVMVolumeGroupSet` resource, you need to specify node selectors and a template for the `LVMVolumeGroup` resources in the `LVMVolumeGroupSet` specification. Currently, only the `PerNode` strategy is supported. With this strategy, the controller will create one `LVMVolumeGroup` resource from the template for each node that matches the selector.

Example of an `LVMVolumeGroupSet` specification:

```yaml
apiVersion: storage.deckhouse.io/v1alpha1
kind: LVMVolumeGroupSet
metadata:
name: my-lvm-volume-group-set
labels:
my-label: my-value
spec:
strategy: PerNode
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker: ""
lvmVolumeGroupTemplate:
metadata:
labels:
my-label-for-lvg: my-value-for-lvg
spec:
type: Local
blockDeviceSelector:
matchLabels:
status.blockdevice.storage.deckhouse.io/model: <model>
actualVGNameOnTheNode: <actual-vg-name-on-the-node>
```
32 changes: 32 additions & 0 deletions docs/FAQ_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,35 @@ vgchange myvg-0 --deltag storage.deckhouse.io/enabled=true
Это возможно в случае, если вы создавали `LVM Volume Group` через ресурс `LVMVolumeGroup` (в таком случае контроллер автоматически вешает данный LVM-тег на созданную `LVM Volume Group`). Либо на данной `Volume Group` или ее `Thin-pool` был LVM-тег модуля `linstor` — `linstor-*`.

При миграции с встроенного модуля `linstor` на модули `sds-node-configurator` и `sds-drbd` автоматически происходит изменение LVM-тегов `linstor-*` на LVM-тег `storage.deckhouse.io/enabled=true` в `Volume Group`. Таким образом, управление этими `Volume Group` передается модулю `sds-node-configurator`.

## Как использовать ресурс `LVMVolumeGroupSet` для создания `LVMVolumeGroup`?

Для создания `LVMVolumeGroup` с помощью `LVMVolumeGroupSet` необходимо указать в спецификации `LVMVolumeGroupSet` селекторы для нод и шаблон для создаваемых ресурсов `LVMVolumeGroup`. На данный момент поддерживается только стратегия `PerNode`, при которой контроллер создаст по одному ресуру `LVMVolumeGroup` из шаблона для каждой ноды, удовлетворяющей селектору.
z9r5 marked this conversation as resolved.
Show resolved Hide resolved

Пример спецификации `LVMVolumeGroupSet`:

```yaml
apiVersion: storage.deckhouse.io/v1alpha1
kind: LVMVolumeGroupSet
metadata:
name: my-lvm-volume-group-set
labels:
my-label: my-value
spec:
strategy: PerNode
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker: ""
lvmVolumeGroupTemplate:
metadata:
labels:
my-label-for-lvg: my-value-for-lvg
spec:
type: Local
blockDeviceSelector:
matchLabels:
status.blockdevice.storage.deckhouse.io/model: <model>
actualVGNameOnTheNode: <actual-vg-name-on-the-node>


```
1,055 changes: 1,055 additions & 0 deletions docs/LAYOUTS.md

Large diffs are not rendered by default.

754 changes: 754 additions & 0 deletions docs/LAYOUTS_RU.md
AleksZimin marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions docs/images/sds-node-configurator-scenaries-ru.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startuml

!theme bluegray
skinparam DefaultFontSize 16
skinparam handwritten false
skinparam ArrowFontStyle italic
skinparam DefaultTextAlignment center
skinparam PartitionFontColor grey
skinparam backgroundColor transparent

start

:Выбор сценария;

if (Выбран сценарий «Полное зеркало» (рекомендованный)?) then (да)

group "Сценарий Полное зеркало"
:Формирование зеркала
из дисков целиком;
:Создание VG на зеркале;
:Создание LV в VG;
:Установка ОС на LV;
:Установка тега storage.deckhouse.io/enabled=true
на VG;
end group

else (нет)

group "Сценарий Частичное зеркало"
:Создание двух разделов
на каждом диске;
:Формирование зеркала
из первых разделов дисков;
:Создание VG на зеркале;
:Создание LV в VG на зеркале;
:Установка ОС на LV в VG на зеркале;
:Установка тега storage.deckhouse.io/enabled=true
на VG на зеркале;
:Создание VG из вторых разделов каждого диска;
:Установка тега storage.deckhouse.io/enabled=true
на VG из вторых разделов;
end group

endif

:Добавление узла в кластер Deckhouse;
:Настройка модулей SDS;

stop

@enduml
Binary file added docs/images/sds-node-configurator-scenaries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions docs/images/sds-node-configurator-scenaries.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startuml

!theme bluegray
skinparam DefaultFontSize 16
skinparam handwritten false
skinparam ArrowFontStyle italic
skinparam DefaultTextAlignment center
skinparam PartitionFontColor grey
skinparam backgroundColor transparent

start

:Выбор сценария;

if (Выбран сценарий «Полное зеркало» (рекомендованный)?) then (да)

group "Сценарий Полное зеркало"
:Формирование зеркала
из дисков целиком;
:Создание VG на зеркале;
:Создание LV в VG;
:Установка ОС на LV;
:Установка тега storage.deckhouse.io/enabled=true
на VG;
end group

else (нет)

group "Сценарий Частичное зеркало"
:Создание двух разделов
на каждом диске;
:Формирование зеркала
из первых разделов дисков;
:Создание VG на зеркале;
:Создание LV в VG на зеркале;
:Установка ОС на LV в VG на зеркале;
:Установка тега storage.deckhouse.io/enabled=true
на VG на зеркале;
:Создание VG из вторых разделов каждого диска;
:Установка тега storage.deckhouse.io/enabled=true
на VG из вторых разделов;
end group

endif

:Добавление узла в кластер Deckhouse;
:Настройка модулей SDS;

stop

@enduml
Loading