Skip to main content

Test Deployments

In this tutorial we demonstrate how deployments work in Trirematics.

Kubernetes Concept Review

Before we get started, let's review some Kubernetes concepts.

Namespaces

In Kubernetes, your cluster is divided into logical domains called namespace. Each namespace has its own set of resources, and you can create multiple namespaces. When working with the CLI the default namespace is trirematics and when working with Kubectl the default namespace is default. To change the default namespace, use the --namespace or -n flags in either of the CLI or Kubectl.

tip

If you are looking for a resource and can't find it, verify the namespace you are in.

You could equivalently use the environment variable CLI_NAMESPACE to set the default namespace for the CLI.

YAML files

Kubernetes understands YAML files. YAML is a human-readable data-serialization language, a superset of JSON. YAML files are used to define the desired state of your cluster and Kubernetes expresses the status of your cluster in the same format. Each YAML file may contain several YAML documents, separated by ---. When you install a network, all the resources defined in the YAML files are created in the cluster, one per document.

Declarative and Idempotent

Trirematics' operations are idempotent. This means that if you run the same command twice, the second time will have no effect and your cluster will remain in a perfectly valid state.

Trirematics' design is declarative, which means that you define the desired state of your cluster and Trirematics will make the cluster match that state. You don't need to know how to do that, Trirematics will figure it out. You simply express your intentions.

Samples

As the initial examples, we provide two simple designs that you can use to test your cluster.

OAI Simulated RAN

The first example is composed of OAI RF simulator gNB with OAI 5GC in minimal deployment.

To deploy this network, first you need to create the YAML files for it. Copy this YAML file to your local machine and save it as oai-sim.yaml:

apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: oai-sim
namespace: trirematics
spec:
slices:
- plmn: "00101"
dnn: internet
network-mode: IPv4
service-type: eMBB
differentiator: 0x000000
ipv4-range: "12.1.1.0/24"
ipv6-range: "2001:1:2::/64"
access:
- name: oai-gnb
stack: 5g-sa
model: oai-ran/monolithic-gnb
radio:
device: rf-sim
identity:
an-id: 10
tracking-area: 1
cells:
- band: n78
arfcn: 640008
bandwidth: 40MHz
subcarrier-spacing: 30kHz
tdd-config:
period: 5ms
dl-slots: 7
dl-symbols: 6
ul-slots: 2
ul-symbols: 4
core-networks:
- oai-5gc.oai-sim
core:
- name: oai-5gc
stack: 5g-sa
model: oai-cn/minimal
identity:
region: 128
cn-group: 4
cn-id: 5
dns:
ipv4:
default: 8.8.8.8
secondary: 8.8.4.4
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: ue1
namespace: trirematics
spec:
vendor: oai
stack: 5g-sa
model: terminal/nr-rfsim
preferred-access: oai-gnb.oai-sim
target-cores:
- oai-5gc.oai-sim
identity:
imsi: "001010000000001"
pin: "1234"
opc: "0xc42449363bbad02b66d16bc975d77cc1"
key: "0xfec86ba6eb707ed08905757b1bb44b8f"
sqn: "0xff9bb4000001"
slice:
dnn: internet
network-mode: IPv4
service-type: eMBB
differentiator: 0x000000
radio:
bands:
- n78
readiness-check:
method: ping
target: google-ip
interface-name: oaitun_ue0
danger

Since the CLI by default is installed in the confined mode, the file needs to be in under one of the following directories:

  1. Any non-hidden directory in your $HOME directory.
  2. Any directory under /var/snap/br-t9s/common/ or /var/snap/br-t9s/current.
  3. Any directory under $HOME/snap/br-t9s/common/ or $HOME/snap/br-t9s/current.

Deployment

Then deploy the network by running the following command:

cli install network oai-sim.yaml

You then check the status of your network by running the following command:

cli observe

Testing and Debugging

You could follow the logs of any element in the network by running the following command:

cli extract logs {element-name}
tip

Use auto-completion to get the list of all elements in the network.

To perform tests against the network, you could use the following command:

cli test rtt ue1 -- gateway

To perform a downlink iperf test, you could use the following command:

cli test throughput ue1 dl --plot -- gateway --time 60

Remove the Network

To remove the network, you could run the following command:

cli remove network oai-sim.yaml

Amarisoft Simple Network

danger

Only the customers with the Amarisoft license can deploy the Amarisoft network. You also need Amarisoft SDR and a Quectel UE.

Copy this YAML file to your local machine and save it as amarisoft.yaml:

apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: amarisoft
namespace: trirematics
spec:
slices:
- plmn: "00101"
dnn: internet
network-mode: IPv4
service-type: eMBB
differentiator: 0x000000
ipv4-range: "12.2.1.0/24"
ipv6-range: "2001:2:2::/64"
access:
- name: amr-ran
stack: 5g-sa
model: amarisoft/basic-ran
radio:
device: amr-sdr50
antenna:
formation: 2x2
cells:
- band: n78
arfcn: 640008
bandwidth: 40MHz
subcarrier-spacing: 30kHz
tdd-config:
period: 5ms
dl-slots: 7
dl-symbols: 6
ul-slots: 2
ul-symbols: 4
core-networks:
- amr-cn.amarisoft
core:
- name: amr-cn
stack: 5g-sa
model: amarisoft/basic-cn
profiles:
- debug
identity:
region: 128
cn-group: 4
cn-id: 5
dns:
ipv4:
default: 8.8.8.8
secondary: 8.8.4.4
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: ue3
namespace: trirematics
spec:
vendor: amr
stack: 5g-sa
model: terminal/quectel
preferred-access: amr-ran.amarisoft
target-cores:
- amr-cn.amarisoft
identity:
imsi: "001010000000003"
pin: "1234"
opc: "0xc42449363bbad02b66d16bc975d77cc1"
key: "0xfec86ba6eb707ed08905757b1bb44b8f"
sqn: "0xff9bb4000001"
slice:
dnn: "internet"
network-mode: "IPv4"
service-type: eMBB
differentiator: 0x000000
radio:
bands:
- n78
readiness-check:
method: ping
target: google-ip

Then deploy the network by running the following command:

cli install network amarisoft.yaml

You then check the status of your network by running the following command:

cli observe

The rest of the commands from the previous example applies here as well.