Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uni06zeta initial version #159

Merged
merged 1 commit into from
Apr 19, 2024
Merged
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
2 changes: 1 addition & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ignore:

rules:
line-length:
max: 100
max: 256
level: warning
42 changes: 42 additions & 0 deletions automation/vars/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,45 @@ vas:
- name: edpm-values
src_file: values.yaml
build_output: dataplane.yaml

uni06zeta:
stages:
- path: examples/dt/uni06zeta/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/uni06zeta/control-plane
wait_conditions:
- >-
oc -n openstack wait openstackcontrolplane
controlplane
--for condition=Ready
--timeout=600s

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/uni06zeta
wait_conditions:
- >-
oc -n openstack wait openstackdataplanedeployment
edpm-deployment
--for condition=Ready
--timeout=1200s
values:
- name: edpm-values
src_file: values.yaml
build_output: edpm.yaml
11 changes: 11 additions & 0 deletions dt/uni06zeta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Deployed Topology - Zeta

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

This directory `dt/uni06zeta/`, exists so that the
[kustomization.yaml](../../examples/dt/uni06zeta/kustomization.yaml) in
the examples directory of uni06zeta topology, reference it by path as a
component. It's contents are likely uninteresting unless you want to understand
how kustomize was implemented in this repository.
20 changes: 20 additions & 0 deletions dt/uni06zeta/edpm/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true

components:
- ../../../lib/dataplane
156 changes: 156 additions & 0 deletions dt/uni06zeta/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
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
- ../../lib/control-plane

replacements:
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderVolumes.lvm-nvme-tcp.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderVolumes.lvm-nvme-tcp.replicas
options:
create: true
- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderVolumes.lvm-nvme-tcp.nodeSelector.kubernetes\.io/hostname
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderVolumes.lvm-nvme-tcp.nodeSelector.kubernetes\.io/hostname
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.cinderVolumes.lvm-nvme-tcp.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderVolumes.lvm-nvme-tcp.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.cinderBackup.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.cinder.template.cinderBackup.replicas
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.glance.default.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.glance.template.glanceAPIs.default.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.default.replicas
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.glance.template.glanceAPIs.default.replicas
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.swift.enabled
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.swift.enabled
options:
create: true

# TODO: octavia
- source:
kind: ConfigMap
name: service-values
fieldPath: data.ovn.ovnController.availability-zones
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ovn.template.ovnController.external-ids.availability-zones
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.neutron.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.neutron.template.customServiceConfig
options:
create: true
12 changes: 12 additions & 0 deletions dt/uni06zeta/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
1 change: 1 addition & 0 deletions examples/dt/uni06zeta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data-plane.yaml
118 changes: 118 additions & 0 deletions examples/dt/uni06zeta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Deployed Topology - Zeta

This document contains a list of integration test suites that would be
executed against the below specified topology of Red Hat OpenStack Services
on OpenShift. It also contains a collection of custom resources (CRs) for
deploying the test environment.

## Purpose

Focused on components with a bit of heterogeneous configuration (please see below).

## Environment

### Nodes


## Node topology
| Node role | bm/vm | amount |
| ------------------------------------------------ | ----- | ------ |
| Openshift master/worker combo-node cluster | vm | 3 |
| Compute nodes | vm | 2 |
| HCI Ceph (TBD, see below) | vm | - |

### Networks

| Name | Type | Interface |
| ---- | ---- | --------- |
| Provisioning | untagged | nic1 |
| Machine | untagged | nic2 |
| RH OSP | trunk | nic3 |

#### Networks in RH OSP

| Name | Type |
| ---- | ---- |
| ctlplane | untagged |
| internalapi | VLAN tagged |
| Storage | VLAN tagged |
| Tenant | VLAN tagged |

### Services, enabled features and configurations

| Service | configuration | Lock-in coverage? |
| ---------------- | ------------------------- | ------------------ |
| Cinder | nvemof-tcp / lvm | Must have |
| Cinder Backup | Swift/S3/zstd | Must have |
| Glance | Swift | Must have |
| Swift | (default) | Must have |
| Octavia | (ovn) | Must have |
| Horizon | N/A | Must have |
| Barbican | (default) | Must have |
| Neutron | OVN/no-dvr/provider_vlans | Must have |

#### Support services

The following table lists services which are not the main focus of the testing
(which may be covered by additional scenarios), but are required for the DT to
work properly and can be deployed with any/default configuration.

| Service | Reason |
| ---------------- |--------------------------- |
| Barbican | needed by other services |
| Neutron | needed by other services |
| Nova | needed by scenario testing |
| Swift | needed by scenario testing |
| Keystone | needed by all services |

### Additional configuration

- Always-on, default services and features: TLSe
- Logical volume with the name cinder-volumes exists on a OpenShift node.
- The S3 backend for cinder-backup requires a valid S3 implementation, which could be provided by HCI Ceph services or by Swift, if Swift can be deployed first.
cinder-backup expected to compress the backups.

#### Cinder backend - LVM

It is assumed that worker nodes or the master nodes have extra disks(or loopack device)
and there exists a logical volume group with the name *cinder-volumes*. If not, a
for example a `MachineConfig` can be used to create one.

The LVM backend for Cinder is a special case as the storage data is on the
OpenShift node and has no external storage systems. The target ips are not managed by
the operators, recommended to create dedicated label for each target serving node
and configure the storage ips of each cinder-volume instance with LVM backend.


## Testing tree

| Test framework | When to run | Special configuration |
| ---------------- | -------------------- | ----------------------|
| relevant volume tests | tempest stage | |
| relevant image tests | tempest stage | |
| relevant object-storage tests | tempest stage | |
| relevant networking tests | tempest stage | full CentOS/RHEL image |
| horizon integration | own stage (post-tempest)| |

## Additional steps

In case you are testing on a single hypervisor, the hypervisor routing interface should be configured using `ip` and `iptables`:
```bash
ip link add link osp_trunk name vlan218 type vlan id 218
ip addr add 172.38.0.1/24 dev vlan218
ip link set dev vlan218 up
iptables -A POSTROUTING -s 172.38.0.0/24 ! -d 172.38.0.0/24 -j MASQUERADE -t nat
```

You also need to setup cinder backup bucket/container,
This is just example, you might want to choose a non admin user.
```bash
oc rsh -n openstack openstackclient openstack container create volumebackups
oc rsh -n openstack openstackclient openstack credential create --type ec2 --project admin admin '{"access": "example", "secret": "example"}'
```

## Workflow

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