From a2ed38b4594843835c72575189bfbb4b2ef59606 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:26 -0400 Subject: [PATCH] Add generic SR-IOV configuration --- group_vars/default/pvc.yml | 10 ++++++++++ roles/pvc/defaults/main.yml | 8 ++++++++ roles/pvc/templates/pvc/pvcnoded.yaml.j2 | 2 ++ 3 files changed, 20 insertions(+) diff --git a/group_vars/default/pvc.yml b/group_vars/default/pvc.yml index fbf7dc5..5598473 100644 --- a/group_vars/default/pvc.yml +++ b/group_vars/default/pvc.yml @@ -125,6 +125,16 @@ pvc_nodes: # or a different device separate from the other 3 main networks. pvc_bridge_device: bondU # Replace based on your network configuration +# SR-IOV device configuration +# SR-IOV enables the passing of hardware-virtualized network devices (VFs), created on top of SR-IOV-enabled +# physical NICs (PFs), into virtual machines. SR-IOV is a complex topic, and will not be discussed in detail +# here. Instead, the SR-IOV mode is disabled by default and a commented out example configuration is shown. +pvc_sriov_enable: False +#pvc_sriov_device: +# - phy: ens1f0 +# mtu: 9000 +# vfcount: 6 + # Configuration file networks # > Taken from base.yml's configuration; do not modify this section. pvc_upstream_device: "{{ networks['upstream']['device'] }}" diff --git a/roles/pvc/defaults/main.yml b/roles/pvc/defaults/main.yml index b3a3503..b568913 100644 --- a/roles/pvc/defaults/main.yml +++ b/roles/pvc/defaults/main.yml @@ -26,6 +26,7 @@ pvc_zookeeper_stack_limit: 512M # Ceph storage ceph_storage_secret_key: "" ceph_storage_secret_uuid: "" + # Database pvc_dns_database_name: "pvcdns" pvc_dns_database_user: "pvcdns" @@ -33,6 +34,7 @@ pvc_dns_database_password: "PVCdnsPassw0rd" pvc_api_database_name: "pvcapi" pvc_api_database_user: "pvcapi" pvc_api_database_password: "PVCprovPassw0rd" + # Coordinators pvc_nodes: - hostname: "pvc1" @@ -65,6 +67,7 @@ pvc_nodes: ipmi_host: "pvc3-lom" ipmi_user: "" ipmi_password: "" + # Networks pvc_asn: "65001" pvc_routers: @@ -82,3 +85,8 @@ pvc_upstream_domain: "" pvc_upstream_subnet: "" pvc_upstream_floatingip: "" pvc_upstream_gatewayip: "" + +# Devices +pvc_bridge_device: bond0 +pvc_sriov_enable: False +pvc_sriov_device: diff --git a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 index 057218e..7fab702 100644 --- a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 +++ b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 @@ -79,6 +79,8 @@ pvc: console_log_lines: {{ pvc_log_console_lines }} networking: bridge_device: {{ pvc_bridge_device }} + sriov_enable: {{ pvc_sriov_enable }} + sriov_device: {{ pvc_sriov_device }} upstream: device: {{ pvc_upstream_device }} mtu: {{ pvc_upstream_mtu }}