From cff159edbce065298a2a6067b9e3e9389ef4e902 Mon Sep 17 00:00:00 2001 From: jamepark4 Date: Mon, 14 Apr 2025 15:46:28 -0400 Subject: [PATCH 1/2] Create Nova Multinodset hybrid job --- automation/vars/nova02beta.yaml | 60 ++++++ dt/nova/nova02beta/README.md | 1 + .../edpm/deployment/kustomization.yaml | 21 ++ .../nodeset/baremetalset-password-secret.yaml | 9 + .../edpm/nodeset/kustomization.yaml | 90 ++++++++ .../nova02beta/edpm/nodeset/nova_sriov.yaml | 41 ++++ .../baremetalset-password-secret.yaml | 9 + .../edpm/nodeset2/kustomization.yaml | 90 ++++++++ .../nova02beta/edpm/nodeset2/nova_sriov.yaml | 41 ++++ dt/nova/nova02beta/kustomization.yaml | 105 +++++++++ dt/nova/nova02beta/namespace.yaml | 12 ++ examples/dt/nova/nova02beta/.gitignore | 1 + examples/dt/nova/nova02beta/README.md | 1 + examples/dt/nova/nova02beta/control-plane.md | 54 +++++ examples/dt/nova/nova02beta/dataplane.md | 50 +++++ examples/dt/nova/nova02beta/edpm/.gitignore | 2 + .../nova02beta/edpm/deployment/.gitignore | 1 + .../edpm/deployment/kustomization.yaml | 21 ++ .../nova02beta/edpm/deployment/values.yaml | 10 + .../nova/nova02beta/edpm/nodeset/.gitignore | 1 + .../edpm/nodeset/kustomization.yaml | 12 ++ .../nova/nova02beta/edpm/nodeset/values.yaml | 158 ++++++++++++++ .../nova/nova02beta/edpm/nodeset2/.gitignore | 1 + .../edpm/nodeset2/kustomization.yaml | 21 ++ .../nova/nova02beta/edpm/nodeset2/values.yaml | 158 ++++++++++++++ .../dt/nova/nova02beta/kustomization.yaml | 13 ++ .../nova/nova02beta/nncp/kustomization.yaml | 24 +++ examples/dt/nova/nova02beta/nncp/values.yaml | 199 ++++++++++++++++++ .../dt/nova/nova02beta/service-values.yaml | 46 ++++ 29 files changed, 1252 insertions(+) create mode 100644 automation/vars/nova02beta.yaml create mode 100644 dt/nova/nova02beta/README.md create mode 100644 dt/nova/nova02beta/edpm/deployment/kustomization.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset/baremetalset-password-secret.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset/kustomization.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset/nova_sriov.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml create mode 100644 dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml create mode 100644 dt/nova/nova02beta/kustomization.yaml create mode 100644 dt/nova/nova02beta/namespace.yaml create mode 100644 examples/dt/nova/nova02beta/.gitignore create mode 100644 examples/dt/nova/nova02beta/README.md create mode 100644 examples/dt/nova/nova02beta/control-plane.md create mode 100644 examples/dt/nova/nova02beta/dataplane.md create mode 100644 examples/dt/nova/nova02beta/edpm/.gitignore create mode 100644 examples/dt/nova/nova02beta/edpm/deployment/.gitignore create mode 100644 examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml create mode 100644 examples/dt/nova/nova02beta/edpm/deployment/values.yaml create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset/.gitignore create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset/values.yaml create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml create mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml create mode 100644 examples/dt/nova/nova02beta/kustomization.yaml create mode 100644 examples/dt/nova/nova02beta/nncp/kustomization.yaml create mode 100644 examples/dt/nova/nova02beta/nncp/values.yaml create mode 100644 examples/dt/nova/nova02beta/service-values.yaml diff --git a/automation/vars/nova02beta.yaml b/automation/vars/nova02beta.yaml new file mode 100644 index 000000000..63103ad7c --- /dev/null +++ b/automation/vars/nova02beta.yaml @@ -0,0 +1,60 @@ +--- +vas: + nova02beta: + stages: + - path: examples/dt/nova/nova02beta/nncp + wait_conditions: + - >- + oc -n openstack wait nncp + -l osp/nncm-config-type=standard + --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured + --timeout=60s + values: + - name: network-values + src_file: values.yaml + build_output: nncp.yaml + + - path: examples/dt/nova/nova02beta + wait_conditions: + - >- + oc -n openstack wait osctlplane controlplane --for condition=Ready + --timeout=600s + values: + - name: network-values + src_file: nncp/values.yaml + - name: service-values + src_file: service-values.yaml + build_output: control-plane.yaml + + - path: examples/dt/nova/nova02beta/edpm/nodeset + wait_conditions: + - >- + oc -n openstack wait + osdpns openstack-edpm --for condition=SetupReady + --timeout=60m + values: + - name: edpm-nodeset-values + src_file: values.yaml + build_output: nodeset.yaml + + - path: examples/dt/nova/nova02beta/edpm/nodeset2 + wait_conditions: + - >- + oc -n openstack wait + osdpns openstack-edpm-2 --for condition=SetupReady + --timeout=60m + values: + - name: edpm-nodeset-values + src_file: values.yaml + build_output: nodeset2.yaml + + - path: examples/dt/nova/nova02beta/edpm/deployment + wait_conditions: + - >- + oc -n openstack wait + osdpd edpm-deployment --for condition=Ready + --timeout=60m + values: + - name: edpm-deployment-values + src_file: values.yaml + build_output: deployment.yaml diff --git a/dt/nova/nova02beta/README.md b/dt/nova/nova02beta/README.md new file mode 100644 index 000000000..706449103 --- /dev/null +++ b/dt/nova/nova02beta/README.md @@ -0,0 +1 @@ +# TBD diff --git a/dt/nova/nova02beta/edpm/deployment/kustomization.yaml b/dt/nova/nova02beta/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..35ccc4852 --- /dev/null +++ b/dt/nova/nova02beta/edpm/deployment/kustomization.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/dataplane/deployment diff --git a/dt/nova/nova02beta/edpm/nodeset/baremetalset-password-secret.yaml b/dt/nova/nova02beta/edpm/nodeset/baremetalset-password-secret.yaml new file mode 100644 index 000000000..41daad38d --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset/baremetalset-password-secret.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +data: + NodeRootPassword: _replaced_ +kind: Secret +metadata: + name: baremetalset-password-secret + namespace: openstack +type: Opaque diff --git a/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml b/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..4b6e6bbfb --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/dataplane/nodeset + +resources: + - baremetalset-password-secret.yaml + - nova_sriov.yaml + +replacements: + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.root_password + targets: + - select: + kind: Secret + name: baremetalset-password-secret + fieldPaths: + - data.NodeRootPassword + options: + create: true + + # Nova compute CPU pinning customization + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.nova.compute.conf + targets: + - select: + kind: ConfigMap + name: cpu-pinning-nova + fieldPaths: + - data.25-cpu-pinning-nova\.conf + options: + create: true + # Nova compute PCI passthrough customization + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.nova.pci.conf + targets: + - select: + kind: ConfigMap + name: sriov-nova + fieldPaths: + - data.03-sriov-nova\.conf + options: + create: true + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.preProvisioned + targets: + - select: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + fieldPaths: + - spec.preProvisioned + options: + create: true + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.baremetalSetTemplate + targets: + - select: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + fieldPaths: + - spec.baremetalSetTemplate + options: + create: true diff --git a/dt/nova/nova02beta/edpm/nodeset/nova_sriov.yaml b/dt/nova/nova02beta/edpm/nodeset/nova_sriov.yaml new file mode 100644 index 000000000..95caff77f --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset/nova_sriov.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: cpu-pinning-nova +data: + 25-cpu-pinning-nova.conf: _replaced_ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sriov-nova +data: + 03-sriov-nova.conf: _replaced_ +--- +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova-custom-sriov +spec: + label: dataplane-deployment-nova-custom-sriov + edpmServiceType: nova + dataSources: + - configMapRef: + name: cpu-pinning-nova + - configMapRef: + name: sriov-nova + - secretRef: + name: nova-cell1-compute-config + - secretRef: + name: nova-migration-ssh-key + playbook: osp.edpm.nova + tlsCerts: + default: + contents: + - dnsnames + - ips + networks: + - ctlplane + issuer: osp-rootca-issuer-internal + caCerts: combined-ca-bundle diff --git a/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml b/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml new file mode 100644 index 000000000..41daad38d --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +data: + NodeRootPassword: _replaced_ +kind: Secret +metadata: + name: baremetalset-password-secret + namespace: openstack +type: Opaque diff --git a/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml b/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml new file mode 100644 index 000000000..4094f3c48 --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/dataplane/nodeset + +resources: + - baremetalset-password-secret.yaml + - nova_sriov.yaml + +replacements: + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.root_password + targets: + - select: + kind: Secret + name: baremetalset-password-secret + fieldPaths: + - data.NodeRootPassword + options: + create: true + + # Nova compute CPU pinning customization + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.nova.compute.conf + targets: + - select: + kind: ConfigMap + name: cpu-pinning-nova-2 + fieldPaths: + - data.25-cpu-pinning-nova\.conf + options: + create: true + # Nova compute PCI passthrough customization + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.nova.pci.conf + targets: + - select: + kind: ConfigMap + name: sriov-nova-2 + fieldPaths: + - data.03-sriov-nova\.conf + options: + create: true + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.preProvisioned + targets: + - select: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + fieldPaths: + - spec.preProvisioned + options: + create: true + - source: + kind: ConfigMap + name: edpm-nodeset-values + fieldPath: data.baremetalSetTemplate + targets: + - select: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + fieldPaths: + - spec.baremetalSetTemplate + options: + create: true diff --git a/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml b/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml new file mode 100644 index 000000000..7b0a5dc2e --- /dev/null +++ b/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: cpu-pinning-nova-2 +data: + 25-cpu-pinning-nova.conf: _replaced_ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sriov-nova-2 +data: + 03-sriov-nova.conf: _replaced_ +--- +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova-custom-sriov-2 +spec: + label: dataplane-deployment-nova-custom-sriov + edpmServiceType: nova + dataSources: + - configMapRef: + name: cpu-pinning-nova-2 + - configMapRef: + name: sriov-nova-2 + - secretRef: + name: nova-cell1-compute-config + - secretRef: + name: nova-migration-ssh-key + playbook: osp.edpm.nova + tlsCerts: + default: + contents: + - dnsnames + - ips + networks: + - ctlplane + issuer: osp-rootca-issuer-internal + caCerts: combined-ca-bundle diff --git a/dt/nova/nova02beta/kustomization.yaml b/dt/nova/nova02beta/kustomization.yaml new file mode 100644 index 000000000..c6274ab70 --- /dev/null +++ b/dt/nova/nova02beta/kustomization.yaml @@ -0,0 +1,105 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../lib/networking/metallb + - ../../../lib/networking/netconfig + - ../../../lib/networking/nad + - ../../../lib/control-plane + +replacements: + # Control plane customization + - source: + kind: ConfigMap + name: service-values + fieldPath: data.neutron.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.neutron.template.customServiceConfig + options: + create: true + # OVN control plane SRIOV customization + - source: + kind: ConfigMap + name: service-values + fieldPath: data.ovn.ovnController.nicMappings + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.ovn.template.ovnController.nicMappings + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.glance.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.glance.template.customServiceConfig + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.glance.default.replicas + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.glance.template.glanceAPIs.default.replicas + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.swift.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.swift.enabled + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.apiServiceTemplate.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.apiServiceTemplate.customServiceConfig + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.schedulerServiceTemplate.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.schedulerServiceTemplate.customServiceConfig + options: + create: true diff --git a/dt/nova/nova02beta/namespace.yaml b/dt/nova/nova02beta/namespace.yaml new file mode 100644 index 000000000..60a6e8c42 --- /dev/null +++ b/dt/nova/nova02beta/namespace.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: builtin +kind: NamespaceTransformer +metadata: + name: _ignored_ + namespace: openstack +setRoleBindingSubjects: none +unsetOnly: true +fieldSpecs: + - path: metadata/name + kind: Namespace + create: true diff --git a/examples/dt/nova/nova02beta/.gitignore b/examples/dt/nova/nova02beta/.gitignore new file mode 100644 index 000000000..3df8f53be --- /dev/null +++ b/examples/dt/nova/nova02beta/.gitignore @@ -0,0 +1 @@ +control-plane.yaml diff --git a/examples/dt/nova/nova02beta/README.md b/examples/dt/nova/nova02beta/README.md new file mode 100644 index 000000000..706449103 --- /dev/null +++ b/examples/dt/nova/nova02beta/README.md @@ -0,0 +1 @@ +# TBD diff --git a/examples/dt/nova/nova02beta/control-plane.md b/examples/dt/nova/nova02beta/control-plane.md new file mode 100644 index 000000000..424656050 --- /dev/null +++ b/examples/dt/nova/nova02beta/control-plane.md @@ -0,0 +1,54 @@ +# Configuring networking and deploy the OpenStack control plane + +## Assumptions + +- A storage class called `local-storage` should already exist. + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the nfv/sriov directory +``` +cd architecture/examples/va/nfv/sriov +``` +Edit the [nncp/values.yaml](nncp/values.yaml) and +[service-values.yaml](service-values.yaml) files to suit +your environment. +``` +vi nncp/values.yaml +vi service-values.yaml +``` + +## Apply node network configuration + +Generate the node network configuration +``` +kustomize build nncp > nncp.yaml +``` +Apply the NNCP CRs +``` +oc apply -f nncp.yaml +``` +Wait for NNCPs to be available +``` +oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s +``` + +## Apply networking and control-plane configuration + +Generate the control-plane and networking CRs. +``` +kustomize build > control-plane.yaml +``` +Apply the CRs +``` +oc apply -f control-plane.yaml +``` + +Wait for control plane to be available +``` +oc wait osctlplane controlplane --for condition=Ready --timeout=600s +``` diff --git a/examples/dt/nova/nova02beta/dataplane.md b/examples/dt/nova/nova02beta/dataplane.md new file mode 100644 index 000000000..5c33a3b50 --- /dev/null +++ b/examples/dt/nova/nova02beta/dataplane.md @@ -0,0 +1,50 @@ +# Configuring and deploying the dataplane + +## Assumptions + +- The [control plane](control-plane.md) has been created and successfully deployed + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the nfv/sriov/edpm directory +``` +cd architecture/examples/va/nfv/sriov/edpm +``` +Edit the [nodeset/values.yaml](nodeset/values.yaml) and [deployment/values.yaml](deployment/values.yaml) files to suit +your environment. +``` +vi nodeset/values.yaml +vi deployment/values.yaml +``` +Generate the dataplane nodeset CR. +``` +kustomize build nodeset > dataplane-nodeset.yaml +``` +Generate the dataplane deployment CR. +``` +kustomize build deployment > dataplane-deployment.yaml +``` + +## Create CRs +Create the nodeset CR +``` +oc apply -f dataplane-nodeset.yaml +``` +Wait for dataplane nodeset setup to finish +``` +oc wait osdpns openstack-edpm --for condition=SetupReady --timeout=600s +``` + +Start the deployment +``` +oc apply -f dataplane-deployment.yaml +``` + +Wait for dataplane deployment to finish +``` +oc wait osdpns openstack-edpm --for condition=Ready --timeout=40m +``` diff --git a/examples/dt/nova/nova02beta/edpm/.gitignore b/examples/dt/nova/nova02beta/edpm/.gitignore new file mode 100644 index 000000000..835442d0a --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/.gitignore @@ -0,0 +1,2 @@ +dataplane-deployment.yaml +dataplane-nodeset.yaml \ No newline at end of file diff --git a/examples/dt/nova/nova02beta/edpm/deployment/.gitignore b/examples/dt/nova/nova02beta/edpm/deployment/.gitignore new file mode 100644 index 000000000..56387c5df --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/deployment/.gitignore @@ -0,0 +1 @@ +dataplane-deployment.yaml \ No newline at end of file diff --git a/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml b/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..73ca0c831 --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova02beta/edpm/deployment + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov/edpm/deployment?ref=main + ## It's possible to replace ../../../../../../va/nfv/sriov/edpm/deployment/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneDeployment + name: edpm-deployment + patch: | + - op: add + path: /spec/nodeSets/- + value: openstack-edpm-2 diff --git a/examples/dt/nova/nova02beta/edpm/deployment/values.yaml b/examples/dt/nova/nova02beta/edpm/deployment/values.yaml new file mode 100644 index 000000000..7f371b2cc --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/deployment/values.yaml @@ -0,0 +1,10 @@ +# yamllint disable rule:line-length +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-deployment-values + annotations: + config.kubernetes.io/local-config: "true" +data: {} diff --git a/examples/dt/nova/nova02beta/edpm/nodeset/.gitignore b/examples/dt/nova/nova02beta/edpm/nodeset/.gitignore new file mode 100644 index 000000000..721008e8b --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset/.gitignore @@ -0,0 +1 @@ +dataplane-nodeset.yaml \ No newline at end of file diff --git a/examples/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml b/examples/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..d65574604 --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset/kustomization.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova02beta/edpm/nodeset/ + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov/edpm/nodeset?ref=main + ## It's possible to replace ../../../../../../va/nfv/sriov/edpm/nodeset/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml diff --git a/examples/dt/nova/nova02beta/edpm/nodeset/values.yaml b/examples/dt/nova/nova02beta/edpm/nodeset/values.yaml new file mode 100644 index 000000000..4ae210e9d --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset/values.yaml @@ -0,0 +1,158 @@ +# yamllint disable rule:line-length +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-nodeset-values + annotations: + config.kubernetes.io/local-config: "true" +data: + root_password: cmVkaGF0Cg== + preProvisioned: false + baremetalSetTemplate: + ctlplaneInterface: eno2 # CHANGEME + cloudUserName: cloud-admin + provisioningInterface: enp1s0 # CHANGEME + bmhLabelSelector: + app: openstack # CHANGEME + passwordSecret: + name: baremetalset-password-secret + namespace: openstack + ssh_keys: + # Authorized keys that will have access to the dataplane computes via SSH + authorized: CHANGEME + # The private key that will have access to the dataplane computes via SSH + private: CHANGEME2 + # The public key that will have access to the dataplane computes via SSH + public: CHANGEME3 + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + # CHANGEME -- see https://access.redhat.com/solutions/253273 + # edpm_bootstrap_command: | + # subscription-manager register --username --password + # podman login -u -p registry.redhat.io + timesync_ntp_servers: + - hostname: pool.ntp.org + # CPU pinning settings + edpm_kernel_args: "default_hugepagesz=1GB hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt isolcpus=4-23,28-47" + edpm_tuned_profile: "cpu-partitioning-powersave" + edpm_tuned_isolated_cores: "4-23,28-47" + # edpm_network_config + # These vars are edpm_network_config role vars + edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute-0: + nic2: 6c:fe:54:3f:8a:02 # CHANGEME + nic3: 6c:fe:54:3f:8a:03 # CHANGEME + edpm-compute-1: + nic2: 6b:fe:54:3f:8a:02 # CHANGEME + nic3: 6b:fe:54:3f:8a:03 # CHANGEME + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in nodeset_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + mtu: {{ min_viable_mtu }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: {{ ctlplane_host_routes }} + members: + - type: interface + name: nic2 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in nodeset_networks %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: + {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endfor %} + - type: sriov_pf + name: nic3 + numvfs: 10 + use_dhcp: false + promisc: true + + # These vars are for the network config templates themselves and are + # considered EDPM network defaults. + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth0 + # edpm_nodes_validation + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + dns_search_domains: [] + gather_facts: false + # edpm firewall, change the allowed CIDR if needed + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + # SRIOV settings + edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: 'sriov-phy4:eno4' + networks: + - defaultRoute: true + name: ctlplane + subnetName: subnet1 + - name: internalapi + subnetName: subnet1 + - name: storage + subnetName: subnet1 + - name: tenant + subnetName: subnet1 + nodes: + edpm-compute-0: + hostName: edpm-compute-0 + edpm-compute-1: + hostName: edpm-compute-1 + services: + - bootstrap + - download-cache + - configure-network + - validate-network + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - libvirt + - ovn + - neutron-ovn + - nova-custom-sriov-2 + - neutron-sriov + - neutron-metadata + nova: + compute: + conf: | + # CHANGEME + [DEFAULT] + reserved_host_memory_mb = 4096 + reserved_huge_pages = node:0,size:4,count:524160 + reserved_huge_pages = node:1,size:4,count:524160 + [compute] + cpu_shared_set = 0-3,24-27 + cpu_dedicated_set = 8-23,32-47 + migration: + ssh_keys: + private: CHANGEME4 + public: CHANGEME5 + pci: + conf: | + # CHANGEME + [pci] + device_spec = {"vendor_id":"8086", "product_id":"1572", "address": "0000:19:00.3", "physical_network":"sriov-phy4", "trusted":"true"} diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore b/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore new file mode 100644 index 000000000..721008e8b --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore @@ -0,0 +1 @@ +dataplane-nodeset.yaml \ No newline at end of file diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml b/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml new file mode 100644 index 000000000..a2c300e36 --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova02beta/edpm/nodeset2/ + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov/edpm/nodeset?ref=main + ## It's possible to replace ../../../../../../va/nfv/sriov/edpm/nodeset/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + patch: |- + - op: replace + path: /metadata/name + value: openstack-edpm-2 diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml b/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml new file mode 100644 index 000000000..1903e81f9 --- /dev/null +++ b/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml @@ -0,0 +1,158 @@ +# yamllint disable rule:line-length +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-nodeset-values + annotations: + config.kubernetes.io/local-config: "true" +data: + root_password: cmVkaGF0Cg== + preProvisioned: false + baremetalSetTemplate: + ctlplaneInterface: eno2 # CHANGEME + cloudUserName: cloud-admin + provisioningInterface: enp1s0 # CHANGEME + bmhLabelSelector: + app: openstack # CHANGEME + passwordSecret: + name: baremetalset-password-secret + namespace: openstack + ssh_keys: + # Authorized keys that will have access to the dataplane computes via SSH + authorized: CHANGEME + # The private key that will have access to the dataplane computes via SSH + private: CHANGEME2 + # The public key that will have access to the dataplane computes via SSH + public: CHANGEME3 + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + # CHANGEME -- see https://access.redhat.com/solutions/253273 + # edpm_bootstrap_command: | + # subscription-manager register --username --password + # podman login -u -p registry.redhat.io + timesync_ntp_servers: + - hostname: pool.ntp.org + # CPU pinning settings + edpm_kernel_args: "default_hugepagesz=1GB hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt isolcpus=4-23,28-47" + edpm_tuned_profile: "cpu-partitioning-powersave" + edpm_tuned_isolated_cores: "4-23,28-47" + # edpm_network_config + # These vars are edpm_network_config role vars + edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute-0: + nic2: 6c:fe:54:3f:8a:02 # CHANGEME + nic3: 6c:fe:54:3f:8a:03 # CHANGEME + edpm-compute-1: + nic2: 6b:fe:54:3f:8a:02 # CHANGEME + nic3: 6b:fe:54:3f:8a:03 # CHANGEME + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in nodeset_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + mtu: {{ min_viable_mtu }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: {{ ctlplane_host_routes }} + members: + - type: interface + name: nic2 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in nodeset_networks %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: + {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endfor %} + - type: sriov_pf + name: nic3 + numvfs: 10 + use_dhcp: false + promisc: true + + # These vars are for the network config templates themselves and are + # considered EDPM network defaults. + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth0 + # edpm_nodes_validation + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + dns_search_domains: [] + gather_facts: false + # edpm firewall, change the allowed CIDR if needed + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + # SRIOV settings + edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: 'sriov-phy4:eno4' + networks: + - defaultRoute: true + name: ctlplane + subnetName: subnet1 + - name: internalapi + subnetName: subnet1 + - name: storage + subnetName: subnet1 + - name: tenant + subnetName: subnet1 + nodes: + edpm-compute-0: + hostName: edpm-compute-0 + edpm-compute-1: + hostName: edpm-compute-1 + services: + - bootstrap + - download-cache + - configure-network + - validate-network + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - libvirt + - ovn + - neutron-ovn + - nova-custom-sriov + - neutron-sriov + - neutron-metadata + nova: + compute: + conf: | + # CHANGEME + [DEFAULT] + reserved_host_memory_mb = 4096 + reserved_huge_pages = node:0,size:4,count:524160 + reserved_huge_pages = node:1,size:4,count:524160 + [compute] + cpu_shared_set = 0-3,24-27 + cpu_dedicated_set = 8-23,32-47 + migration: + ssh_keys: + private: CHANGEME4 + public: CHANGEME5 + pci: + conf: | + # CHANGEME + [pci] + device_spec = {"vendor_id":"8086", "product_id":"1572", "address": "0000:19:00.3", "physical_network":"sriov-phy4", "trusted":"true"} diff --git a/examples/dt/nova/nova02beta/kustomization.yaml b/examples/dt/nova/nova02beta/kustomization.yaml new file mode 100644 index 000000000..1dd903d3d --- /dev/null +++ b/examples/dt/nova/nova02beta/kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../dt/nova/nova02beta/ + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov?ref=main + ## It's possible to replace ../../../../va/nfv/sriov/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - nncp/values.yaml + - service-values.yaml diff --git a/examples/dt/nova/nova02beta/nncp/kustomization.yaml b/examples/dt/nova/nova02beta/nncp/kustomization.yaml new file mode 100644 index 000000000..c92bc55fa --- /dev/null +++ b/examples/dt/nova/nova02beta/nncp/kustomization.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/nncp + +resources: + - values.yaml diff --git a/examples/dt/nova/nova02beta/nncp/values.yaml b/examples/dt/nova/nova02beta/nncp/values.yaml new file mode 100644 index 000000000..94ff59cf1 --- /dev/null +++ b/examples/dt/nova/nova02beta/nncp/values.yaml @@ -0,0 +1,199 @@ +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: network-values + annotations: + config.kubernetes.io/local-config: "true" +data: + # nodes + node_0: + name: ostest-master-0 + internalapi_ip: 172.17.0.5 + tenant_ip: 172.19.0.5 + ctlplane_ip: 192.168.122.10 + storage_ip: 172.18.0.5 + node_1: + name: ostest-master-1 + internalapi_ip: 172.17.0.6 + tenant_ip: 172.19.0.6 + ctlplane_ip: 192.168.122.11 + storage_ip: 172.18.0.6 + node_2: + name: ostest-master-2 + internalapi_ip: 172.17.0.7 + tenant_ip: 172.19.0.7 + ctlplane_ip: 192.168.122.12 + storage_ip: 172.18.0.7 + + # networks + ctlplane: + dnsDomain: ctlplane.example.com + subnets: + - allocationRanges: + - end: 192.168.122.120 + start: 192.168.122.100 + - end: 192.168.122.200 + start: 192.168.122.150 + cidr: 192.168.122.0/24 + gateway: 192.168.122.1 + name: subnet1 + prefix-length: 24 + iface: enp7s0 + mtu: 1500 + lb_addresses: + - 192.168.122.80-192.168.122.90 + endpoint_annotations: + metallb.universe.tf/address-pool: ctlplane + metallb.universe.tf/allow-shared-ip: ctlplane + metallb.universe.tf/loadBalancerIPs: 192.168.122.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "ctlplane", + "type": "macvlan", + "master": "ospbr", + "ipam": { + "type": "whereabouts", + "range": "192.168.122.0/24", + "range_start": "192.168.122.30", + "range_end": "192.168.122.70" + } + } + internalapi: + dnsDomain: internalapi.example.com + subnets: + - allocationRanges: + - end: 172.17.0.250 + start: 172.17.0.100 + cidr: 172.17.0.0/24 + name: subnet1 + vlan: 20 + mtu: 1500 + prefix-length: 24 + iface: internalapi + vlan: 20 + base_iface: enp7s0 + lb_addresses: + - 172.17.0.80-172.17.0.90 + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "internalapi", + "type": "macvlan", + "master": "internalapi", + "ipam": { + "type": "whereabouts", + "range": "172.17.0.0/24", + "range_start": "172.17.0.30", + "range_end": "172.17.0.70" + } + } + storage: + dnsDomain: storage.example.com + subnets: + - allocationRanges: + - end: 172.18.0.250 + start: 172.18.0.100 + cidr: 172.18.0.0/24 + name: subnet1 + vlan: 21 + mtu: 1500 + prefix-length: 24 + iface: storage + vlan: 21 + base_iface: enp7s0 + lb_addresses: + - 172.18.0.80-172.18.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "storage", + "type": "macvlan", + "master": "storage", + "ipam": { + "type": "whereabouts", + "range": "172.18.0.0/24", + "range_start": "172.18.0.30", + "range_end": "172.18.0.70" + } + } + tenant: + dnsDomain: tenant.example.com + subnets: + - allocationRanges: + - end: 172.19.0.250 + start: 172.19.0.100 + cidr: 172.19.0.0/24 + name: subnet1 + vlan: 22 + mtu: 1500 + prefix-length: 24 + iface: tenant + vlan: 22 + base_iface: enp7s0 + lb_addresses: + - 172.19.0.80-172.19.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "tenant", + "type": "macvlan", + "master": "tenant", + "ipam": { + "type": "whereabouts", + "range": "172.19.0.0/24", + "range_start": "172.19.0.30", + "range_end": "172.19.0.70" + } + } + external: + dnsDomain: external.example.com + subnets: + - allocationRanges: + - end: 10.0.0.250 + start: 10.0.0.100 + cidr: 10.0.0.0/24 + gateway: 10.0.0.1 + name: subnet1 + mtu: 1500 + datacentre: + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "datacentre", + "type": "bridge", + "bridge": "ospbr", + "ipam": {} + } + + dns-resolver: + config: + server: + - 192.168.122.1 + search: [] + options: + - key: server + values: + - 192.168.122.1 + + routes: + config: [] + + rabbitmq: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.85 + rabbitmq-cell1: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.86 + + lbServiceType: LoadBalancer + storageClass: local-storage + bridgeName: ospbr diff --git a/examples/dt/nova/nova02beta/service-values.yaml b/examples/dt/nova/nova02beta/service-values.yaml new file mode 100644 index 000000000..3c9d4597b --- /dev/null +++ b/examples/dt/nova/nova02beta/service-values.yaml @@ -0,0 +1,46 @@ +# local-config: referenced, but not emitted by kustomize +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" +data: + preserveJobs: false + neutron: + customServiceConfig: | + [ml2] + mechanism_drivers = ovn,sriovnicswitch + [ml2_type_vlan] + network_vlan_ranges = sriov-phy4 + ovn: + ovnController: + nicMappings: + datacentre: ospbr + glance: + customServiceConfig: | + [DEFAULT] + enabled_backends = default_backend:swift + [glance_store] + default_backend = default_backend + [default_backend] + swift_store_create_container_on_put = True + swift_store_auth_version = 3 + swift_store_auth_address = {{ .KeystoneInternalURL }} + swift_store_endpoint_type = internalURL + swift_store_user = service:glance + swift_store_key = {{ .ServicePassword }} + default: + replicas: 1 + swift: + enabled: true + nova: + apiServiceTemplate: + customServiceConfig: | + [pci] + alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PCI", "name":"a1" } + schedulerServiceTemplate: + customServiceConfig: | + [filter_scheduler] + enabled_filters = AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter From 453e08bdd55a6440482735c0b93bd2d3dd755dd9 Mon Sep 17 00:00:00 2001 From: jamepark4 Date: Mon, 12 May 2025 18:15:07 -0400 Subject: [PATCH 2/2] [DNM] Testing NVMe OTU feature --- automation/vars/nova02beta.yaml | 11 -- .../baremetalset-password-secret.yaml | 9 - .../edpm/nodeset2/kustomization.yaml | 90 ---------- .../nova02beta/edpm/nodeset2/nova_sriov.yaml | 41 ----- dt/nova/nova02beta/kustomization.yaml | 22 +++ .../edpm/deployment/kustomization.yaml | 9 - .../nova/nova02beta/edpm/nodeset2/.gitignore | 1 - .../edpm/nodeset2/kustomization.yaml | 21 --- .../nova/nova02beta/edpm/nodeset2/values.yaml | 158 ------------------ .../dt/nova/nova02beta/service-values.yaml | 16 +- 10 files changed, 36 insertions(+), 342 deletions(-) delete mode 100644 dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml delete mode 100644 dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml delete mode 100644 dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml delete mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore delete mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml delete mode 100644 examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml diff --git a/automation/vars/nova02beta.yaml b/automation/vars/nova02beta.yaml index 63103ad7c..751a3d185 100644 --- a/automation/vars/nova02beta.yaml +++ b/automation/vars/nova02beta.yaml @@ -37,17 +37,6 @@ vas: src_file: values.yaml build_output: nodeset.yaml - - path: examples/dt/nova/nova02beta/edpm/nodeset2 - wait_conditions: - - >- - oc -n openstack wait - osdpns openstack-edpm-2 --for condition=SetupReady - --timeout=60m - values: - - name: edpm-nodeset-values - src_file: values.yaml - build_output: nodeset2.yaml - - path: examples/dt/nova/nova02beta/edpm/deployment wait_conditions: - >- diff --git a/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml b/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml deleted file mode 100644 index 41daad38d..000000000 --- a/dt/nova/nova02beta/edpm/nodeset2/baremetalset-password-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: v1 -data: - NodeRootPassword: _replaced_ -kind: Secret -metadata: - name: baremetalset-password-secret - namespace: openstack -type: Opaque diff --git a/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml b/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml deleted file mode 100644 index 4094f3c48..000000000 --- a/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1alpha1 -kind: Component - -transformers: - # Set namespace to OpenStack on all namespaced objects without a namespace - - |- - apiVersion: builtin - kind: NamespaceTransformer - metadata: - name: _ignored_ - namespace: openstack - setRoleBindingSubjects: none - unsetOnly: true - fieldSpecs: - - path: metadata/name - kind: Namespace - create: true - -components: - - ../../../../../lib/dataplane/nodeset - -resources: - - baremetalset-password-secret.yaml - - nova_sriov.yaml - -replacements: - - source: - kind: ConfigMap - name: edpm-nodeset-values - fieldPath: data.root_password - targets: - - select: - kind: Secret - name: baremetalset-password-secret - fieldPaths: - - data.NodeRootPassword - options: - create: true - - # Nova compute CPU pinning customization - - source: - kind: ConfigMap - name: edpm-nodeset-values - fieldPath: data.nova.compute.conf - targets: - - select: - kind: ConfigMap - name: cpu-pinning-nova-2 - fieldPaths: - - data.25-cpu-pinning-nova\.conf - options: - create: true - # Nova compute PCI passthrough customization - - source: - kind: ConfigMap - name: edpm-nodeset-values - fieldPath: data.nova.pci.conf - targets: - - select: - kind: ConfigMap - name: sriov-nova-2 - fieldPaths: - - data.03-sriov-nova\.conf - options: - create: true - - source: - kind: ConfigMap - name: edpm-nodeset-values - fieldPath: data.preProvisioned - targets: - - select: - kind: OpenStackDataPlaneNodeSet - name: openstack-edpm - fieldPaths: - - spec.preProvisioned - options: - create: true - - source: - kind: ConfigMap - name: edpm-nodeset-values - fieldPath: data.baremetalSetTemplate - targets: - - select: - kind: OpenStackDataPlaneNodeSet - name: openstack-edpm - fieldPaths: - - spec.baremetalSetTemplate - options: - create: true diff --git a/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml b/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml deleted file mode 100644 index 7b0a5dc2e..000000000 --- a/dt/nova/nova02beta/edpm/nodeset2/nova_sriov.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: cpu-pinning-nova-2 -data: - 25-cpu-pinning-nova.conf: _replaced_ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: sriov-nova-2 -data: - 03-sriov-nova.conf: _replaced_ ---- -apiVersion: dataplane.openstack.org/v1beta1 -kind: OpenStackDataPlaneService -metadata: - name: nova-custom-sriov-2 -spec: - label: dataplane-deployment-nova-custom-sriov - edpmServiceType: nova - dataSources: - - configMapRef: - name: cpu-pinning-nova-2 - - configMapRef: - name: sriov-nova-2 - - secretRef: - name: nova-cell1-compute-config - - secretRef: - name: nova-migration-ssh-key - playbook: osp.edpm.nova - tlsCerts: - default: - contents: - - dnsnames - - ips - networks: - - ctlplane - issuer: osp-rootca-issuer-internal - caCerts: combined-ca-bundle diff --git a/dt/nova/nova02beta/kustomization.yaml b/dt/nova/nova02beta/kustomization.yaml index c6274ab70..f9cfd9942 100644 --- a/dt/nova/nova02beta/kustomization.yaml +++ b/dt/nova/nova02beta/kustomization.yaml @@ -92,6 +92,28 @@ replacements: - spec.nova.template.apiServiceTemplate.customServiceConfig options: create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.cell0.conductorServiceTemplate.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates.cell0.conductorServiceTemplate.customServiceConfig + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.cell1.conductorServiceTemplate.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates.cell1.conductorServiceTemplate.customServiceConfig + options: + create: true - source: kind: ConfigMap name: service-values diff --git a/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml b/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml index 73ca0c831..37a5d13c9 100644 --- a/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml +++ b/examples/dt/nova/nova02beta/edpm/deployment/kustomization.yaml @@ -10,12 +10,3 @@ components: resources: - values.yaml - -patches: - - target: - kind: OpenStackDataPlaneDeployment - name: edpm-deployment - patch: | - - op: add - path: /spec/nodeSets/- - value: openstack-edpm-2 diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore b/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore deleted file mode 100644 index 721008e8b..000000000 --- a/examples/dt/nova/nova02beta/edpm/nodeset2/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dataplane-nodeset.yaml \ No newline at end of file diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml b/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml deleted file mode 100644 index a2c300e36..000000000 --- a/examples/dt/nova/nova02beta/edpm/nodeset2/kustomization.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -components: - - ../../../../../../dt/nova/nova02beta/edpm/nodeset2/ - # - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov/edpm/nodeset?ref=main - ## It's possible to replace ../../../../../../va/nfv/sriov/edpm/nodeset/ with a git checkout URL as per: - ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md - -resources: - - values.yaml - -patches: - - target: - kind: OpenStackDataPlaneNodeSet - name: openstack-edpm - patch: |- - - op: replace - path: /metadata/name - value: openstack-edpm-2 diff --git a/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml b/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml deleted file mode 100644 index 1903e81f9..000000000 --- a/examples/dt/nova/nova02beta/edpm/nodeset2/values.yaml +++ /dev/null @@ -1,158 +0,0 @@ -# yamllint disable rule:line-length -# local-config: referenced, but not emitted by kustomize ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: edpm-nodeset-values - annotations: - config.kubernetes.io/local-config: "true" -data: - root_password: cmVkaGF0Cg== - preProvisioned: false - baremetalSetTemplate: - ctlplaneInterface: eno2 # CHANGEME - cloudUserName: cloud-admin - provisioningInterface: enp1s0 # CHANGEME - bmhLabelSelector: - app: openstack # CHANGEME - passwordSecret: - name: baremetalset-password-secret - namespace: openstack - ssh_keys: - # Authorized keys that will have access to the dataplane computes via SSH - authorized: CHANGEME - # The private key that will have access to the dataplane computes via SSH - private: CHANGEME2 - # The public key that will have access to the dataplane computes via SSH - public: CHANGEME3 - nodeset: - ansible: - ansibleUser: cloud-admin - ansiblePort: 22 - ansibleVars: - # CHANGEME -- see https://access.redhat.com/solutions/253273 - # edpm_bootstrap_command: | - # subscription-manager register --username --password - # podman login -u -p registry.redhat.io - timesync_ntp_servers: - - hostname: pool.ntp.org - # CPU pinning settings - edpm_kernel_args: "default_hugepagesz=1GB hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt isolcpus=4-23,28-47" - edpm_tuned_profile: "cpu-partitioning-powersave" - edpm_tuned_isolated_cores: "4-23,28-47" - # edpm_network_config - # These vars are edpm_network_config role vars - edpm_network_config_hide_sensitive_logs: false - edpm_network_config_os_net_config_mappings: - edpm-compute-0: - nic2: 6c:fe:54:3f:8a:02 # CHANGEME - nic3: 6c:fe:54:3f:8a:03 # CHANGEME - edpm-compute-1: - nic2: 6b:fe:54:3f:8a:02 # CHANGEME - nic3: 6b:fe:54:3f:8a:03 # CHANGEME - edpm_network_config_template: | - --- - {% set mtu_list = [ctlplane_mtu] %} - {% for network in nodeset_networks %} - {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} - {%- endfor %} - {% set min_viable_mtu = mtu_list | max %} - network_config: - - type: ovs_bridge - name: {{ neutron_physical_bridge_name }} - mtu: {{ min_viable_mtu }} - use_dhcp: false - dns_servers: {{ ctlplane_dns_nameservers }} - domain: {{ dns_search_domains }} - addresses: - - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} - routes: {{ ctlplane_host_routes }} - members: - - type: interface - name: nic2 - mtu: {{ min_viable_mtu }} - # force the MAC address of the bridge to this interface - primary: true - {% for network in nodeset_networks %} - - type: vlan - mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} - vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} - addresses: - - ip_netmask: - {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} - routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} - {% endfor %} - - type: sriov_pf - name: nic3 - numvfs: 10 - use_dhcp: false - promisc: true - - # These vars are for the network config templates themselves and are - # considered EDPM network defaults. - neutron_physical_bridge_name: br-ex - neutron_public_interface_name: eth0 - # edpm_nodes_validation - edpm_nodes_validation_validate_controllers_icmp: false - edpm_nodes_validation_validate_gateway_icmp: false - dns_search_domains: [] - gather_facts: false - # edpm firewall, change the allowed CIDR if needed - edpm_sshd_configure_firewall: true - edpm_sshd_allowed_ranges: - - 192.168.122.0/24 - # SRIOV settings - edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: 'sriov-phy4:eno4' - networks: - - defaultRoute: true - name: ctlplane - subnetName: subnet1 - - name: internalapi - subnetName: subnet1 - - name: storage - subnetName: subnet1 - - name: tenant - subnetName: subnet1 - nodes: - edpm-compute-0: - hostName: edpm-compute-0 - edpm-compute-1: - hostName: edpm-compute-1 - services: - - bootstrap - - download-cache - - configure-network - - validate-network - - install-os - - configure-os - - ssh-known-hosts - - run-os - - reboot-os - - install-certs - - libvirt - - ovn - - neutron-ovn - - nova-custom-sriov - - neutron-sriov - - neutron-metadata - nova: - compute: - conf: | - # CHANGEME - [DEFAULT] - reserved_host_memory_mb = 4096 - reserved_huge_pages = node:0,size:4,count:524160 - reserved_huge_pages = node:1,size:4,count:524160 - [compute] - cpu_shared_set = 0-3,24-27 - cpu_dedicated_set = 8-23,32-47 - migration: - ssh_keys: - private: CHANGEME4 - public: CHANGEME5 - pci: - conf: | - # CHANGEME - [pci] - device_spec = {"vendor_id":"8086", "product_id":"1572", "address": "0000:19:00.3", "physical_network":"sriov-phy4", "trusted":"true"} diff --git a/examples/dt/nova/nova02beta/service-values.yaml b/examples/dt/nova/nova02beta/service-values.yaml index 3c9d4597b..1ddfe22dc 100644 --- a/examples/dt/nova/nova02beta/service-values.yaml +++ b/examples/dt/nova/nova02beta/service-values.yaml @@ -38,8 +38,20 @@ data: nova: apiServiceTemplate: customServiceConfig: | - [pci] - alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PCI", "name":"a1" } + [pci] + alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PCI", "name":"a1" } + [filter_scheduler] + pci_in_placement = True + cell0: + conductorServiceTemplate: + customServiceConfig: | + [filter_scheduler] + pci_in_placement = True + cell1: + conductorServiceTemplate: + customServiceConfig: | + [filter_scheduler] + pci_in_placement = True schedulerServiceTemplate: customServiceConfig: | [filter_scheduler]