Skip to content

Commit daf4081

Browse files
authored
Updating the location of files (#231)
* Updating the location of files - Moving yaml definitions from script to yaml files - Adding connectivity testing script * Renaming the files with some hints * Adding ue yaml file
1 parent b10d6b0 commit daf4081

11 files changed

+259
-112
lines changed
File renamed without changes.

e2e/tests/oai/003-upf.yaml renamed to e2e/tests/oai/002-database.yaml

+17-11
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@
88
# http://www.apache.org/licenses/LICENSE-2.0
99
##############################################################################
1010

11-
apiVersion: config.porch.kpt.dev/v1alpha1
12-
kind: PackageVariant
11+
apiVersion: config.porch.kpt.dev/v1alpha2
12+
kind: PackageVariantSet
1313
metadata:
14-
name: oai-upf-edge
14+
name: oai-common
1515
spec:
1616
upstream:
1717
repo: oai-core-packages
18-
package: oai-upf-edge
18+
package: database
1919
revision: r2
20-
downstream:
21-
repo: edge
22-
package: oai-upf
23-
annotations:
24-
approval.nephio.org/policy: initial
25-
injectors:
26-
- name: edge
20+
targets:
21+
- objectSelector:
22+
apiVersion: infra.nephio.org/v1alpha1
23+
kind: WorkloadCluster
24+
matchLabels:
25+
nephio.org/site-type: core
26+
template:
27+
downstream:
28+
package: database
29+
annotations:
30+
approval.nephio.org/policy: initial
31+
injectors:
32+
- nameExpr: target.name

e2e/tests/oai/002.sh renamed to e2e/tests/oai/002-dependency.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ source "${LIBDIR}/k8s.sh"
2727
# shellcheck source=e2e/lib/kpt.sh
2828
source "${LIBDIR}/kpt.sh"
2929

30-
k8s_apply "$TESTDIR/002-oai-operators.yaml"
30+
k8s_apply "$TESTDIR/002-database.yaml"
31+
k8s_apply "$TESTDIR/002-operators.yaml"
3132

3233
for pkgvar in common-core-database cp-operators up-operators ran-operator-edge ran-operator-regional; do
3334
k8s_wait_ready "packagevariant" "oai-$pkgvar"
@@ -41,9 +42,9 @@ kpt_wait_pkg "edge" "oai-ran-operator"
4142
_core_kubeconfig="$(k8s_get_capi_kubeconfig "core")"
4243
_edge_kubeconfig="$(k8s_get_capi_kubeconfig "edge")"
4344
k8s_wait_ready_replicas "deployment" "mysql" "$_core_kubeconfig" "oai-core"
44-
for controller in amf ausf nrf smf udm udr; do
45-
k8s_wait_ready_replicas "deployment" "oai-$controller-controller" "$_core_kubeconfig" "oai-operators"
45+
for nf in amf ausf nrf smf udm udr; do
46+
k8s_wait_ready_replicas "deployment" "oai-$nf-operator" "$_core_kubeconfig" "oai-cn-operators"
4647
done
47-
k8s_wait_ready_replicas "deployment" "oai-upf-controller" "$_edge_kubeconfig" "oai-operators"
48+
k8s_wait_ready_replicas "deployment" "oai-upf-operator" "$_edge_kubeconfig" "oai-cn-operators"
4849
k8s_wait_ready_replicas "deployment" "oai-ran-operator" "$(k8s_get_capi_kubeconfig "regional")" "oai-ran-operators"
4950
k8s_wait_ready_replicas "deployment" "oai-ran-operator" "$_edge_kubeconfig" "oai-ran-operators"

e2e/tests/oai/002-oai-operators.yaml renamed to e2e/tests/oai/002-operators.yaml

-23
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,6 @@
88
# http://www.apache.org/licenses/LICENSE-2.0
99
##############################################################################
1010

11-
apiVersion: config.porch.kpt.dev/v1alpha2
12-
kind: PackageVariantSet
13-
metadata:
14-
name: oai-common
15-
spec:
16-
upstream:
17-
repo: oai-core-packages
18-
package: database
19-
revision: r2
20-
targets:
21-
- objectSelector:
22-
apiVersion: infra.nephio.org/v1alpha1
23-
kind: WorkloadCluster
24-
matchLabels:
25-
nephio.org/site-type: core
26-
template:
27-
downstream:
28-
package: database
29-
annotations:
30-
approval.nephio.org/policy: initial
31-
injectors:
32-
- nameExpr: target.name
33-
---
3411
apiVersion: config.porch.kpt.dev/v1alpha1
3512
kind: PackageVariant
3613
metadata:

e2e/tests/oai/003.sh renamed to e2e/tests/oai/003-core-network.sh

+4-28
Original file line numberDiff line numberDiff line change
@@ -49,37 +49,13 @@ function _wait_for_pfcp_session {
4949
debug "timeout: $timeout"
5050
}
5151

52-
for nf in nrf udm udr ausf amf smf; do
53-
cat <<EOF | kubectl apply -f -
54-
apiVersion: config.porch.kpt.dev/v1alpha2
55-
kind: PackageVariantSet
56-
metadata:
57-
name: oai-$nf
58-
spec:
59-
upstream:
60-
repo: oai-core-packages
61-
package: oai-$nf
62-
revision: r2
63-
targets:
64-
- objectSelector:
65-
apiVersion: infra.nephio.org/v1alpha1
66-
kind: WorkloadCluster
67-
matchLabels:
68-
nephio.org/site-type: core
69-
template:
70-
downstream:
71-
package: oai-$nf
72-
annotations:
73-
approval.nephio.org/policy: initial
74-
injectors:
75-
- nameExpr: target.name
76-
EOF
77-
done
78-
k8s_apply "$TESTDIR/003-upf.yaml"
52+
k8s_apply "$TESTDIR/003-core-network.yaml"
7953

8054
for nf in nrf udm udr ausf amf smf; do
81-
k8s_wait_ready "packagevariant" "oai-$nf-core-oai-$nf"
55+
k8s_wait_ready "packagevariant" "oai-$nf"
8256
done
57+
k8s_wait_ready "packagevariant" "oai-upf-edge"
58+
8359
for nf in nrf udm udr ausf amf smf; do
8460
kpt_wait_pkg "core" "oai-$nf" "nephio" "1800"
8561
done

e2e/tests/oai/003-core-network.yaml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
# SPDX-license-identifier: Apache-2.0
3+
##############################################################################
4+
# Copyright (c) 2023 The Nephio Authors.
5+
# All rights reserved. This program and the accompanying materials
6+
# are made available under the terms of the Apache License, Version 2.0
7+
# which accompanies this distribution, and is available at
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
##############################################################################
10+
11+
apiVersion: config.porch.kpt.dev/v1alpha1
12+
kind: PackageVariant
13+
metadata:
14+
name: oai-nrf
15+
spec:
16+
upstream:
17+
repo: oai-core-packages
18+
package: oai-nrf
19+
revision: r2
20+
downstream:
21+
repo: core
22+
package: oai-nrf
23+
annotations:
24+
approval.nephio.org/policy: initial
25+
injectors:
26+
- name: core
27+
---
28+
apiVersion: config.porch.kpt.dev/v1alpha1
29+
kind: PackageVariant
30+
metadata:
31+
name: oai-udm
32+
spec:
33+
upstream:
34+
repo: oai-core-packages
35+
package: oai-udm
36+
revision: r2
37+
downstream:
38+
repo: core
39+
package: oai-udm
40+
annotations:
41+
approval.nephio.org/policy: initial
42+
injectors:
43+
- name: core
44+
---
45+
apiVersion: config.porch.kpt.dev/v1alpha1
46+
kind: PackageVariant
47+
metadata:
48+
name: oai-ausf
49+
spec:
50+
upstream:
51+
repo: oai-core-packages
52+
package: oai-ausf
53+
revision: r2
54+
downstream:
55+
repo: core
56+
package: oai-ausf
57+
annotations:
58+
approval.nephio.org/policy: initial
59+
injectors:
60+
- name: core
61+
---
62+
apiVersion: config.porch.kpt.dev/v1alpha1
63+
kind: PackageVariant
64+
metadata:
65+
name: oai-udr
66+
spec:
67+
upstream:
68+
repo: oai-core-packages
69+
package: oai-udr
70+
revision: r2
71+
downstream:
72+
repo: core
73+
package: oai-udr
74+
annotations:
75+
approval.nephio.org/policy: initial
76+
injectors:
77+
- name: core
78+
---
79+
apiVersion: config.porch.kpt.dev/v1alpha1
80+
kind: PackageVariant
81+
metadata:
82+
name: oai-amf
83+
spec:
84+
upstream:
85+
repo: oai-core-packages
86+
package: oai-amf
87+
revision: r2
88+
downstream:
89+
repo: core
90+
package: oai-amf
91+
annotations:
92+
approval.nephio.org/policy: initial
93+
injectors:
94+
- name: core
95+
---
96+
apiVersion: config.porch.kpt.dev/v1alpha1
97+
kind: PackageVariant
98+
metadata:
99+
name: oai-smf
100+
spec:
101+
upstream:
102+
repo: oai-core-packages
103+
package: oai-smf
104+
revision: r2
105+
downstream:
106+
repo: core
107+
package: oai-smf
108+
annotations:
109+
approval.nephio.org/policy: initial
110+
injectors:
111+
- name: core
112+
---
113+
apiVersion: config.porch.kpt.dev/v1alpha1
114+
kind: PackageVariant
115+
metadata:
116+
name: oai-upf-edge
117+
spec:
118+
upstream:
119+
repo: oai-core-packages
120+
package: oai-upf-edge
121+
revision: r2
122+
downstream:
123+
repo: edge
124+
package: oai-upf
125+
annotations:
126+
approval.nephio.org/policy: initial
127+
injectors:
128+
- name: edge

e2e/tests/oai/004.sh renamed to e2e/tests/oai/004-ran-network.sh

+2-23
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
##############################################################################
1111

1212
## TEST METADATA
13-
## TEST-NAME: Deploy OAI E1 Split RAN Network Functions
13+
## TEST-NAME: Deploy OAI E1 and F1 Split RAN Network Functions
1414
##
1515

1616
set -o pipefail
@@ -65,28 +65,7 @@ function _wait_for_f1_link {
6565
_wait_for_ran "$1" "Cell Configuration ok" "F1"
6666
}
6767

68-
k8s_apply "$TESTDIR/004-ran-cucp.yaml"
69-
70-
for nf in du cuup; do
71-
cat <<EOF | kubectl apply -f -
72-
apiVersion: config.porch.kpt.dev/v1alpha1
73-
kind: PackageVariant
74-
metadata:
75-
name: oai-$nf
76-
spec:
77-
upstream:
78-
repo: catalog-workloads-oai-ran
79-
package: pkg-example-$nf-bp
80-
revision: main
81-
downstream:
82-
repo: edge
83-
package: oai-ran-$nf
84-
annotations:
85-
approval.nephio.org/policy: initial
86-
injectors:
87-
- name: edge
88-
EOF
89-
done
68+
k8s_apply "$TESTDIR/004-ran-network.yaml"
9069

9170
for nf in du cuup cucp; do
9271
k8s_wait_ready "packagevariant" "oai-$nf"

e2e/tests/oai/004-ran-network.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
# SPDX-license-identifier: Apache-2.0
3+
##############################################################################
4+
# Copyright (c) 2024 The Nephio Authors.
5+
# All rights reserved. This program and the accompanying materials
6+
# are made available under the terms of the Apache License, Version 2.0
7+
# which accompanies this distribution, and is available at
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
##############################################################################
10+
11+
apiVersion: config.porch.kpt.dev/v1alpha1
12+
kind: PackageVariant
13+
metadata:
14+
name: oai-cucp
15+
spec:
16+
upstream:
17+
repo: catalog-workloads-oai-ran
18+
package: pkg-example-cucp-bp
19+
revision: main
20+
downstream:
21+
repo: regional
22+
package: oai-ran-cucp
23+
annotations:
24+
approval.nephio.org/policy: initial
25+
injectors:
26+
- name: regional
27+
---
28+
apiVersion: config.porch.kpt.dev/v1alpha1
29+
kind: PackageVariant
30+
metadata:
31+
name: oai-du
32+
spec:
33+
upstream:
34+
repo: catalog-workloads-oai-ran
35+
package: pkg-example-du-bp
36+
revision: main
37+
downstream:
38+
repo: edge
39+
package: oai-ran-du
40+
annotations:
41+
approval.nephio.org/policy: initial
42+
injectors:
43+
- name: edge
44+
---
45+
apiVersion: config.porch.kpt.dev/v1alpha1
46+
kind: PackageVariant
47+
metadata:
48+
name: oai-cuup
49+
spec:
50+
upstream:
51+
repo: catalog-workloads-oai-ran
52+
package: pkg-example-cuup-bp
53+
revision: main
54+
downstream:
55+
repo: edge
56+
package: oai-ran-cuup
57+
annotations:
58+
approval.nephio.org/policy: initial
59+
injectors:
60+
- name: edge
61+

e2e/tests/oai/005.sh renamed to e2e/tests/oai/005-ue.sh

+1-18
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,7 @@ function _wait_for_ue_pdu_session {
5858
_wait_for_ue "$1" "Interface oaitun_ue1 successfully configured" "PDU session"
5959
}
6060

61-
cat <<EOF | kubectl apply -f -
62-
apiVersion: config.porch.kpt.dev/v1alpha1
63-
kind: PackageVariant
64-
metadata:
65-
name: oai-ue
66-
spec:
67-
upstream:
68-
repo: catalog-workloads-oai-ran
69-
package: pkg-example-ue-bp
70-
revision: main
71-
downstream:
72-
repo: edge
73-
package: oai-ran-ue
74-
annotations:
75-
approval.nephio.org/policy: initial
76-
injectors:
77-
- name: edge
78-
EOF
61+
k8s_apply "$TESTDIR/005-ue.yaml"
7962

8063
k8s_wait_ready "packagevariant" "oai-ue"
8164
kpt_wait_pkg "edge" "oai-ran-ue" "nephio" "1800"

0 commit comments

Comments
 (0)