|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * scalability_and_performance/ztp_far_edge/ztp-advanced-policy-config.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="ztp-provisioning-lvm-storage_{context}"] |
| 7 | += Configuring {lvms} using PolicyGenTemplate CRs |
| 8 | + |
| 9 | +You can configure {lvms-first} for managed clusters that you deploy with {ztp-first}. |
| 10 | + |
| 11 | +[NOTE] |
| 12 | +==== |
| 13 | +You use {lvms} to persist event subscriptions when you use PTP events or bare-metal hardware events with HTTP transport. |
| 14 | +==== |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* Install the OpenShift CLI (`oc`). |
| 19 | +
|
| 20 | +* Log in as a user with `cluster-admin` privileges. |
| 21 | +
|
| 22 | +* Create a Git repository where you manage your custom site configuration data. |
| 23 | +
|
| 24 | +.Procedure |
| 25 | + |
| 26 | +. To configure {lvms} for new managed clusters, add the following YAML to `spec.sourceFiles` in the `common-ranGen.yaml` file: |
| 27 | ++ |
| 28 | +[source,yaml,subs="attributes+"] |
| 29 | +---- |
| 30 | +- fileName: StorageLVMOSubscriptionNS.yaml |
| 31 | + policyName: subscription-policies |
| 32 | +- fileName: StorageLVMOSubscriptionOperGroup.yaml |
| 33 | + policyName: subscription-policies |
| 34 | +- fileName: StorageLVMOSubscription.yaml |
| 35 | + spec: |
| 36 | + name: lvms-operator |
| 37 | + channel: stable-{product-version} |
| 38 | + policyName: subscription-policies |
| 39 | +---- |
| 40 | +
|
| 41 | +. Add the `LVMCluster` CR to `spec.sourceFiles` in your specific group or individual site configuration file. For example, in the `group-du-sno-ranGen.yaml` file, add the following: |
| 42 | ++ |
| 43 | +[source,yaml] |
| 44 | +---- |
| 45 | +- fileName: StorageLVMCluster.yaml |
| 46 | + policyName: "lvmo-config" <1> |
| 47 | + spec: |
| 48 | + storage: |
| 49 | + deviceClasses: |
| 50 | + - name: vg1 |
| 51 | + thinPoolConfig: |
| 52 | + name: thin-pool-1 |
| 53 | + sizePercent: 90 |
| 54 | + overprovisionRatio: 10 |
| 55 | +---- |
| 56 | +<1> This example configuration creates a volume group (`vg1`) with all the available devices, except the disk where {product-title} is installed. |
| 57 | +A thin-pool logical volume is also created. |
| 58 | +
|
| 59 | +. Merge any other required changes and files with your custom site repository. |
| 60 | + |
| 61 | +. Commit the `PolicyGenTemplate` changes in Git, and then push the changes to your site configuration repository to deploy {lvms} to new sites using {ztp}. |
0 commit comments