Skip to content

Commit 1f4ae4e

Browse files
fl64Dmitry Prytkovhayer969prismagoddiafour
authored
docs: update due v1.2.0 (#1564)
Update due v1.2.0 --------- Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com> Signed-off-by: Dmitry Prytkov <dmitry.prytkov@flant.com> Signed-off-by: Vladislav Panfilov <vladislav.panfilov@flant.com> Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com> Signed-off-by: Vladislav Panfilov <97229646+prismagod@users.noreply.github.com> Co-authored-by: Dmitry Prytkov <dmitry.prytkov@flant.com> Co-authored-by: Dmitry Prytkov <74240854+hayer969@users.noreply.github.com> Co-authored-by: Vladislav Panfilov <vladislav.panfilov@flant.com> Co-authored-by: Ivan Mikheykin <ivan.mikheykin@flant.com> Co-authored-by: Vladislav Panfilov <97229646+prismagod@users.noreply.github.com>
1 parent f33a970 commit 1f4ae4e

10 files changed

+1297
-814
lines changed

docs/ADMIN_GUIDE.md

Lines changed: 82 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,29 @@ The `.spec.settings.dvcr.storage` block configures a persistent volume for stori
6262
- `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`: StorageClass name (for example, `sds-replicated-thin-r1`).
6363

6464
{{< alert level="warning" >}}
65-
The storage serving this storage class (`.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`) must be accessible on the nodes where DVCR is running (system nodes, or worker nodes if there are no system nodes).
65+
Migrating images when changing the `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName` parameter value is not supported.
66+
67+
When you change the DVCR StorageClass, all images stored in DVCR will be lost.
68+
{{< /alert >}}
69+
70+
To change the DVCR StorageClass, perform the following steps:
71+
72+
1. Change the value of the [`.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`](/modules/virtualization/configuration.html#parameters-dvcr-storage-persistentvolumeclaim-storageclassname) parameter.
73+
74+
1. Delete the old PVC for DVCR using the following command:
75+
76+
```shell
77+
d8 k -n d8-virtualization delete pvc -l app=dvcr
78+
```
79+
80+
1. Restart DVCR by running the following command:
81+
82+
```shell
83+
d8 k -n d8-virtualization rollout restart deployment dvcr
84+
```
85+
86+
{{< alert level="warning" >}}
87+
The storage that serves the `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName` StorageClass must be accessible from the nodes where DVCR runs (system nodes, or worker nodes if there are no system nodes).
6688
{{< /alert >}}
6789

6890
**Network settings**
@@ -82,7 +104,7 @@ spec:
82104

83105
The first and the last subnet address are reserved and not available for use.
84106

85-
{{< alert level="warning">}}
107+
{{< alert level="warning" >}}
86108
The subnets in the `.spec.settings.virtualMachineCIDRs` block must not overlap with cluster node subnets, services subnet, or pods subnet (`podCIDR`).
87109

88110
It is forbidden to delete subnets if addresses from them have already been issued to virtual machines.
@@ -134,18 +156,18 @@ Where:
134156

135157
**Security Event Audit**
136158

137-
{{< alert level="warning">}}
159+
{{< alert level="warning" >}}
138160
Not available in CE edition.
139-
{{{< /alert >}}
161+
{{< /alert >}}
140162

141-
{{{< alert level="warning">}}
163+
{{< alert level="warning" >}}
142164
To set up auditing, the following modules must be enabled:
143165

144166
- `log-shipper`,
145167
- `runtime-audit-engine`.
146-
{{{< /alert >}}
168+
{{< /alert >}}
147169

148-
To enable security event auditing, set the module’s `.spec.settings.audit.enabled` parameter to` true`:
170+
To enable security event auditing, set the module’s `.spec.settings.audit.enabled` parameter to `true`:
149171

150172
```yaml
151173
spec:
@@ -417,15 +439,63 @@ How to perform the operation in the web interface:
417439
- Click the "Create" button.
418440
- Wait until the image changes to `Ready` status.
419441

442+
### Cleaning up image storage
443+
444+
Over time, the creation and deletion of ClusterVirtualImage, VirtualImage, and VirtualDisk resources leads to the accumulation
445+
of outdated images in the intra-cluster storage. Scheduled garbage collection is implemented to keep the storage up to
446+
date, but this feature is disabled by default.
447+
448+
```yaml
449+
apiVersion: deckhouse.io/v1alpha1
450+
kind: ModuleConfig
451+
metadata:
452+
name: virtualization
453+
spec:
454+
# ...
455+
settings:
456+
dvcr:
457+
gc:
458+
schedule: "0 20 * * *"
459+
# ...
460+
```
461+
462+
While garbage collection is running, the storage is switched to read-only mode, and all resources created during this time will wait for the cleanup to finish.
463+
464+
To check for outdated images in the storage, you can run the following command:
465+
466+
```bash
467+
d8 k -n d8-virtualization exec deploy/dvcr -- dvcr-cleaner gc check
468+
```
469+
470+
It prints information about the storage status and a list of outdated images that can be deleted.
471+
472+
```console
473+
Found 2 cvi, 5 vi, 1 vd manifests in registry
474+
Found 1 cvi, 5 vi, 11 vd resources in cluster
475+
Total Used Avail Use%
476+
36.3GiB 13.1GiB 22.4GiB 39%
477+
Images eligible for cleanup:
478+
KIND NAMESPACE NAME
479+
ClusterVirtualImage debian-12
480+
VirtualDisk default debian-10-root
481+
VirtualImage default ubuntu-2204
482+
```
483+
420484
## Virtual machine classes
421485

422486
The VirtualMachineClass resource is designed for centralized configuration of preferred virtual machine settings. It allows you to define CPU instructions, configuration policies for CPU and memory resources for virtual machines, as well as define ratios of these resources. In addition, VirtualMachineClass provides management of virtual machine placement across platform nodes. This allows administrators to effectively manage virtualization platform resources and optimally place virtual machines on platform nodes.
423487

424488
During installation, a single VirtualMachineClass `generic` resource is automatically created. It represents a universal CPU type based on the older, but widely supported, Nehalem architecture. This enables running VMs on any nodes in the cluster and allows live migration.
489+
490+
The administrator can modify the parameters of the `generic` VirtualMachineClass resource (except for the `.spec.cpu` section) or delete this resource.
491+
425492
{{< alert level="info" >}}
426-
It is recommended that you create at least one VirtualMachineClass resource in the cluster with the `Discovery` type immediately after all nodes are configured and added to the cluster. This allows virtual machines to utilize a generic CPU with the highest possible CPU performance considering the CPUs on the cluster nodes. This allows the virtual machines to utilize the maximum CPU capabilities and migrate seamlessly between cluster nodes if necessary.
427493

428-
For a configuration example, see [vCPU Discovery configuration example](#vcpu-discovery-configuration-example)
494+
It is not recommended to use the `generic` VirtualMachineClass for running workloads in production environments, since this class corresponds to a CPU with the smallest feature set.
495+
496+
After all nodes are configured and added to the cluster, it is recommended to create at least one VirtualMachineClass resource of the `Discovery` type. This ensures that the best available CPU configuration compatible with all CPUs in your cluster is selected, allows virtual machines to make full use of CPU capabilities, and enables seamless migration between nodes.
497+
498+
For a configuration example, see [vCPU Discovery configuration example](#vcpu-discovery-configuration-example).
429499
{{< /alert >}}
430500

431501
To list all VirtualMachineClass resources, run the following command:
@@ -529,7 +599,7 @@ Next, let's take a closer look at the setting blocks.
529599

530600
The `.spec.cpu` block allows you to specify or configure the vCPU for the VM.
531601

532-
{{< alert level="warning">}}
602+
{{< alert level="warning" >}}
533603
Settings in the `.spec.cpu` block cannot be changed after the VirtualMachineClass resource is created.
534604
{{< /alert >}}
535605

@@ -704,7 +774,7 @@ Invalid option (overlapping values):
704774
max: 8
705775
```
706776

707-
{{< alert level = "warning" >}}
777+
{{< alert level="warning" >}}
708778
Rule: Each new range must start with a value that immediately follows the max of the previous range.
709779
{{< /alert >}}
710780

@@ -717,7 +787,7 @@ Additional requirements can be specified for each range of cores:
717787

718788
2. Allowed fractions of cores (`coreFractions`) — a list of allowed values (for example, [25, 50, 100] for 25%, 50%, or 100% core usage).
719789

720-
{{< alert level = "warning" >}}
790+
{{< alert level="warning" >}}
721791
Important: For each range of cores, be sure to specify:
722792

723793
- Either memory (or `memoryPerCore`),

docs/ADMIN_GUIDE.ru.md

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,29 @@ spec:
6262
- `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName` — класс хранения (например, `sds-replicated-thin-r1`).
6363

6464
{{< alert level="warning" >}}
65-
Хранилище, обслуживающее данный класс хранения (`.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`), должно быть доступно на узлах, где запускается DVCR (system-узлы, либо worker-узлы, при отсутствии system-узлов).
65+
Перенос образов при изменении значения параметра `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName` не поддерживается.
66+
67+
При смене StorageClass DVCR все образы, хранящиеся в DVCR, будут утеряны.
68+
{{< /alert >}}
69+
70+
Для изменения StorageClass DVCR выполните следующие действия:
71+
72+
1. Измените значение [параметра `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`](/modules/virtualization/configuration.html#parameters-dvcr-storage-persistentvolumeclaim-storageclassname).
73+
74+
1. Удалите старый PVC для DVCR с помощью следующей команды:
75+
76+
```shell
77+
d8 k -n d8-virtualization delete pvc -l app=dvcr
78+
```
79+
80+
1. Перезапустите DVCR, выполнив следующую команду:
81+
82+
```shell
83+
d8 k -n d8-virtualization rollout restart deployment dvcr
84+
```
85+
86+
{{< alert level="warning" >}}
87+
Хранилище, обслуживающее данный класс хранения `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`, должно быть доступно на узлах, где запускается DVCR (system-узлы, либо worker-узлы, при отсутствии system-узлов).
6688
{{< /alert >}}
6789

6890
**Сетевые настройки**
@@ -420,6 +442,48 @@ d8 k describe cvi ubuntu-22-04
420442
- Нажмите кнопку «Создать».
421443
- Дождитесь пока образ перейдет в состояние `Готов`.
422444

445+
### Очистка хранилища образов
446+
447+
Со временем создание и удаление ресурсов ClusterVirtualImage, VirtualImage, VirtualDisk приводит к накоплению
448+
неактуальных образов во внутрикластерном хранилище. Для поддержания хранилища в актуальном состоянии предусмотрена сборка мусора по расписанию.
449+
По умолчанию эта функция отключена. Для включения очистки нужно задать расписание в настройках модуля в ресурсе ModuleConfig/virtualization:
450+
451+
```yaml
452+
apiVersion: deckhouse.io/v1alpha1
453+
kind: ModuleConfig
454+
metadata:
455+
name: virtualization
456+
spec:
457+
# ...
458+
settings:
459+
dvcr:
460+
gc:
461+
schedule: "0 20 * * *"
462+
# ...
463+
```
464+
465+
На время работы сборки мусора хранилище переводится в режим «только чтение». Все создаваемые в это время ресурсы будут ожидать окончания очистки.
466+
467+
Для проверки наличия неактуальных образов в хранилище можно выполнить такую команду:
468+
469+
```bash
470+
d8 k -n d8-virtualization exec deploy/dvcr -- dvcr-cleaner gc check
471+
```
472+
473+
На экран будут выведены сведения о состоянии хранилища и список неактуальных образов, которые могут быть удалены.
474+
475+
```console
476+
Found 2 cvi, 5 vi, 1 vd manifests in registry
477+
Found 1 cvi, 5 vi, 11 vd resources in cluster
478+
Total Used Avail Use%
479+
36.3GiB 13.1GiB 22.4GiB 39%
480+
Images eligible for cleanup:
481+
KIND NAMESPACE NAME
482+
ClusterVirtualImage debian-12
483+
VirtualDisk default debian-10-root
484+
VirtualImage default ubuntu-2204
485+
```
486+
423487
## Классы виртуальных машин
424488

425489
Ресурс VirtualMachineClass предназначен для централизованной конфигурации предпочтительных параметров виртуальных машин.
@@ -429,11 +493,15 @@ d8 k describe cvi ubuntu-22-04
429493

430494
Во время установки автоматически создаётся ресурс VirtualMachineClass с именем `generic`. Он представляет собой универсальный тип процессора на основе более старой, но широко поддерживаемой архитектуры Nehalem. Это позволяет запускать виртуальные машины на любых узлах кластера и поддерживает их живую миграцию.
431495

496+
Администратор может изменять параметры ресурса VirtualMachineClass `generic` (за исключением секции `.spec.cpu`), либо удалить данный ресурс.
497+
432498
{{< alert level="info" >}}
433-
Рекомендуется создать как минимум один ресурс VirtualMachineClass в кластере с типом `Discovery` сразу после того, как все узлы будут настроены и добавлены в кластер.
434-
Это позволит использовать в виртуальных машинах универсальный процессор с максимально возможными характеристиками с учетом CPU на узлах кластера, что позволит виртуальным машинам использовать максимум возможностей CPU и при необходимости беспрепятственно осуществлять миграцию между узлами кластера.
435499

436-
Пример настройки смотрите в разделе [Пример конфигурации vCPU Discovery](#пример-конфигурации-vcpu-discovery)
500+
Не рекомендуется использовать VirtualMachineClass `generic` для запуска рабочих нагрузок в production-средах, поскольку данный класс соответствует процессору с наименьшей функциональностью.
501+
502+
Рекомендуется после добавления и настройки всех узлов в кластере создать хотя бы один ресурс VirtualMachineClass с типом `Discovery`. Это обеспечит выбор наилучшей доступной конфигурации процессора с учётом всех CPU в вашем кластере, позволит виртуальным машинам максимально эффективно использовать возможности процессоров и обеспечит беспрепятственную миграцию между узлами.
503+
504+
Пример настройки смотрите в разделе [Пример конфигурации vCPU Discovery](#пример-конфигурации-vcpu-discovery).
437505
{{< /alert >}}
438506

439507
Чтобы вывести список ресурсов VirtualMachineClass, выполните следующую команду:

0 commit comments

Comments
 (0)