Skip to content

Commit

Permalink
Multiple nodesets for ovs-dpdk-sriov scenario
Browse files Browse the repository at this point in the history
Created a new dt based on ovs-dpdk-sriov va
Depends-on: openstack-k8s-operators/ci-framework#2541
  • Loading branch information
Miguel Angel Nieto Jimenez authored and mnietoji committed Dec 19, 2024
1 parent b893b45 commit 16dd59f
Show file tree
Hide file tree
Showing 18 changed files with 1,077 additions and 0 deletions.
61 changes: 61 additions & 0 deletions automation/vars/ovs-dpdk-sriov-2nodesets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
vas:
ovs-dpdk-sriov-2nodesets:
stages:
- path: examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/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/nfv/nfv-ovs-dpdk-sriov-2nodesets
wait_conditions:
- >-
oc -n openstack wait osctlplane controlplane --for condition=Ready
--timeout=1200s
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/nfv/nfv-ovs-dpdk-sriov-2nodesets/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/nfv/nfv-ovs-dpdk-sriov-2nodesets/edpm/nodeset2
wait_conditions:
- >-
oc -n openstack wait
osdpns openstack-edpm-2 --for condition=SetupReady
--timeout=60m
values:
- name: edpm-nodeset2-values
src_file: values.yaml
build_output: nodeset2.yaml

- path: examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/edpm/deployment
wait_conditions:
- >-
oc -n openstack
wait openstackdataplanedeployments.dataplane.openstack.org
edpm-deployment
--for condition=Ready --timeout=60m
values:
- name: edpm-deployment-values
src_file: values.yaml
build_output: deployment.yaml
2 changes: 2 additions & 0 deletions examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nncp.yaml
control-plane.yaml
26 changes: 26 additions & 0 deletions examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Deployed Topology - NFV/OVS-DPDK-SRIOV with 2 nodesets

Deploys an OVS-DPDK-SRIOV environment 2 different nodesets. It is an extension
of the regular OVS-DPDK-SRIOV scenario, so all information in that scenario is
valid here too. Check [OpenStack OVS DPDK SRIOV](../../../va/nfv/ovs-dpdk-sriov/README.md)

## Purpose

This scenario is needed when compute nodes used to deploy Openstack dataplane
are different (different nics, cpu, memory, ...) so a different nodeset can
be created for each different compute node

This DT is based on OVS-DPDK-SRIOV VA and it has been added just the code
to configure the second nodeset, reusing all of the other config

## Stages

All stages must be executed in the order listed below. Everything is required unless otherwise indicated.
Stages are the same than the OVS-DPDK-SRIOV scenario, the only difference is that it will
be created 2 nodesets instead of just 1

1. [Install the OpenStack K8S operators and their dependencies](../../../common/)
2. [Configuring networking and deploy the OpenStack control plane](control-plane.md)
3. [Configure and deploy the data plane](dataplane.md)


55 changes: 55 additions & 0 deletions examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/control-plane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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/nfv-ovs-dpdk-sriov-2nodesets directory
```
cd examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets
```
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
```
54 changes: 54 additions & 0 deletions examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/dataplane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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/nfv-ovs-dpdk-sriov-2nodesets/edpm directory
```
cd examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/edpm
```
Edit the [nodeset/values.yaml](edpm/nodeset/values.yaml), [nodeset2/values.yaml](edpm/nodeset2/values.yaml)
and [deployment/values.yaml](deployment/values.yaml) files to suit your environment.
```
vi nodeset/values.yaml
vi nodeset2/values.yaml
vi deployment/values.yaml
```
Generate the dataplane nodesets CRs.
```
kustomize build nodeset > dataplane-nodeset.yaml
kustomize build nodeset2 > dataplane-nodeset2.yaml
```
Generate the dataplane deployment CR.
```
kustomize build deployment > dataplane-deployment.yaml
```

## Create CRs
Create the nodesets CRs
```
oc apply -f dataplane-nodeset.yaml
oc apply -f dataplane-nodeset2.yaml
```
Wait for dataplane nodesets setup to finish
```
oc wait osdpns openstack-edpm --for condition=SetupReady --timeout=600s
oc wait osdpns openstack-edpm-2 --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
```
3 changes: 3 additions & 0 deletions examples/dt/nfv/nfv-ovs-dpdk-sriov-2nodesets/edpm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dataplane-nodeset.yaml
dataplane-nodeset-2.yaml
dataplane-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../../va/nfv/ovs-dpdk-sriov/edpm/deployment
# - https://github.com/openstack-k8s-operators/architecture/va/nfv/ovs-dpdk-sriov/edpm/deployment?ref=main
## It's possible to replace ../../../../../../va/nfv/ovs-dpdk-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
Original file line number Diff line number Diff line change
@@ -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: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../../va/nfv/ovs-dpdk-sriov/edpm/nodeset
# - https://github.com/openstack-k8s-operators/architecture/va/nfv/ovs-dpdk-sriov/edpm/nodeset?ref=main
## It's possible to replace ../../../../../../va/nfv/ovs-dpdk-sriov/edpm/nodeset/ with a git checkout URL
## as per: https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md

resources:
- values.yaml
Loading

0 comments on commit 16dd59f

Please sign in to comment.