Skip to content

Commit

Permalink
Merge pull request #1837 from cncf/feature/#1827-oran-ric
Browse files Browse the repository at this point in the history
oran ric
  • Loading branch information
denverwilliams authored Oct 19, 2023
2 parents e7d7334 + ae80cf9 commit 0b64940
Show file tree
Hide file tree
Showing 661 changed files with 67,152 additions and 57 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
TEST_ARRAY=("${TEST_ARRAY[@]/pod_memory_hog/}")
TEST_ARRAY=("${TEST_ARRAY[@]/pod_network_latency/}")
TEST_ARRAY=("${TEST_ARRAY[@]/zombie/}")
TEST_ARRAY=("${TEST_ARRAY[@]/oran/}")
TEST_LIST=$(for i in ${TEST_ARRAY[@]}
do
echo "{\"spec\":\"$i\"}," | tr -d '\n'
Expand Down Expand Up @@ -192,9 +193,7 @@ jobs:
LOG_LEVEL=info crystal spec --warnings none --tag ${{ matrix.spec }} -v
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Delete Cluster
if: ${{ always() }}
run: |
Expand All @@ -204,13 +203,13 @@ jobs:
docker volume prune -f || true
chaos:
name: Chaos Tests
name: Chaos & Oran Tests
needs: [tests]
runs-on: [ubuntu-22.04]
strategy:
fail-fast: false
matrix:
tag: ["pod_delete", "pod_io_stress", "pod_memory_hog", "pod_network_latency", "disk_fill", "pod_network_corruption", "pod_network_duplication", "zombie"]
tag: ["pod_delete", "pod_io_stress", "pod_memory_hog", "pod_network_latency", "disk_fill", "pod_network_corruption", "pod_network_duplication", "zombie", "oran"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -228,7 +227,11 @@ jobs:
sudo mv ./kind /usr/local/bin/kind
kind --version
- name: Install kubectl
uses: azure/setup-kubectl@v3
run: |
wget -O kubectl "https://dl.k8s.io/release/v1.28.3/bin/linux/amd64/kubectl"
ls -la
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- name: Create Kind Cluster
run: |
cat << EOF > /tmp/cluster.yml
Expand All @@ -249,6 +252,7 @@ jobs:
kind create cluster --name $CLUSTER --config=/tmp/cluster.yml --kubeconfig ./$CLUSTER.conf
export KUBECONFIG=$(pwd)/$CLUSTER.conf
kubectl get nodes
- name: Cache crystal shards
uses: actions/cache@v3
env:
Expand Down Expand Up @@ -288,6 +292,7 @@ jobs:
echo "CLUSTER RATE LIMIT: $CLUSTER_RATE_LIMIT"
echo "DOCKER USER RATE LIMIT: $AUTH_RATE_LIMIT"
LOG_LEVEL=info crystal spec --warnings none --tag ${{ matrix.tag }} -v
# chaos-airgapped:
# name: Chaos Tests Airgapped
# needs: [tests]
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ tools/chaos-experiments
ueransim-gnb/
gnb-ues-values.yaml
.icr*
configadm.yml
litmus-operator-downloaded.yaml
litmus-operator-modified.yaml

4 changes: 4 additions & 0 deletions sample-cnfs/sample-oran-noric/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
manifest_directory: manifests
release_name: oran-ric
ric_label: app.kubernetes.io/name=flexric
37 changes: 37 additions & 0 deletions sample-cnfs/sample-oran-noric/manifests/ric.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: v1
kind: Pod
metadata:
name: flexric
labels:
app.kubernetes.io/name: flexric
spec:
containers:
- name: flexric
image: conformance/flexric:latest
command: ["/entrypoint.sh"]
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
securityContext:
privileged: true
ports:
- containerPort: 36421
name: ric
protocol: SCTP
---
apiVersion: v1
kind: Service
metadata:
name: flexric
spec:
ports:
- name: ric
port: 3642100000
protocol: SCTP
targetPort: 3642100000
selector:
app.kubernetes.io/name: flexric
type: ClusterIP

17 changes: 17 additions & 0 deletions sample-cnfs/sample-oran-noric/manifests/srsran.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: srsran
spec:
containers:
- name: srsran
image: conformance/oran:latest
command: ["/bin/bash"]
args: ["-c", "envsubst < /gnb.yml.template > /gnb.yml && gnb -c /gnb.yml"]
env:
- name: LOCAL_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
securityContext:
privileged: true
1 change: 1 addition & 0 deletions sample-cnfs/sample-oran-noric/oran_ric
Submodule oran_ric added at 21041a
4 changes: 4 additions & 0 deletions sample-cnfs/sample-oran-ric/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
manifest_directory: manifests
release_name: oran-ric
ric_label: app.kubernetes.io/name=flexric
37 changes: 37 additions & 0 deletions sample-cnfs/sample-oran-ric/manifests/ric.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: v1
kind: Pod
metadata:
name: flexric
labels:
app.kubernetes.io/name: flexric
spec:
containers:
- name: flexric
image: conformance/flexric:latest
command: ["/entrypoint.sh"]
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
securityContext:
privileged: true
ports:
- containerPort: 36421
name: ric
protocol: SCTP
---
apiVersion: v1
kind: Service
metadata:
name: flexric
spec:
ports:
- name: ric
port: 36421
protocol: SCTP
targetPort: 36421
selector:
app.kubernetes.io/name: flexric
type: ClusterIP

17 changes: 17 additions & 0 deletions sample-cnfs/sample-oran-ric/manifests/srsran.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: srsran
spec:
containers:
- name: srsran
image: conformance/oran:latest
command: ["/bin/bash"]
args: ["-c", "envsubst < /gnb.yml.template > /gnb.yml && gnb -c /gnb.yml"]
env:
- name: LOCAL_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
securityContext:
privileged: true
1 change: 1 addition & 0 deletions sample-cnfs/sample-oran-ric/oran_ric
Submodule oran_ric added at 21041a
2 changes: 1 addition & 1 deletion sample-cnfs/sample_open5gs/cnf-testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ helm_directory: open5gs
release_name: open5gs
allowlist_helm_chart_container_names: []
#optional 5gcore tag
core: app.kubernetes.io/name=amf
core_label: app.kubernetes.io/name=amf
amf_pod_name: open5gs-amf-ngap
mmc: '999'
mnc: '70'
Expand Down
2 changes: 1 addition & 1 deletion sample-cnfs/sample_open5gs_no_auth/cnf-testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ helm_directory: open5gs
release_name: open5gs
allowlist_helm_chart_container_names: []
#optional 5gcore tag
core: app.kubernetes.io/name=amf
core_label: app.kubernetes.io/name=amf
amf_pod_name: open5gs-amf-ngap
mmc: '999'
mnc: '70'
Expand Down
82 changes: 82 additions & 0 deletions sample-cnfs/sample_srsran_ueauth_open5gs/5g-core-config.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
hss:
enabled: false

mme:
enabled: false

pcrf:
enabled: false

smf:
config:
pcrf:
enabled: false

sgwc:
enabled: false

sgwu:
enabled: false

udm:
extraVolumeMounts:
- name: curve
mountPath: /etc/open5gs/hnet/curve25519-1.key
subPath: curve25519-1.key
- name: secp
mountPath: /etc/open5gs/hnet/secp256r1-2.key
subPath: secp256r1-2.key
extraVolumes:
- name: curve
configMap:
name: key
items:
- key: curve
path: curve25519-1.key
- name: secp
configMap:
name: key
items:
- key: secp
path: secp256r1-2.key

amf:
config:
guamiList:
- plmn_id:
mcc: "999"
mnc: "70"
amf_id:
region: 2
set: 1
taiList:
- plmn_id:
mcc: "999"
mnc: "70"
tac: [1]
plmnList:
- plmn_id:
mcc: "999"
mnc: "70"
s_nssai:
- sst: 1
sd: "0x111111"

nssf:
config:
nsiList:
- nrf:
hostname: "" # if empty default is autogenerated open5gs svc fullname
port: 7777
sst: 1
sd: "0x111111"

webui:
ingress:
enabled: false

populate:
enabled: true
initCommands:
- open5gs-dbctl add_ue_with_slice 999700000000001 465B5CE8B199B49FAA5F0A2EE238A6BC E8ED289DEBA952E4283B54E88E6183CA internet 1 111111
- open5gs-dbctl add_ue_with_slice 999700000000002 465B5CE8B199B49FAA5F0A2EE238A6BC E8ED289DEBA952E4283B54E88E6183CA internet 1 111111
25 changes: 25 additions & 0 deletions sample-cnfs/sample_srsran_ueauth_open5gs/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
helm_directory: open5gs
release_name: open5gs
allowlist_helm_chart_container_names: []
#optional 5gcore tag
core: app.kubernetes.io/name=amf
amf_pod_name: open5gs-amf-ngap
mmc: '999'
mnc: '70'
sst: 1
sd: '0x111111'
tac: '0001'
protectionScheme: 1
publicKey: 0ac95ceeb93308df01be82ff9994d8330e38804ece1700ee4b972d8028796275
publicKeyId: 1
routingIndicator: '0000'
enabled: true
count: 1
initialMSISDN: '0000000001'
key: 465B5CE8B199B49FAA5F0A2EE238A6BC
op: E8ED289DEBA952E4283B54E88E6183CA
opType: OPC
type: 'IPv4'
apn: 'internet'
emergency: false
23 changes: 23 additions & 0 deletions sample-cnfs/sample_srsran_ueauth_open5gs/key-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

openssl genpkey -algorithm X25519 > curve25519-1.key
KEY_CURVE=$(cat curve25519-1.key)

openssl ecparam -name prime256v1 -genkey -conv_form compressed > secp256r1-2.key
KEY_SECP=$(cat secp256r1-2.key)

cat << EOF > ./configmap.yml
apiVersion: v1
kind: ConfigMap
metadata:
name: key
data:
curve: |-
$KEY_CURVE
secp: |-
$KEY_SECP
EOF

sed -i '8,9s/^/ /' ./configmap.yml
sed -i '13,19s/^/ /' ./configmap.yml
Loading

0 comments on commit 0b64940

Please sign in to comment.