Skip to content

stevenchiu30801/bans5gc-operator-framework

Repository files navigation

BANS 5GC Operator Framework

BANS 5GC Operator Framework consists of three operators, free5GC Operator, ONOS Bandwidth Operator and BANS 5GC Operator, to provide automation of BANS 5GC.

Prerequisite

See operator-framework/operator-sdk.

# Pre-install
sudo apt instal make

Usage

BANS-5GC-in-a-Box

Run

# On Kubernetes node

# Install submodules
make submodule

# Pull submodules with the specified branch
BRANCH=bmv2-fabric make update-submodule

# Install all operator resources
make install

# Create network slice infrastructure
kubectl apply -f bans5gc-operator/deploy/crds/bans.io_v1alpha1_bansslice_cr1.yaml

# Check if status of the new slice is ready before proceeding
kubectl describe bansslice.bans.io example-bansslice1 | grep -A 1 Status

Procedure Test

export RANSIM_POD=$( kubectl get pods -l app.kubernetes.io/instance=free5gc -l app.kubernetes.io/name=ransim -o jsonpath='{.items[0].metadata.name}' )

# Run tests with example slice 1
kubectl exec $RANSIM_POD -- bash -c "cd src/test && go test -vet=off -run TestRegistration -ue-idx=1 -sst=1 -sd=010203"

BANS-5GC with P4 Fabric

Network Environment

     |---- Mongo Service Connection ----|
     |                                  |
RANSIM Node ----- P4 Switch ----- Kubernetes Node

Run

# On Kubernetes node

# Install submodules
make submodule

# Pull submodules with the specified branch
make update-submodule

# For the first time, please install SR-IOV device plugin before running Kubernetes
cd free5gc-operator
make sriovdp

# Modify the IP address of P4Runtime in device netcfg
# `onos-bandwidth-operator/deploy/onos-device-netcfg.json`

# Install all operator resources
SRIOV_INTF=<sriov-interface> make install

# Modify the node name of connect points in fabric config
# `onos-bandwidth-operator/deploy/crds/bans.io_v1alpha1_fabricconfig_cr.yaml`

# Create fabric configuration
kubectl apply -f onos-bandwidth-operator/deploy/crds/bans.io_v1alpha1_fabricconfig_cr.yaml

# Create network slice infrastructure
kubectl apply -f bans5gc-operator/deploy/crds/bans.io_v1alpha1_bansslice_cr1.yaml

# Check if status of the new slice is ready before proceeding
kubectl describe bansslice.bans.io example-bansslice1 | grep -A 1 Status

Procedure Test

# On RANSIM node

# Setup IP address of interface to core network
sudo ip address add 192.168.3.11/24 dev <ransim-interface>

# Clone modified version of free5GC Stage 2
# NOTE: This repository is private currently
git clone https://github.com/stevenchiu30801/free5gc-stage-2

# Run tests with example slice 1
cd free5gc-stage-2/src/test
go test -vet=off -run TestRegistration -ue-idx=1 -sst=1 -sd=010203

Reset

# Uninstall all operator resources and functions
make uninstall

About

BANS 5GC Operator Framework provides automation of BANS 5GC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published