You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ADMIN_GUIDE.md
+82-12Lines changed: 82 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,29 @@ The `.spec.settings.dvcr.storage` block configures a persistent volume for stori
62
62
- `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`: StorageClass name (for example, `sds-replicated-thin-r1`).
63
63
64
64
{{< 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).
66
88
{{< /alert >}}
67
89
68
90
**Network settings**
@@ -82,7 +104,7 @@ spec:
82
104
83
105
The first and the last subnet address are reserved and not available for use.
84
106
85
-
{{< alert level="warning">}}
107
+
{{< alert level="warning">}}
86
108
The subnets in the `.spec.settings.virtualMachineCIDRs` block must not overlap with cluster node subnets, services subnet, or pods subnet (`podCIDR`).
87
109
88
110
It is forbidden to delete subnets if addresses from them have already been issued to virtual machines.
@@ -134,18 +156,18 @@ Where:
134
156
135
157
**Security Event Audit**
136
158
137
-
{{< alert level="warning">}}
159
+
{{< alert level="warning">}}
138
160
Not available in CE edition.
139
-
{{{< /alert >}}
161
+
{{< /alert >}}
140
162
141
-
{{{< alert level="warning">}}
163
+
{{< alert level="warning">}}
142
164
To set up auditing, the following modules must be enabled:
143
165
144
166
- `log-shipper`,
145
167
- `runtime-audit-engine`.
146
-
{{{< /alert >}}
168
+
{{< /alert >}}
147
169
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`:
149
171
150
172
```yaml
151
173
spec:
@@ -417,15 +439,63 @@ How to perform the operation in the web interface:
417
439
- Click the "Create" button.
418
440
- Wait until the image changes to `Ready` status.
419
441
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
+
420
484
## Virtual machine classes
421
485
422
486
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.
423
487
424
488
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
+
425
492
{{< 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.
427
493
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).
429
499
{{< /alert >}}
430
500
431
501
To list all VirtualMachineClass resources, run the following command:
@@ -529,7 +599,7 @@ Next, let's take a closer look at the setting blocks.
529
599
530
600
The `.spec.cpu` block allows you to specify or configure the vCPU for the VM.
531
601
532
-
{{< alert level="warning">}}
602
+
{{< alert level="warning">}}
533
603
Settings in the `.spec.cpu` block cannot be changed after the VirtualMachineClass resource is created.
Copy file name to clipboardExpand all lines: docs/ADMIN_GUIDE.ru.md
+72-4Lines changed: 72 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,29 @@ spec:
62
62
- `.spec.settings.dvcr.storage.persistentVolumeClaim.storageClassName`— класс хранения (например, `sds-replicated-thin-r1`).
63
63
64
64
{{< 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 с помощью следующей команды:
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-узлов).
66
88
{{< /alert >}}
67
89
68
90
**Сетевые настройки**
@@ -420,6 +442,48 @@ d8 k describe cvi ubuntu-22-04
420
442
- Нажмите кнопку «Создать».
421
443
- Дождитесь пока образ перейдет в состояние `Готов`.
422
444
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
+
423
487
## Классы виртуальных машин
424
488
425
489
Ресурс VirtualMachineClass предназначен для централизованной конфигурации предпочтительных параметров виртуальных машин.
@@ -429,11 +493,15 @@ d8 k describe cvi ubuntu-22-04
429
493
430
494
Во время установки автоматически создаётся ресурс VirtualMachineClass с именем `generic`. Он представляет собой универсальный тип процессора на основе более старой, но широко поддерживаемой архитектуры Nehalem. Это позволяет запускать виртуальные машины на любых узлах кластера и поддерживает их живую миграцию.
431
495
496
+
Администратор может изменять параметры ресурса VirtualMachineClass `generic` (за исключением секции `.spec.cpu`), либо удалить данный ресурс.
497
+
432
498
{{< alert level="info" >}}
433
-
Рекомендуется создать как минимум один ресурс VirtualMachineClass в кластере с типом `Discovery` сразу после того, как все узлы будут настроены и добавлены в кластер.
434
-
Это позволит использовать в виртуальных машинах универсальный процессор с максимально возможными характеристиками с учетом CPU на узлах кластера, что позволит виртуальным машинам использовать максимум возможностей CPU и при необходимости беспрепятственно осуществлять миграцию между узлами кластера.
435
499
436
-
Пример настройки смотрите в разделе [Пример конфигурации vCPU Discovery](#пример-конфигурации-vcpu-discovery)
500
+
Не рекомендуется использовать VirtualMachineClass `generic` для запуска рабочих нагрузок в production-средах, поскольку данный класс соответствует процессору с наименьшей функциональностью.
501
+
502
+
Рекомендуется после добавления и настройки всех узлов в кластере создать хотя бы один ресурс VirtualMachineClass с типом `Discovery`. Это обеспечит выбор наилучшей доступной конфигурации процессора с учётом всех CPU в вашем кластере, позволит виртуальным машинам максимально эффективно использовать возможности процессоров и обеспечит беспрепятственную миграцию между узлами.
503
+
504
+
Пример настройки смотрите в разделе [Пример конфигурации vCPU Discovery](#пример-конфигурации-vcpu-discovery).
437
505
{{< /alert >}}
438
506
439
507
Чтобы вывести список ресурсов VirtualMachineClass, выполните следующую команду:
0 commit comments