Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions automation/vars/dcn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vas:
dcn:
stages:
- name: nncp-configuration
path: examples/dt/dcn/control-plane/nncp
path: examples/dt/dcn/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
Expand All @@ -15,6 +15,19 @@ vas:
src_file: values.yaml
build_output: nncp.yaml

- name: networking
path: examples/dt/dcn/control-plane/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
-l app=metallb -l component=speaker
--for condition=Ready
--timeout=5m
values:
- name: network-values
src_file: nncp/values.yaml
build_output: network.yaml

- name: control-plane
path: examples/dt/dcn/control-plane
wait_conditions:
Expand All @@ -23,7 +36,7 @@ vas:
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
src_file: networking/nncp/values.yaml
build_output: ../control-plane.yaml
post_stage_run:
- name: Deploy DCN
Expand Down
67 changes: 0 additions & 67 deletions dt/dcn/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,71 +25,4 @@ transformers:
create: true

components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- ../../lib/control-plane

resources:
- nad.yaml

# Add storagemgmt network template, as it is needed for CephHCI
patches:
- target:
version: v1beta1
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: _replaced_
name: storagemgmt
subnets:
- _replaced_
mtu: 1500

# Add storagemgmt network replacements
replacements:
# NetConfig dnsDomain specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].dnsDomain
# NetConfig MTU specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].mtu
# NetConfig subnets specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].subnets

# Octavia support
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
87 changes: 87 additions & 0 deletions dt/dcn/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
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

resources:
- nad.yaml

# Add storagemgmt network template, as it is needed for CephHCI
patches:
- target:
version: v1beta1
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: _replaced_
name: storagemgmt
subnets:
- _replaced_
mtu: 1500

# Add storagemgmt network replacements
replacements:
# NetConfig dnsDomain specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].dnsDomain
# NetConfig MTU specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].mtu
# NetConfig subnets specific to this VA
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storagemgmt.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storagemgmt].subnets

# Octavia support
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
8 changes: 8 additions & 0 deletions dt/dcn/networking/nad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: octavia
labels:
osp/net: octavia
osp/net-attach-def-type: standard
2 changes: 1 addition & 1 deletion examples/dt/dcn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is a collection of CR templates that represent a Red Hat OpenStack Services

2. The CRs are applied against an OpenShift cluster in _stages_. That is, there is an ordering in which each grouping of CRs is fed to the cluster. It is _not_ a case of simply taking all CRs from all stages and applying them all at once.

3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to genereate the control plane CRs dynamically. The `control-plane/nncp/values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required.
3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to generate the control plane CRs dynamically. The `control-plane/networking/nncp/values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required.

4. In stages 3 and 4 [kustomize](https://kustomize.io/) is used to generate the dataplane CRs dynamically. The `edpm-pre-ceph/values.yaml`, `values.yaml` and `service-values.yaml` files must be updated to fit your environment. kustomize version 5 or newer required.

Expand Down
30 changes: 25 additions & 5 deletions examples/dt/dcn/control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ Change to the dcn directory
cd architecture/examples/dt/dcn
```

Edit the [control-plane/nncp/values.yaml](control-plane/nncp/values.yaml) file to suit your environment.
Edit the [control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml) file to suit your environment.

```shell
vi control-plane/nncp/values.yaml
vi control-plane/networking/nncp/values.yaml
```

## Apply node network configuration

Generate the node network configuration

```shell
kustomize build control-plane/nncp > nncp.yaml
kustomize build control-plane/networking/nncp > nncp.yaml
```

Apply the NNCP CRs
Expand All @@ -44,9 +44,29 @@ 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
## Apply networking configuration

Generate the control-plane and networking CRs.
Generate the networking CRs.

```shell
kustomize build control-plane/networking > networking.yaml
```

Apply the networking CRs

```shell
oc apply -f networking.yaml
```

Wait for MetalLB to be available

```shell
oc -n metallb-system wait pod -l app=metallb -l component=speaker --for condition=Ready --timeout=5m
```

## Apply control-plane configuration

Generate the control-plane CRs.

```shell
kustomize build control-plane > control-plane.yaml
Expand Down
2 changes: 1 addition & 1 deletion examples/dt/dcn/control-plane/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ components:
- ../../../../dt/dcn/

resources:
- nncp/values.yaml
- networking/nncp/values.yaml
- service-values.yaml
9 changes: 9 additions & 0 deletions examples/dt/dcn/control-plane/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../dt/dcn/networking

resources:
- nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ transformers:
create: true

components:
- ../../../../../dt/dcn/nncp
- ../../../../../../dt/dcn/nncp


resources:
Expand Down
2 changes: 1 addition & 1 deletion examples/dt/dcn/control-plane/scaledown/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ components:
- ../../../../../dt/dcn/control-plane

resources:
- ../nncp
- ../networking/nncp
- service-values.yaml
2 changes: 1 addition & 1 deletion examples/dt/dcn/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ components:
- ../../../dt/dcn/edpm-post-ceph/nodeset

resources:
- control-plane/nncp/values.yaml
- control-plane/networking/nncp/values.yaml
- edpm-pre-ceph/nodeset/values.yaml
- service-values.yaml
- values.yaml
3 changes: 2 additions & 1 deletion zuul.d/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
- automation/net-env/dcn.yaml
- dt/dcn
- examples/dt/dcn/control-plane
- examples/dt/dcn/control-plane/nncp
- examples/dt/dcn/control-plane/networking
- examples/dt/dcn/control-plane/networking/nncp
- lib
name: rhoso-architecture-validate-dcn
parent: rhoso-architecture-base-job
Expand Down