Skip to content

Commit 5377834

Browse files
committed
Introduce ci_lvms_storage role
The ci_lvms_storage role aims to be a drop in replacement for ci_local_storage. It uses LVMS (Logical Volume Manager Storage) based on the TopoLVM CSI driver to dynamically provision local storage built from block devices on OCP nodes. This role requires cifmw_lvms_disk_list to contain a list of paths to block devices which already exist on OCP nodes. If the cifmw_devscripts_config_overrides.vm_extradisks_list list contains "vda vdb", then it will create these block devices and cifmw_lvms_disk_list should be set to ['/dev/vda', '/dev/vdb']. This role will then pass this list to the deviceSelector list used by the LVMCluster CRD. This patch introduces the role but ci_local_storage is still used by the 06-deploy-{architecture,edpm}.yml playbooks unless cifmw_use_lvms is true. The ci_gen_kustomize_values role is updated to set the storageClass to lvms-local-storage only if cifmw_use_lvms is true. Otherwise it keeps its default of local-storage. A similar change has been made to the role test_operator so that Tempest uses the chosen storage class. In a follow up patch we can default cifmw_use_lvms to true so LVMS becomes opt out. For now it is opt in for early testing. Signed-off-by: John Fulton <[email protected]> Related: https://issues.redhat.com/browse/OSPRH-2749
1 parent 533ee13 commit 5377834

File tree

27 files changed

+717
-4
lines changed

27 files changed

+717
-4
lines changed

docs/dictionary/en-custom.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ authfile
1919
autoscale
2020
autostart
2121
awk
22+
backend
2223
backends
2324
baremetal
2425
baremetalhost
@@ -90,6 +91,7 @@ cri
9091
crio
9192
crs
9293
crypto
94+
csi
9395
csr
9496
csv
9597
ctl
@@ -262,6 +264,8 @@ losetup
262264
lsblk
263265
lv
264266
lvm
267+
lvmcluster
268+
lvms
265269
lweyzmmtmji
266270
machinenetwork
267271
macos
@@ -351,6 +355,7 @@ osd
351355
osp
352356
osprh
353357
otz
358+
overprovisionratio
354359
ovirt
355360
ovirtmgmt
356361
ovn
@@ -370,6 +375,8 @@ polarion
370375
polkit
371376
pragadeeswaran
372377
pre
378+
prepend
379+
prepended
373380
prikey
374381
privatekey
375382
projectquay
@@ -433,6 +440,7 @@ sha
433440
shiftstack
434441
shiftstackclient
435442
sig
443+
sizepercent
436444
skbg
437445
skiplist
438446
specificities
@@ -472,6 +480,7 @@ tmux
472480
tobiko
473481
toctree
474482
todo
483+
topolvm
475484
traceback
476485
tripleo
477486
ttl

docs/source/usage/01_usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ are shared among multiple roles:
2020
- `cifmw_use_libvirt`: (Bool) toggle libvirt support.
2121
- `cifmw_use_crc`: (Bool) toggle rhol/crc usage.
2222
- `cifmw_use_uefi`: (Bool) toggle UEFI support in libvirt_manager provided VMs.
23+
- `cifmw_use_lvms`: (Bool) toggle LVMS support. Defaults to `false`.
2324
- `cifmw_openshift_kubeconfig`: (String) Path to the kubeconfig file if externally provided. If provided will be the kubeconfig to use and update after login.
2425
- `cifmw_openshift_api`: (String) Path to the kubeconfig file. If provided will be the API to authenticate against.
2526
- `cifmw_openshift_user`: (String) Login user. If provided, the user that logins.

playbooks/06-deploy-architecture.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,15 @@
146146
- name: Configure Storage Class
147147
ansible.builtin.import_role:
148148
name: ci_local_storage
149+
when: not cifmw_use_lvms | default(false)
150+
tags:
151+
- storage
152+
- edpm_bootstrap
153+
154+
- name: Configure LVMS Storage Class
155+
ansible.builtin.include_role:
156+
name: ci_lvms_storage
157+
when: cifmw_use_lvms | default(false)
149158
tags:
150159
- storage
151160
- edpm_bootstrap

playbooks/06-deploy-edpm.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
- name: Configure Storage Class
2424
ansible.builtin.include_role:
2525
name: ci_local_storage
26+
when: not cifmw_use_lvms | default(false)
27+
28+
- name: Configure LVMS Storage Class
29+
ansible.builtin.include_role:
30+
name: ci_lvms_storage
31+
when: cifmw_use_lvms | default(false)
2632

2733
- name: Run edpm_prepare
2834
ansible.builtin.include_role:

roles/ci_gen_kustomize_values/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ with a message.
3333
* `cifmw_ci_gen_kustomize_values_userdata_b64`: (List) Base64 encoded list of data to combine in the generated output.
3434
Defaults to `[]`.
3535
* `ci_gen_kustomize_fetch_ocp_state`: (Boolean) If true it enables generating CI templates based on the OCP state. Defaults to `true`.
36+
* `cifmw_ci_gen_kustomize_values_storage_class_prefix`: (String) Prefix for `storageClass` in generated values.yaml files. Defaults to `"lvms-"` only if `cifmw_use_lvms` is True, otherwise it defaults to `""`. The prefix is prepended to the `cifmw_ci_gen_kustomize_values_storage_class`. It is not recommended to override this value, instead set `cifmw_use_lvms` True or False.
37+
* `cifmw_ci_gen_kustomize_values_storage_class`: (String) Value for `storageClass` in generated values.yaml files. Defaults to `"lvms-local-storage"` only if `cifmw_use_lvms` is True, otherwise it defaults to `"local-storage"`.
3638

3739
### Specific parameters for edpm-values
3840
This configMap needs some more parameters in order to properly override the `architecture` provided one.

roles/ci_gen_kustomize_values/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ cifmw_ci_gen_kustomize_values_nameservers: []
6767
cifmw_ci_gen_kustomize_values_userdata: {}
6868
cifmw_ci_gen_kustomize_values_userdata_b64: []
6969
ci_gen_kustomize_fetch_ocp_state: true
70+
cifmw_ci_gen_kustomize_values_storage_class_prefix: "{{ 'lvms-' if cifmw_use_lvms | default(false) | bool else '' }}"
71+
cifmw_ci_gen_kustomize_values_storage_class: "{{ cifmw_ci_gen_kustomize_values_storage_class_prefix }}local-storage"
7072

7173
# Those parameter must be set if you want to edit an "edpm-values"
7274
# cifmw_ci_gen_kustomize_values_ssh_authorizedkeys

roles/ci_gen_kustomize_values/templates/bgp/network-values/values.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ data:
142142
metallb.universe.tf/loadBalancerIPs: {{ cifmw_networking_env_definition.networks['internalapi'].network_v4 | ansible.utils.ipmath(86) }}
143143

144144
lbServiceType: LoadBalancer
145-
storageClass: local-storage
145+
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}

roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ data:
126126
metallb.universe.tf/loadBalancerIPs: {{ cifmw_networking_env_definition.networks['internalapi'].network_v4 | ansible.utils.ipmath(86) }}
127127

128128
lbServiceType: LoadBalancer
129-
storageClass: local-storage
129+
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}

roles/ci_gen_kustomize_values/templates/ovs-dpdk-sriov/network-values/values.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ data:
126126
metallb.universe.tf/loadBalancerIPs: {{ cifmw_networking_env_definition.networks['internalapi'].network_v4 | ansible.utils.ipmath(86) }}
127127

128128
lbServiceType: LoadBalancer
129-
storageClass: local-storage
129+
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}

roles/ci_gen_kustomize_values/templates/uni01alpha/network-values/values.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ data:
129129
metallb.universe.tf/loadBalancerIPs: {{ cifmw_networking_env_definition.networks['internalapi'].network_v4 | ansible.utils.ipmath(86) }}
130130

131131
lbServiceType: LoadBalancer
132-
storageClass: local-storage
132+
storageClass: {{ cifmw_ci_gen_kustomize_values_storage_class }}

0 commit comments

Comments
 (0)