Skip to content

Commit 9018ac6

Browse files
Decouple network and control plane setup for nvidia-vfio-passthrough VA
...to follow up its reference nova04delta DT Co-authored-by: aider (gemini/gemini-2.5-pro) <[email protected]> Signed-off-by: Bohdan Dobrelia <[email protected]>
1 parent ca15513 commit 9018ac6

File tree

13 files changed

+236
-154
lines changed

13 files changed

+236
-154
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
vas:
3+
nvidia-vfio-passthrough-adoption:
4+
stages:
5+
- name: nncp-configuration
6+
path: examples/va/nvidia-vfio-passthrough/control-plane/networking/nncp
7+
wait_conditions:
8+
- >-
9+
oc -n openstack wait nncp
10+
-l osp/nncm-config-type=standard
11+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
12+
--timeout=5m
13+
values:
14+
- name: network-values
15+
src_file: values.yaml
16+
build_output: nncp.yaml
17+
18+
- name: network-configuration
19+
path: examples/va/nvidia-vfio-passthrough/control-plane/networking
20+
wait_conditions:
21+
- >-
22+
oc -n metallb-system wait pod
23+
-l app=metallb -l component=speaker
24+
--for condition=Ready
25+
--timeout=5min
26+
values:
27+
- name: network-values
28+
src_file: nncp/values.yaml
29+
build_output: networking.yaml
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
vas:
3+
nvidia-vfio-passthrough:
4+
stages:
5+
- name: nncp-configuration
6+
path: examples/va/nvidia-vfio-passthrough/control-plane/networking/nncp
7+
wait_conditions:
8+
- >-
9+
oc -n openstack wait nncp
10+
-l osp/nncm-config-type=standard
11+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
12+
--timeout=5m
13+
values:
14+
- name: network-values
15+
src_file: values.yaml
16+
build_output: nncp.yaml
17+
18+
- name: network-configuration
19+
path: examples/va/nvidia-vfio-passthrough/control-plane/networking
20+
wait_conditions:
21+
- >-
22+
oc -n metallb-system wait pod
23+
-l app=metallb -l component=speaker
24+
--for condition=Ready
25+
--timeout=5m
26+
values:
27+
- name: network-values
28+
src_file: nncp/values.yaml
29+
build_output: network.yaml
30+
31+
- name: control-plane
32+
path: examples/va/nvidia-vfio-passthrough/control-plane
33+
wait_conditions:
34+
- >-
35+
oc -n openstack wait osctlplane controlplane
36+
--for condition=Ready
37+
--timeout=60m
38+
values:
39+
- name: network-values
40+
src_file: networking/nncp/values.yaml
41+
- name: service-values.yaml
42+
src_file: service-values.yaml
43+
build_output: control-plane.yaml
44+
45+
- name: edpm-nodeset
46+
path: examples/va/nvidia-vfio-passthrough/edpm/nodeset
47+
wait_conditions:
48+
- >-
49+
oc -n openstack wait
50+
osdpns openstack-edpm --for condition=SetupReady
51+
--timeout=60m
52+
values:
53+
- name: edpm-nodeset-values
54+
src_file: values.yaml
55+
build_output: nodeset.yaml
56+
57+
- name: edpm-deployment
58+
path: examples/va/nvidia-vfio-passthrough/edpm/deployment
59+
wait_conditions:
60+
- >-
61+
oc -n openstack wait
62+
osdpd edpm-deployment --for condition=Ready
63+
--timeout=90m
64+
values:
65+
- name: edpm-deployment-values
66+
src_file: values.yaml
67+
build_output: deployment.yaml
68+
69+
- name: edpm-deployment-post-driver
70+
path: examples/va/nvidia-vfio-passthrough/edpm-post-driver/deployment
71+
wait_conditions:
72+
- >-
73+
oc -n openstack wait
74+
osdpd edpm-deployment-post-driver --for condition=Ready
75+
--timeout=20m
76+
values:
77+
- name: edpm-deployment-post-driver
78+
src_file: values.yaml
79+
build_output: edpm-post-driver.yaml

examples/va/nvidia-vfio-passthrough/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ not need it.
6363
All stages must be executed in the order listed below. Everything is required unless otherwise indicated.
6464

6565
1. [Install the OpenStack K8S operators and their dependencies](../../common/)
66-
2. [Configuring networking and deploy the OpenStack control plane](control-plane.md)
67-
3. [Configure and deploy the initial dataplane](edpm-pre.md)
68-
4. [Update Dataplane with a reboot](edpm-post.md)
66+
2. [Configuring networking and deploy the OpenStack control plane](control-plane/README.md)
67+
3. [Configure and deploy the initial dataplane](data-plane-pre.md)
68+
4. [Update Dataplane with a reboot](data-plane-post.md)

examples/va/nvidia-vfio-passthrough/control-plane.md

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Configuring networking and deploy the OpenStack control plane
2+
3+
## Assumptions
4+
5+
- A storage class called `local-storage` should already exist.
6+
7+
## Initialize
8+
9+
Switch to the "openstack" namespace
10+
```bash
11+
oc project openstack
12+
```
13+
14+
Change to nvidia-vfio-passthrough directory
15+
```bash
16+
cd architecture/examples/va/nvidia-vfio-passthrough
17+
```
18+
19+
# Apply the required node network configurations.
20+
```bash
21+
vi control-plane/networking/nncp/values.yaml
22+
```
23+
24+
```bash
25+
# Change the Node Network Configuration folder.
26+
pushd control-plane/networking/nncp
27+
28+
# Generate the configuration
29+
kustomize build > nncp.yaml
30+
31+
# Apply the generated configuration
32+
oc apply -f nncp.yaml
33+
34+
# Wait till the network configuration is applied.
35+
oc wait nncp -l osp/nncm-config-type=standard \
36+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured \
37+
--timeout=300s
38+
39+
# change the working directory
40+
popd
41+
```
42+
# Apply remainig networking configuration
43+
44+
Generate the remaining networking configuration
45+
```bash
46+
kustomize build control-plane/networking > networking.yaml
47+
```
48+
Apply the networking CRs
49+
```bash
50+
oc apply -f networking.yaml
51+
```
52+
53+
# Generate and apply the control-plane configurations.
54+
55+
```bash
56+
# Navigate to control-panel
57+
pushd control-plane
58+
59+
# Generate the CR
60+
kustomize build > control-plane.yaml
61+
62+
# Apply the CR
63+
oc apply -f control-plane.yaml
64+
65+
# Wait till the control plane is ready.
66+
oc wait openstackcontrolplane --for condition=Ready --timeout=600s
67+
68+
# change the work_dir
69+
popd
Lines changed: 4 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,10 @@
11
---
2-
apiVersion: kustomize.config.k8s.io/v1alpha1
3-
kind: Component
4-
5-
transformers:
6-
# Set namespace to OpenStack on all namespaced objects without a namespace
7-
- |-
8-
apiVersion: builtin
9-
kind: NamespaceTransformer
10-
metadata:
11-
name: _ignored_
12-
namespace: openstack
13-
setRoleBindingSubjects: none
14-
unsetOnly: true
15-
fieldSpecs:
16-
- path: metadata/name
17-
kind: Namespace
18-
create: true
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
194

205
components:
21-
- ../../../../../lib/networking/metallb
22-
- ../../../../../lib/networking/netconfig
23-
- ../../../../../lib/networking/nad
24-
- ../../../../../lib/control-plane
6+
- ../../../../va/nvidia-vfio-passthrough
257

268
resources:
27-
- nncp/values.yaml
9+
- networking/nncp/values.yaml
2810
- service-values.yaml
29-
30-
replacements:
31-
# Control plane customization
32-
- source:
33-
kind: ConfigMap
34-
name: service-values
35-
fieldPath: data.neutron.customServiceConfig
36-
targets:
37-
- select:
38-
kind: OpenStackControlPlane
39-
fieldPaths:
40-
- spec.neutron.template.customServiceConfig
41-
options:
42-
create: true
43-
# OVN control plane customization
44-
- source:
45-
kind: ConfigMap
46-
name: service-values
47-
fieldPath: data.ovn.ovnController.nicMappings
48-
targets:
49-
- select:
50-
kind: OpenStackControlPlane
51-
fieldPaths:
52-
- spec.ovn.template.ovnController.nicMappings
53-
options:
54-
create: true
55-
- source:
56-
kind: ConfigMap
57-
name: service-values
58-
fieldPath: data.glance.customServiceConfig
59-
targets:
60-
- select:
61-
kind: OpenStackControlPlane
62-
fieldPaths:
63-
- spec.glance.template.customServiceConfig
64-
options:
65-
create: true
66-
- source:
67-
kind: ConfigMap
68-
name: service-values
69-
fieldPath: data.glance.default.replicas
70-
targets:
71-
- select:
72-
kind: OpenStackControlPlane
73-
fieldPaths:
74-
- spec.glance.template.glanceAPIs.default.replicas
75-
options:
76-
create: true
77-
- source:
78-
kind: ConfigMap
79-
name: service-values
80-
fieldPath: data.swift.enabled
81-
targets:
82-
- select:
83-
kind: OpenStackControlPlane
84-
fieldPaths:
85-
- spec.swift.enabled
86-
options:
87-
create: true
88-
- source:
89-
kind: ConfigMap
90-
name: service-values
91-
fieldPath: data.nova.schedulerServiceTemplate.customServiceConfig
92-
targets:
93-
- select:
94-
kind: OpenStackControlPlane
95-
fieldPaths:
96-
- spec.nova.template.schedulerServiceTemplate.customServiceConfig
97-
options:
98-
create: true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated files
2+
nncp.yaml

examples/va/nvidia-vfio-passthrough/edpm-post.md renamed to examples/va/nvidia-vfio-passthrough/data-plane-post.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Assumptions
44

5-
- Initial [dataplane](edpm-pre.md) deployment has finalized and is successful
5+
- Initial [dataplane](data-plane-pre.md) deployment has finalized and is successful
66

77
## Reboot EDPM Nodes
88
The EDPM Nodes will need a final reboot in order to apply changes done by the

examples/va/nvidia-vfio-passthrough/edpm-pre.md renamed to examples/va/nvidia-vfio-passthrough/data-plane-pre.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Assumptions
44

5-
- The [control plane](control-plane.md) has been created and successfully deployed
5+
- The [control plane](control-plane/README.md) has been created and successfully deployed
66

77
## Initialize
88

va/nvidia-vfio-passthrough/kustomization.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../lib/networking/metallb
22-
- ../../lib/networking/netconfig
23-
- ../../lib/networking/nad
2421
- ../../lib/control-plane
2522

2623
replacements:

0 commit comments

Comments
 (0)