From d4aeffefc0e3e8cf0aa2b4f8a9555755d07c9be7 Mon Sep 17 00:00:00 2001 From: davidplunkett Date: Tue, 5 Nov 2019 07:02:37 +0000 Subject: [PATCH] update neutron and nova settings Signed-off-by: davidplunkett Change-Id: Id97f14173eb65a1847c8db74078dc121f3c1014b Signed-off-by: davidplunkett --- site_type/sriov-a13/templates/profiles/genesis.j2 | 51 ++++++++++++++++++++++ .../sriov-a13/templates/profiles/host/cp_r720.j2 | 26 +++++++++++ .../charts/osh/openstack-compute-kit/neutron.j2 | 4 +- .../charts/osh/openstack-compute-kit/nova.j2 | 36 ++++++++------- 4 files changed, 101 insertions(+), 16 deletions(-) create mode 100644 site_type/sriov-a13/templates/profiles/genesis.j2 diff --git a/site_type/sriov-a13/templates/profiles/genesis.j2 b/site_type/sriov-a13/templates/profiles/genesis.j2 new file mode 100644 index 0000000..3534446 --- /dev/null +++ b/site_type/sriov-a13/templates/profiles/genesis.j2 @@ -0,0 +1,51 @@ +--- +# The purpose of this file is to apply proper labels to Genesis node so the +# proper services are installed and proper configuration applied. This should +# not need to be changed for a new site. +# #GLOBAL-CANDIDATE# +schema: promenade/Genesis/v1 +metadata: + schema: metadata/Document/v1 + name: genesis-site + layeringDefinition: + abstract: false + layer: site + parentSelector: + name: genesis-global + actions: + - method: merge + path: . + storagePolicy: cleartext +data: + labels: + dynamic: + - beta.kubernetes.io/fluentd-ds-ready=true + - calico-etcd=enabled + - ceph-mds=enabled + - ceph-mon=enabled + - ceph-osd=enabled + - ceph-rgw=enabled + - ceph-mgr=enabled + - ceph-bootstrap=enabled + - tenant-ceph-control-plane=enabled + - tenant-ceph-mon=enabled + - tenant-ceph-rgw=enabled + - tenant-ceph-mgr=enabled + - kube-dns=enabled + - kube-ingress=enabled + - kubernetes-apiserver=enabled + - kubernetes-controller-manager=enabled + - kubernetes-etcd=enabled + - kubernetes-scheduler=enabled + - promenade-genesis=enabled + - ucp-control-plane=enabled + - maas-rack=enabled + - maas-region=enabled + - ceph-osd-bootstrap=enabled + - openstack-control-plane=enabled + - openvswitch=enabled + - openstack-l3-agent=enabled + - fluentd=enabled + - fluentbit=enabled + - node-exporter=enabled +... diff --git a/site_type/sriov-a13/templates/profiles/host/cp_r720.j2 b/site_type/sriov-a13/templates/profiles/host/cp_r720.j2 index 349d4e6..3322a0f 100644 --- a/site_type/sriov-a13/templates/profiles/host/cp_r720.j2 +++ b/site_type/sriov-a13/templates/profiles/host/cp_r720.j2 @@ -41,6 +41,18 @@ data: - storage - overlay - calico + p1p1: + slaves: + - 'sriov_nic01' + sriov: + vf_count: 32 # Currently ignored + trustedmode: false + p3p2: + slaves: + - 'sriov_nic02' + sriov: + vf_count: 32 # Currently ignored + trustedmode: false storage: physical_devices: @@ -145,6 +157,8 @@ data: kube-ingress: enabled beta.kubernetes.io/fluentd-ds-ready: 'true' node-exporter: enabled + openstack-nova-compute: enabled + openstack-libvirt: kernel sriov: enabled ... --- @@ -188,6 +202,18 @@ data: - storage - overlay - calico + p1p1: + slaves: + - 'sriov_nic01' + sriov: + vf_count: 32 # Currently ignored + trustedmode: false + p3p2: + slaves: + - 'sriov_nic02' + sriov: + vf_count: 32 # Currently ignored + trustedmode: false storage: physical_devices: diff --git a/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/neutron.j2 b/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/neutron.j2 index b3a570c..5af8e8c 100644 --- a/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/neutron.j2 +++ b/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/neutron.j2 @@ -50,13 +50,15 @@ data: - openvswitch - sriov interface: - tunnel_device: '{{yaml.networks.neutron.interface}}' + #tunnel_device: '{{yaml.networks.neutron.interface}}' sriov: {% for sriovnet in yaml.sriov.nets %} - device: {{sriovnet.interface}} num_vfs: 32 promisc: false {% endfor %} + auto_bridge_add: + br-bond0: {{yaml.networks.neutron.interface}} conf: plugins: openvswitch_agent: diff --git a/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/nova.j2 b/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/nova.j2 index 37f356f..44909af 100644 --- a/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/nova.j2 +++ b/site_type/sriov-a13/templates/software/charts/osh/openstack-compute-kit/nova.j2 @@ -58,21 +58,27 @@ data: vif_plugging_is_fatal: False vif_plugging_timeout: 30 pci: -{% if 'gpu' in yaml and 'alias' in yaml.gpu %} -{% for alias in yaml.gpu.alias %} - alias: '{ "name":"{{alias.name}}", "vendor_id":"{{alias.vendor_id}}", "product_id":"{{alias.product_id}}", "device_type":"type-PCI" }' - passthrough_whitelist: '{"vendor_id": "{{alias.vendor_id}}", "product_id": "{{alias.product_id}}"}' -{% endfor %} -{% endif %} -{% if 'sriov' in yaml and 'alias' in yaml.sriov %} -{% for alias in yaml.sriov.alias %} - alias: '{"name": "{{alias.name}}", "vendor_id": "{{alias.vendor_id}}", "product_id": "{{alias.product_id}}", "capability_type": "pci", "device_type": "type-PCI", "numa_policy": "required"}`' -{% endfor %} -{% endif %} -{% if 'sriov' in yaml and 'nets' in yaml.sriov %} -{% for sriovnet in yaml.sriov.nets %} +{% if 'gpu' in yaml or 'sriov' in yaml %} + alias: | + {% if 'sriov' in yaml and 'alias' in yaml.sriov %} + {% for alias in yaml.sriov.alias %} + '{"name": "{{alias.name}}", "vendor_id": "{{alias.vendor_id}}", "product_id": "{{alias.product_id}}", "capability_type": "pci", "device_type": "type-PCI", "numa_policy": "required"}' + {% endfor %} + {% endif %} + {% if 'gpu' in yaml and 'alias' in yaml.gpu %} + {% for alias in yaml.gpu.alias %} + '{"name":"{{alias.name}}", "vendor_id":"{{alias.vendor_id}}", "product_id":"{{alias.product_id}}", "device_type":"type-PCI"}' + {% endfor %} + {% endif %} passthrough_whitelist: | - [{% for vf in sriovnet.whitelists -%}{"address":"{{vf["address"]}}","physical_network":"{{sriovnet.physical}}"}{{',' if not loop.last else ''}}{% endfor %}] -{% endfor %} + [ + {%- if 'sriov' in yaml and 'nets' in yaml.sriov %} + {% for sriovnet in yaml.sriov.nets %} + {%- for vf in sriovnet.whitelists -%}{"address":"{{vf["address"]}}","physical_network":"{{sriovnet.physical}}"}{{',' if not loop.last else ''}}{% endfor %}{{',' if not loop.last else '' -}} + {%- endfor -%} + {%- if 'gpu' in yaml and 'sriov' in yaml %},{% endif -%} + {%- for alias in yaml.gpu.alias %}{"vendor_id": "{{alias.vendor_id}}", "product_id": "{{alias.product_id}}"}{{',' if not loop.last else ''}}{% endfor -%} + ] + {% endif %} {% endif %} ... -- 2.16.6