Skip to content

Commit b6e07bf

Browse files
committed
[OSPRH-15434] Multi-namespace VA
1 parent 408c010 commit b6e07bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2862
-0
lines changed

automation/net-env/multi-namespace.yaml

Lines changed: 1021 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
---
2+
vas:
3+
multi-namespace:
4+
stages:
5+
- name: namespace-configuration # stage 0
6+
path: examples/va/multi-namespace/namespace
7+
wait_conditions:
8+
- >-
9+
oc -n default wait ns openstack2
10+
--for jsonpath='{.status.phase}'=Active
11+
--timeout=5m
12+
values:
13+
- name: namespace-values
14+
src_file: values.yaml
15+
build_output: namespace.yaml
16+
17+
- name: nncp-configuration # stage 1
18+
path: examples/va/multi-namespace/control-plane/networking/nncp
19+
wait_conditions:
20+
# We don't wait for these NNCPs at this stage, because we'll wait for
21+
# both namespaces in the next stage so that they can deploy in parallel
22+
# to save time
23+
- >-
24+
oc -n default wait ns openstack2
25+
--for jsonpath='{.status.phase}'=Active
26+
--timeout=5m
27+
values:
28+
- name: network-values
29+
src_file: values.yaml
30+
build_output: nncp.yaml
31+
32+
- name: nncp-configuration2 # stage 2
33+
path: examples/va/multi-namespace/control-plane2/networking/nncp
34+
wait_conditions:
35+
- >-
36+
oc -n openstack wait nncp
37+
-l osp/nncm-config-type=standard
38+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
39+
--timeout=5m
40+
values:
41+
- name: network-values2
42+
src_file: values.yaml
43+
build_output: nncp2.yaml
44+
45+
- name: network-configuration # stage 3
46+
path: examples/va/multi-namespace/control-plane/networking
47+
wait_conditions:
48+
- >-
49+
oc -n metallb-system wait pod
50+
-l app=metallb -l component=speaker
51+
--for condition=Ready
52+
--timeout=5m
53+
values:
54+
- name: network-values
55+
src_file: nncp/values.yaml
56+
build_output: network.yaml
57+
58+
- name: network-configuration2 # stage 4
59+
path: examples/va/multi-namespace/control-plane2/networking
60+
wait_conditions:
61+
- >-
62+
oc -n metallb-system wait pod
63+
-l app=metallb -l component=speaker
64+
--for condition=Ready
65+
--timeout=5m
66+
values:
67+
- name: network-values2
68+
src_file: nncp/values.yaml
69+
build_output: network2.yaml
70+
71+
- name: control-plane # stage 5
72+
path: examples/va/multi-namespace/control-plane
73+
wait_conditions:
74+
# We don't wait for this namespace's OpenStackControlPlane at
75+
# this stage, because we'll wait for both namespaces in the next
76+
# stage so that they can deploy in parallel to save time
77+
- >-
78+
oc -n default wait ns openstack2
79+
--for jsonpath='{.status.phase}'=Active
80+
--timeout=5m
81+
values:
82+
- name: service-values
83+
src_file: service-values.yaml
84+
- name: network-values
85+
src_file: networking/nncp/values.yaml
86+
build_output: ../control-plane.yaml
87+
88+
- name: control-plane2 # stage 6
89+
path: examples/va/multi-namespace/control-plane2
90+
wait_conditions:
91+
- >-
92+
oc -n openstack wait osctlplane controlplane --for condition=Ready
93+
--timeout=60m
94+
- >-
95+
oc -n openstack2 wait osctlplane controlplane --for condition=Ready
96+
--timeout=60m
97+
values:
98+
- name: service-values
99+
src_file: service-values.yaml
100+
- name: network-values2
101+
src_file: networking/nncp/values.yaml
102+
build_output: ../control-plane2.yaml
103+
104+
- name: edpm-nodeset # stage 7
105+
path: examples/va/multi-namespace/edpm/nodeset
106+
wait_conditions:
107+
# We don't wait for this namespace's OpenStackDataPlaneNodeSet at
108+
# this stage, because we'll wait for both namespaces in the next
109+
# stage so that they can deploy in parallel to save time
110+
- >-
111+
oc -n default wait ns openstack2
112+
--for jsonpath='{.status.phase}'=Active
113+
--timeout=5m
114+
values:
115+
- name: edpm-nodeset-values
116+
src_file: values.yaml
117+
build_output: nodeset.yaml
118+
119+
- pre_stage_run: # stage 8
120+
- name: Get OpenStackDataPlaneServices for openstack2 namespace
121+
type: playbook
122+
source: "../../playbooks/multi-namespace/ns2_osdp_services.yaml"
123+
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
124+
name: edpm-nodeset2
125+
path: examples/va/multi-namespace/edpm2/nodeset
126+
wait_conditions:
127+
- >-
128+
oc -n openstack wait
129+
osdpns openstack-edpm --for condition=SetupReady
130+
--timeout=10m
131+
- >-
132+
oc -n openstack2 wait
133+
osdpns openstack-edpm --for condition=SetupReady
134+
--timeout=10m
135+
values:
136+
- name: edpm-nodeset2-values
137+
src_file: values.yaml
138+
build_output: nodeset2.yaml
139+
140+
- name: edpm-deployment # stage 9
141+
path: examples/va/multi-namespace/edpm
142+
wait_conditions:
143+
# We don't wait for this namespace's OpenStackDataPlaneDeployment at
144+
# this stage, because we'll wait for both namespaces in the next
145+
# stage so that they can deploy in parallel to save time
146+
- >-
147+
oc -n default wait ns openstack2
148+
--for jsonpath='{.status.phase}'=Active
149+
--timeout=5m
150+
values:
151+
- name: edpm-deployment-values
152+
src_file: values.yaml
153+
build_output: deployment.yaml
154+
155+
- name: edpm-deployment2 # stage 10
156+
path: examples/va/multi-namespace/edpm2
157+
wait_conditions:
158+
- >-
159+
oc -n openstack wait
160+
osdpns openstack-edpm --for condition=Ready
161+
--timeout=30m
162+
- >-
163+
oc -n openstack2 wait
164+
osdpns openstack-edpm --for condition=Ready
165+
--timeout=30m
166+
values:
167+
- name: edpm-deployment2-values
168+
src_file: values.yaml
169+
build_output: deployment2.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace.yaml
2+
nncp.yaml
3+
nncp2.yaml
4+
networking.yaml
5+
networking2.yaml
6+
control-plane.yaml
7+
control-plane2.yaml
8+
nodeset.yaml
9+
nodeset2.yaml
10+
deployment.yaml
11+
deployment2.yaml
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Dual OpenStack deployments in separate namespaces
2+
3+
**Based on OpenStack K8S operators from the "main" branch of the [OpenStack Operator repo](https://github.com/openstack-k8s-operators/openstack-operator/commit/b0944fc30a9387cf41d019165c5dbc6a8f128597) on Apr 25th, 2025**
4+
5+
This is a collection of CR templates that represent a validated Red Hat OpenStack Services on OpenShift deployment that has the following characteristics:
6+
7+
- 3 master/worker combo-node OpenShift cluster
8+
- 2 OSP control and data plane deployments (2 separate clouds in different namespaces)
9+
10+
Per cloud:
11+
12+
- 3-replica Galera database
13+
- RabbitMQ
14+
- OVN networking
15+
- Network isolation over a single NIC
16+
- 3 compute nodes
17+
18+
## Considerations
19+
20+
1. These CRs are validated for the overall functionality of the OSP cloud deployed, but they nonetheless require customization for the particular environment in which they are utilized. In this sense they are _templates_ meant to be consumed and tweaked to fit the specific constraints of the hardware available.
21+
22+
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.
23+
24+
3. [kustomize](https://kustomize.io/) is used to genereate the control plane CRs dynamically. The `control-plane/networking/nncp/values.yaml`, `control-plane/service-values.yaml`, `control-plane2/networking/nncp/values.yaml` and `control-plane2/service-values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required.
25+
26+
4. [kustomize](https://kustomize.io/) is used to generate the dataplane CRs dynamically. The `edpm/nodeset/values.yaml` and `edpm2/nodeset/values.yaml` files must be updated to fit your environment. kustomize version 5 or newer required.
27+
28+
## Stages
29+
30+
All stages must be executed in the order listed below. Everything is required unless otherwise indicated.
31+
32+
1. [Install the OpenStack K8S operators and their dependencies](../../common/)
33+
2. [Create the second namespace](namespace.md)
34+
3. [Configuring networking and deploy the OpenStack control planes](control-plane.md)
35+
4. [Deploy the data planes](dataplane.md)
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
Change to the multi-namespace directory
10+
```
11+
cd architecture/examples/va/multi-namespace
12+
```
13+
14+
## Control plane one
15+
16+
Edit the [control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml) and
17+
[control-plane/service-values.yaml](control-plane/service-values.yaml) files to suit
18+
your environment.
19+
```
20+
vi control-plane/networking/nncp/values.yaml
21+
vi control-plane/service-values.yaml
22+
```
23+
24+
### Apply node network configuration
25+
26+
Generate the node network configuration
27+
```
28+
kustomize build control-plane/networking/nncp > nncp.yaml
29+
```
30+
Apply the NNCP CRs
31+
```
32+
oc apply -f nncp.yaml
33+
```
34+
Wait for NNCPs to be available
35+
```
36+
oc wait -n openstack nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s
37+
```
38+
39+
### Apply networking configuration
40+
41+
Generate the networking configuration
42+
```
43+
kustomize build control-plane/networking > networking.yaml
44+
```
45+
Apply the networking CRs
46+
```
47+
oc apply -f networking.yaml
48+
```
49+
50+
### Apply control-plane configuration
51+
52+
Generate the control-plane and networking CRs.
53+
```
54+
kustomize build control-plane > control-plane.yaml
55+
```
56+
Apply the CRs
57+
```
58+
oc apply -f control-plane.yaml
59+
```
60+
61+
Wait for control plane to be available
62+
```
63+
oc wait -n openstack osctlplane controlplane --for condition=Ready --timeout=600s
64+
```
65+
66+
## Control plane two
67+
68+
Edit the [control-plane2/networking/nncp/values.yaml](control-plane2/networking/nncp/values.yaml) and
69+
[control-plane2/service-values.yaml](control-plane2/service-values.yaml) files to suit
70+
your environment.
71+
```
72+
vi control-plane2/networking/nncp/values.yaml
73+
vi control-plane2/service-values.yaml
74+
```
75+
76+
### Apply node network configuration
77+
78+
Generate the node network configuration
79+
```
80+
kustomize build control-plane2/networking/nncp > nncp2.yaml
81+
```
82+
Apply the NNCP CRs
83+
```
84+
oc apply -f nncp2.yaml
85+
```
86+
Wait for NNCPs to be available
87+
```
88+
oc wait -n openstack2 nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s
89+
```
90+
91+
### Apply networking configuration
92+
93+
Generate the networking configuration
94+
```
95+
kustomize build control-plane2/networking > networking2.yaml
96+
```
97+
Apply the networking CRs
98+
```
99+
oc apply -f networking2.yaml
100+
```
101+
102+
### Apply control-plane configuration
103+
104+
Generate the control-plane and networking CRs.
105+
```
106+
kustomize build control-plane2 > control-plane2.yaml
107+
```
108+
Apply the CRs
109+
```
110+
oc apply -f control-plane2.yaml
111+
```
112+
113+
Wait for control plane to be available
114+
```
115+
oc wait -n openstack2 osctlplane controlplane --for condition=Ready --timeout=600s
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nncp.yaml
2+
networking.yaml
3+
control-plane.yaml

0 commit comments

Comments
 (0)