Skip to content

Commit 2b53bd2

Browse files
Merge pull request #392 from sbekkerm/dcn
Introduce DCN DT This PR introduces DCN VA, which builds upon the HCI VA architecture and is designed for multi-site deployment. In addition to the regular configuration files, this PR includes Jinja templates for generating values.yaml and service-values.yaml files. These templates are essential for Zuul job execution, allowing for the creation of site-specific configuration files multiple times for each DCN site. Reviewed-by: Andrew Bays <[email protected]> Reviewed-by: Sergey Bekkerman Reviewed-by: John Fulton <[email protected]> Reviewed-by: Marián Krčmárik Reviewed-by: Francesco Pantano <[email protected]>
2 parents 65b46e3 + 710f7ad commit 2b53bd2

36 files changed

+3471
-0
lines changed

automation/net-env/dcn.yaml

Lines changed: 1275 additions & 0 deletions
Large diffs are not rendered by default.

automation/vars/dcn.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
vas:
3+
dcn:
4+
stages:
5+
- path: examples/dt/dcn/control-plane/nncp
6+
wait_conditions:
7+
- >-
8+
oc -n openstack wait nncp
9+
-l osp/nncm-config-type=standard
10+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
11+
--timeout=60s
12+
values:
13+
- name: network-values
14+
src_file: values.yaml
15+
build_output: nncp.yaml
16+
17+
- path: examples/dt/dcn/control-plane
18+
wait_conditions:
19+
- >-
20+
oc -n openstack wait osctlplane controlplane --for condition=Ready
21+
--timeout=30m
22+
values:
23+
- name: network-values
24+
src_file: nncp/values.yaml
25+
build_output: ../control-plane.yaml
26+
post_stage_run:
27+
- name: Deploy DCN
28+
type: playbook
29+
source: "../../playbooks/dcn.yml"
30+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"

dt/dcn/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# DT: DCN
2+
3+
If you are looking for information on how to deploy the DCN DT, then
4+
please see the
5+
[DCN README in the examples directory](../../examples/dt/dcn/README.md).
6+
7+
This directory, `architecture/dt/dcn/`, exists so that the
8+
[kustomization.yaml](../../examples/dt/dcn/kustomization.yaml)
9+
in the examples directory for the DCN DT, reference it by path as a
10+
component. Its contents are likely uninteresting unless you want to
11+
understand how kustomize was implemented in this repository.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
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
19+
20+
components:
21+
- ../../../../lib/dataplane/deployment
22+
23+
replacements:
24+
- source:
25+
kind: ConfigMap
26+
name: edpm-deployment-values-post-ceph
27+
fieldPath: data.deployment.name
28+
targets:
29+
- select:
30+
kind: OpenStackDataPlaneDeployment
31+
fieldPaths:
32+
- metadata.name
33+
options:
34+
create: true
35+
36+
- source:
37+
kind: ConfigMap
38+
name: edpm-deployment-values-post-ceph
39+
fieldPath: data.nodeset_name
40+
targets:
41+
- select:
42+
kind: OpenStackDataPlaneDeployment
43+
fieldPaths:
44+
- spec.nodeSets.*
45+
options:
46+
create: true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
apiVersion: v1
3+
data:
4+
ceph.client.openstack.keyring: _ignored_
5+
ceph.conf: _ignored_
6+
kind: Secret
7+
metadata:
8+
name: ceph-conf-files
9+
namespace: openstack
10+
type: Opaque
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
apiVersion: dataplane.openstack.org/v1beta1
3+
kind: OpenStackDataPlaneNodeSet
4+
metadata:
5+
name: openstack-edpm
6+
spec:
7+
nodeTemplate:
8+
extraMounts:
9+
- extraVolType: Ceph
10+
mounts:
11+
- mountPath: /etc/ceph
12+
name: ceph
13+
readOnly: true
14+
volumes:
15+
- name: ceph
16+
secret:
17+
secretName: ceph-conf-files
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
---
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
19+
20+
components:
21+
- ../../../../lib/control-plane
22+
- ../../../../lib/dataplane/nodeset
23+
24+
resources:
25+
- ceph_secret.yaml
26+
- nova_ceph.yaml
27+
28+
patches:
29+
- target:
30+
kind: OpenStackDataPlaneNodeSet
31+
name: .*
32+
path: extra_mounts.yaml
33+
34+
replacements:
35+
- source:
36+
kind: ConfigMap
37+
name: edpm-nodeset-values-post-ceph
38+
fieldPath: data.nodeset_name
39+
targets:
40+
- select:
41+
kind: OpenStackDataPlaneNodeSet
42+
fieldPaths:
43+
- metadata.name
44+
options:
45+
create: true
46+
47+
# Control plane custom service configs
48+
- source:
49+
kind: ConfigMap
50+
name: service-values
51+
fieldPath: data.nova.customServiceConfig
52+
targets:
53+
- select:
54+
kind: OpenStackControlPlane
55+
fieldPaths:
56+
- spec.nova.template.apiServiceTemplate.customServiceConfig
57+
options:
58+
create: true
59+
- source:
60+
kind: ConfigMap
61+
name: service-values
62+
fieldPath: data.neutron.template.customServiceConfig
63+
targets:
64+
- select:
65+
kind: OpenStackControlPlane
66+
fieldPaths:
67+
- spec.neutron.template.customServiceConfig
68+
options:
69+
create: true
70+
- source:
71+
kind: ConfigMap
72+
name: service-values
73+
fieldPath: data.cinderBackup.customServiceConfig
74+
targets:
75+
- select:
76+
kind: OpenStackControlPlane
77+
fieldPaths:
78+
- spec.cinder.template.cinderBackup.customServiceConfig
79+
options:
80+
create: true
81+
- source:
82+
kind: ConfigMap
83+
name: service-values
84+
fieldPath: data.cinderVolumes
85+
targets:
86+
- select:
87+
kind: OpenStackControlPlane
88+
fieldPaths:
89+
- spec.cinder.template.cinderVolumes
90+
options:
91+
create: true
92+
- source:
93+
kind: ConfigMap
94+
name: service-values
95+
fieldPath: data.cinderAPI.replicas
96+
targets:
97+
- select:
98+
kind: OpenStackControlPlane
99+
fieldPaths:
100+
- spec.cinder.template.cinderAPI.replicas
101+
options:
102+
create: true
103+
- source:
104+
kind: ConfigMap
105+
name: service-values
106+
fieldPath: data.cinderAPI.customServiceConfig
107+
targets:
108+
- select:
109+
kind: OpenStackControlPlane
110+
fieldPaths:
111+
- spec.cinder.template.cinderAPI.customServiceConfig
112+
options:
113+
create: true
114+
- source:
115+
kind: ConfigMap
116+
name: service-values
117+
fieldPath: data.cinderBackup.replicas
118+
targets:
119+
- select:
120+
kind: OpenStackControlPlane
121+
fieldPaths:
122+
- spec.cinder.template.cinderBackup.replicas
123+
options:
124+
create: true
125+
- source:
126+
kind: ConfigMap
127+
name: service-values
128+
fieldPath: data.glance.customServiceConfig
129+
targets:
130+
- select:
131+
kind: OpenStackControlPlane
132+
fieldPaths:
133+
- spec.glance.template.customServiceConfig
134+
options:
135+
create: true
136+
- source:
137+
kind: ConfigMap
138+
name: service-values
139+
fieldPath: data.glance.glanceAPIs
140+
targets:
141+
- select:
142+
kind: OpenStackControlPlane
143+
fieldPaths:
144+
- spec.glance.template.glanceAPIs
145+
options:
146+
create: true
147+
- source:
148+
kind: ConfigMap
149+
name: service-values
150+
fieldPath: data.manila.enabled
151+
targets:
152+
- select:
153+
kind: OpenStackControlPlane
154+
fieldPaths:
155+
- spec.manila.enabled
156+
options:
157+
create: true
158+
- source:
159+
kind: ConfigMap
160+
name: service-values
161+
fieldPath: data.manila.manilaAPI.customServiceConfig
162+
targets:
163+
- select:
164+
kind: OpenStackControlPlane
165+
fieldPaths:
166+
- spec.manila.template.manilaAPI.customServiceConfig
167+
options:
168+
create: true
169+
- source:
170+
kind: ConfigMap
171+
name: service-values
172+
fieldPath: data.manila.manilaShares.share1.customServiceConfig
173+
targets:
174+
- select:
175+
kind: OpenStackControlPlane
176+
fieldPaths:
177+
- spec.manila.template.manilaShares.share1.customServiceConfig
178+
options:
179+
create: true
180+
- source:
181+
kind: ConfigMap
182+
name: service-values
183+
fieldPath: data.extraMounts
184+
targets:
185+
- select:
186+
kind: OpenStackControlPlane
187+
fieldPaths:
188+
- spec.extraMounts
189+
options:
190+
create: true
191+
# Ceph keyring
192+
- source:
193+
kind: ConfigMap
194+
name: edpm-nodeset-values-post-ceph
195+
fieldPath: data.ceph_conf
196+
targets:
197+
- select:
198+
kind: Secret
199+
name: ceph-conf-files
200+
fieldPaths:
201+
- data
202+
options:
203+
create: true
204+
# Nova Ceph conf
205+
- source:
206+
kind: ConfigMap
207+
name: edpm-nodeset-values-post-ceph
208+
fieldPath: data.nova.ceph.conf
209+
targets:
210+
- select:
211+
kind: ConfigMap
212+
name: ceph-nova
213+
fieldPaths:
214+
- data.03-ceph-nova\.conf
215+
options:
216+
create: true
217+
- source:
218+
kind: ConfigMap
219+
name: edpm-nodeset-values-post-ceph
220+
fieldPath: data.nova.name
221+
targets:
222+
- select:
223+
kind: ConfigMap
224+
name: ceph-nova
225+
fieldPaths:
226+
- metadata.name
227+
options:
228+
create: true
229+
- source:
230+
kind: ConfigMap
231+
name: edpm-nodeset-values-post-ceph
232+
fieldPath: data.nova.dataSources
233+
targets:
234+
- select:
235+
kind: OpenStackDataPlaneService
236+
fieldPaths:
237+
- spec.dataSources
238+
options:
239+
create: true
240+
# Dataplane services override (overrides ../../../lib/dataplane which
241+
# is using edpm-nodeset-values ConfigMap)
242+
- source:
243+
kind: ConfigMap
244+
name: edpm-nodeset-values-post-ceph
245+
fieldPath: data.nodeset.services
246+
targets:
247+
- select:
248+
kind: OpenStackDataPlaneNodeSet
249+
fieldPaths:
250+
- spec.services
251+
options:
252+
create: true
253+
- source:
254+
kind: ConfigMap
255+
name: edpm-nodeset-values-post-ceph
256+
fieldPath: data.customDataplanService.name
257+
targets:
258+
- select:
259+
kind: OpenStackDataPlaneService
260+
fieldPaths:
261+
- metadata.name
262+
options:
263+
create: true

0 commit comments

Comments
 (0)