Skip to content

Commit 4c87773

Browse files
Merge pull request #502 from sauragar/adoption_uni05epsilon
Decouple uni05epsilon network from control plane Ticket: OSPNW-903 Reviewed-by: Andrew Bays <[email protected]>
2 parents ebf6cc4 + 50c81de commit 4c87773

File tree

13 files changed

+887
-88
lines changed

13 files changed

+887
-88
lines changed

automation/net-env/uni05epsilon-adoption.yaml

Lines changed: 719 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
vas:
3+
uni05epsilon-adoption:
4+
stages:
5+
- path: examples/dt/uni05epsilon/control-plane/networking/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=5m
12+
values:
13+
- name: network-values
14+
src_file: values.yaml
15+
build_output: nncp.yaml
16+
17+
- path: examples/dt/uni05epsilon/control-plane/networking
18+
wait_conditions:
19+
- >-
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
23+
values:
24+
- name: network-values
25+
src_file: nncp/values.yaml
26+
build_output: networking.yaml

automation/vars/uni05epsilon.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
vas:
33
uni05epsilon:
44
stages:
5-
- path: examples/dt/uni05epsilon/control-plane/nncp
5+
- path: examples/dt/uni05epsilon/control-plane/networking/nncp
66
wait_conditions:
77
- >-
88
oc -n openstack wait nncp
@@ -14,6 +14,17 @@ vas:
1414
src_file: values.yaml
1515
build_output: nncp.yaml
1616

17+
- path: examples/dt/uni05epsilon/control-plane/networking
18+
wait_conditions:
19+
- >-
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
23+
values:
24+
- name: network-values
25+
src_file: nncp/values.yaml
26+
build_output: networking.yaml
27+
1728
- path: examples/dt/uni05epsilon/control-plane
1829
wait_conditions:
1930
- >-
@@ -23,7 +34,7 @@ vas:
2334
--timeout=60m
2435
values:
2536
- name: network-values
26-
src_file: nncp/values.yaml
37+
src_file: networking/nncp/values.yaml
2738
- name: service-values
2839
src_file: service-values.yaml
2940
build_output: control-plane.yaml

dt/uni05epsilon/kustomization.yaml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,43 +17,9 @@ transformers:
1717
create: true
1818
1919
components:
20-
- ../../lib/networking/metallb
21-
- ../../lib/networking/netconfig
22-
- ../../lib/networking/nad
2320
- ../../lib/control-plane
2421

25-
patches:
26-
#
27-
# The storagemgmt network template needed for CephHCI
28-
#
29-
- target:
30-
version: v1beta1
31-
kind: NetConfig
32-
name: netconfig
33-
patch: |-
34-
- op: add
35-
path: /spec/networks/-
36-
value:
37-
dnsDomain: _replaced_
38-
name: storagemgmt
39-
subnets:
40-
- _replaced_
41-
mtu: 1500
42-
4322
replacements:
44-
#
45-
# The storagemgmt network replacements
46-
#
47-
- source:
48-
kind: ConfigMap
49-
name: network-values
50-
fieldPath: data.storagemgmt.dnsDomain
51-
targets:
52-
- select:
53-
kind: NetConfig
54-
fieldPaths:
55-
- spec.networks.[name=storagemgmt].dnsDomain
56-
5723
- source:
5824
kind: ConfigMap
5925
name: service-values
@@ -113,23 +79,3 @@ replacements:
11379
- spec.nova.template.cellTemplates.cell2
11480
options:
11581
create: true
116-
117-
- source:
118-
kind: ConfigMap
119-
name: network-values
120-
fieldPath: data.storagemgmt.mtu
121-
targets:
122-
- select:
123-
kind: NetConfig
124-
fieldPaths:
125-
- spec.networks.[name=storagemgmt].mtu
126-
127-
- source:
128-
kind: ConfigMap
129-
name: network-values
130-
fieldPath: data.storagemgmt.subnets
131-
targets:
132-
- select:
133-
kind: NetConfig
134-
fieldPaths:
135-
- spec.networks.[name=storagemgmt].subnets
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
transformers:
6+
- |-
7+
apiVersion: builtin
8+
kind: NamespaceTransformer
9+
metadata:
10+
name: _ignored_
11+
namespace: openstack
12+
setRoleBindingSubjects: none
13+
unsetOnly: true
14+
fieldSpecs:
15+
- path: metadata/name
16+
kind: Namespace
17+
create: true
18+
19+
components:
20+
- ../../../lib/networking/metallb
21+
- ../../../lib/networking/netconfig
22+
- ../../../lib/networking/nad
23+
24+
patches:
25+
#
26+
# The storagemgmt network template needed for CephHCI
27+
#
28+
- target:
29+
version: v1beta1
30+
kind: NetConfig
31+
name: netconfig
32+
patch: |-
33+
- op: add
34+
path: /spec/networks/-
35+
value:
36+
dnsDomain: _replaced_
37+
name: storagemgmt
38+
subnets:
39+
- _replaced_
40+
mtu: 1500
41+
42+
replacements:
43+
#
44+
# The storagemgmt network replacements
45+
#
46+
- source:
47+
kind: ConfigMap
48+
name: network-values
49+
fieldPath: data.storagemgmt.dnsDomain
50+
targets:
51+
- select:
52+
kind: NetConfig
53+
fieldPaths:
54+
- spec.networks.[name=storagemgmt].dnsDomain
55+
56+
- source:
57+
kind: ConfigMap
58+
name: network-values
59+
fieldPath: data.storagemgmt.mtu
60+
targets:
61+
- select:
62+
kind: NetConfig
63+
fieldPaths:
64+
- spec.networks.[name=storagemgmt].mtu
65+
66+
- source:
67+
kind: ConfigMap
68+
name: network-values
69+
fieldPath: data.storagemgmt.subnets
70+
targets:
71+
- select:
72+
kind: NetConfig
73+
fieldPaths:
74+
- spec.networks.[name=storagemgmt].subnets

examples/dt/uni05epsilon/control-plane.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,49 @@ cd architecture/examples/dt/uni05epsilon
2121
```
2222

2323
Edit [control-plane/service-values.yaml](control-plane/service-values.yaml) and
24-
[control-plane/nncp/values.yaml](control-plane/nncp/values.yaml).
24+
[control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml).
2525

26-
Apply node network configuration
26+
## Apply node network configuration
2727

28+
Generate the node network configuration
2829
```bash
29-
# Change to the Node Network Configuration folder.
30-
pushd control-plane/nncp
31-
32-
# Generate the configuration
33-
kustomize build > nncp.yaml
34-
35-
# Apply the generated configuration
30+
kustomize build control-plane/networking/nncp > nncp.yaml
31+
```
32+
Apply the NNCP CRs
33+
```
3634
oc apply -f nncp.yaml
37-
38-
# Wait till the network configuration is applied.
35+
```
36+
Wait for NNCPs to be available
37+
```
3938
oc wait nncp \
4039
-l osp/nncm-config-type=standard \
4140
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured \
4241
--timeout=300s
43-
44-
# Change back the working directory
45-
popd
4642
```
4743

48-
Generate and apply the control-plane configurations.
49-
50-
```bash
51-
# Navigate to control-panel
52-
pushd control-plane
44+
## Apply remaining networking configuration
5345

54-
# Generate the CR
55-
kustomize build > control-plane.yaml
46+
Generate the reminaing networking configuration
47+
```
48+
kustomize build control-plane/networking > networking.yaml
49+
```
50+
Apply the networking CRs
51+
```
52+
oc apply -f networking.yaml
53+
```
5654

57-
# Verify that control-plane.yaml includes the valid access credentials
58-
# for the NetApp storage and provide the information if missing.
55+
## Apply the control-plane configuration.
5956

60-
# Apply the CR
57+
Generate the control-plane CRs.
58+
```bash
59+
kustomize build control-plane/ > control-plane.yaml
60+
```
61+
Apply the CRs
62+
```bash
6163
oc apply -f control-plane.yaml
64+
```
6265

63-
# Wait for control plane to be available
66+
Wait for control plane to be available
67+
```bash
6468
oc wait osctlplane controlplane --for condition=Ready --timeout=600s
65-
66-
# Change back the working directory
67-
popd
6869
```

examples/dt/uni05epsilon/control-plane/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ components:
66
- ../../../../dt/uni05epsilon
77

88
resources:
9-
- nncp/values.yaml
9+
- networking/nncp/values.yaml
1010
- service-values.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
components:
6+
- ../../../../../dt/uni05epsilon/networking
7+
8+
resources:
9+
- nncp/values.yaml

examples/dt/uni05epsilon/control-plane/nncp/kustomization.yaml renamed to examples/dt/uni05epsilon/control-plane/networking/nncp/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ transformers:
1717
create: true
1818
1919
components:
20-
- ../../../../../lib/nncp
20+
- ../../../../../../lib/nncp
2121

2222
resources:
2323
- values.yaml

0 commit comments

Comments
 (0)