Skip to content

Commit

Permalink
Introduce support for DCN DT
Browse files Browse the repository at this point in the history
  • Loading branch information
sbekkerm committed Oct 22, 2024
1 parent a0cf8f9 commit 8f2f12a
Show file tree
Hide file tree
Showing 36 changed files with 3,471 additions and 0 deletions.
1,275 changes: 1,275 additions & 0 deletions automation/net-env/dcn.yaml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions automation/vars/dcn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
vas:
dcn:
stages:
- path: examples/dt/dcn/control-plane/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/dcn/control-plane
wait_conditions:
- >-
oc -n openstack wait osctlplane controlplane --for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
build_output: ../control-plane.yaml
post_stage_run:
- name: Deploy DCN
type: playbook
source: "../../playbooks/dcn.yml"
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
11 changes: 11 additions & 0 deletions dt/dcn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# DT: DCN

If you are looking for information on how to deploy the DCN DT, then
please see the
[DCN README in the examples directory](../../examples/dt/dcn/README.md).

This directory, `architecture/dt/dcn/`, exists so that the
[kustomization.yaml](../../examples/dt/dcn/kustomization.yaml)
in the examples directory for the DCN DT, reference it by path as a
component. Its contents are likely uninteresting unless you want to
understand how kustomize was implemented in this repository.
46 changes: 46 additions & 0 deletions dt/dcn/edpm-post-ceph/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
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

replacements:
- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.deployment.name
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- metadata.name
options:
create: true

- source:
kind: ConfigMap
name: edpm-deployment-values-post-ceph
fieldPath: data.nodeset_name
targets:
- select:
kind: OpenStackDataPlaneDeployment
fieldPaths:
- spec.nodeSets.*
options:
create: true
10 changes: 10 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/ceph_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
data:
ceph.client.openstack.keyring: _ignored_
ceph.conf: _ignored_
kind: Secret
metadata:
name: ceph-conf-files
namespace: openstack
type: Opaque
17 changes: 17 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/extra_mounts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
name: openstack-edpm
spec:
nodeTemplate:
extraMounts:
- extraVolType: Ceph
mounts:
- mountPath: /etc/ceph
name: ceph
readOnly: true
volumes:
- name: ceph
secret:
secretName: ceph-conf-files
263 changes: 263 additions & 0 deletions dt/dcn/edpm-post-ceph/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
---
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/control-plane
- ../../../../lib/dataplane/nodeset

resources:
- ceph_secret.yaml
- nova_ceph.yaml

patches:
- target:
kind: OpenStackDataPlaneNodeSet
name: .*
path: extra_mounts.yaml

replacements:
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nodeset_name
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- metadata.name
options:
create: true

# Control plane custom service configs
- source:
kind: ConfigMap
name: service-values
fieldPath: data.nova.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.nova.template.apiServiceTemplate.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.neutron.template.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.neutron.template.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderBackup.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderBackup.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderVolumes
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderVolumes
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderAPI.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderAPI.replicas
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderAPI.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderAPI.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderBackup.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderBackup.replicas
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.glanceAPIs
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.glance.template.glanceAPIs
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.enabled
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.enabled
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.manilaAPI.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.template.manilaAPI.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.manila.manilaShares.share1.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.manila.template.manilaShares.share1.customServiceConfig
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.extraMounts
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.extraMounts
options:
create: true
# Ceph keyring
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.ceph_conf
targets:
- select:
kind: Secret
name: ceph-conf-files
fieldPaths:
- data
options:
create: true
# Nova Ceph conf
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.ceph.conf
targets:
- select:
kind: ConfigMap
name: ceph-nova
fieldPaths:
- data.03-ceph-nova\.conf
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.name
targets:
- select:
kind: ConfigMap
name: ceph-nova
fieldPaths:
- metadata.name
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nova.dataSources
targets:
- select:
kind: OpenStackDataPlaneService
fieldPaths:
- spec.dataSources
options:
create: true
# Dataplane services override (overrides ../../../lib/dataplane which
# is using edpm-nodeset-values ConfigMap)
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.nodeset.services
targets:
- select:
kind: OpenStackDataPlaneNodeSet
fieldPaths:
- spec.services
options:
create: true
- source:
kind: ConfigMap
name: edpm-nodeset-values-post-ceph
fieldPath: data.customDataplanService.name
targets:
- select:
kind: OpenStackDataPlaneService
fieldPaths:
- metadata.name
options:
create: true
Loading

0 comments on commit 8f2f12a

Please sign in to comment.