# Daily Note 28/07/2020
###### tags: `Daily Notes` , `O-RAN` , `Acumos`
## Name : Christofel Rio Goenawan
## University : Bandung Institute of Technology (ITB)
---
## Schedule:
1. Study Functionality of O- CU.
2. Try to install Acumos AI in NTUST Server
3. Create Weekly Report
## Outcome :
1. Explained detailed functions of O- CU.
2. Successfully clone needed file to server. But get error when set up Kubernetes.
## Further Plan :
- Continue to deploy Acumos AIO in NTUST server
- Study more detailed about AIO Installation in Kubernets
---
## Daily Log
### 1.Study Functionality of O- CU. <mark>(9.00)</mark>
- Study more detail explanation in [Documentation](https://wiki.o-ran-sc.org/display/ORANDU/O-DU+High) and other sources.
### 2.Try to deploy Acumos AIO in NTUST server <mark>13.00</mark>
- Try to deploy Acumos AIO in NTUST server using Prep- Deploy Process based one previous [study notes](https://hackmd.io/@christofel04/TEEP_Daily_Notes_10_7_2020).
### 3.Create Weekly Report<mark>15.00</mark>
- Create weekly report for week 4. The report can be seen [here](https://docs.google.com/presentation/d/1ltdLjmVKUK9jqb1CXhSTg-miW7KVhKiMcNRZzJT_6Vk/edit?usp=sharing)
---
## Report
### 1. Functionality of O- CU
>This note is continuation of Yesterday's Notes ([see here](https://hackmd.io/@christofel04/TEEP_Daily_Notes_27_7_2020)). In this note Writer use [Documentation](https://wiki.o-ran-sc.org/display/ORANDU/O-DU+High) and [Ferlinda's Note](https://hackmd.io/@ferlinda/r1J-Rz0pL) as study sources.
#### Functional Block
From yesterday's notes, the simple functional block scheme of O- CU can be seen as below.

It consist of 2 main components as below.
1. **O-CU-CP Functional Blocks (Control plane)**
2. **O-CU-UP Functional Blocks (User plane)**
---
#### O-CU-CP Functional Blocks (Control plane)
It consisted of 8 main components as below.
1. **O-CU-CP-OAM-Agent**
- Manages:
- **Configuration and Control Management** (may perform spawning modules and software downloading for O-CU-CP)
- **Performance Counter Management**
- **Fault Management**
2. **gNB Procedure Management**
- Manages the **non-UE associated NGAP and XnAP procedures like NG/Xn Interface Management and Configuration Transfer procedures**.
- Functional sub-blocks can be seen as below.

- **Procedure Management**: Handles procedures and business logic involving application of the procedure across multiple cells of the gNB.
- **NGAP Interface Management**: Manages Interface Management procedures, Configuration Transfer procedures, and Warning Message Transmission Procedures over NGAP interface with AMFs.
- **XnAP Interface Management**: Manages the Global procedures over XnAP interface with peer O-CUs.
- **F1AP Interface Procedure Management**: Manages Interface Management procedures over F1AP interface with O-DUs.
3. **Cell Procedure Management**
* Manages:
* **Cell level procedures at O-CU** like system information management, procedures for dual connectivity.
* **Global procedures** like Cell Activation, Warning Message Transmission procedures, and System Information Procedures.
* **Cell level performance counters** and provides this information to **O-CU-CP-OAM**.
* Maintains
* Multiple state machines to handle various cell level procedures.
* Context of each cell to store information like cell state, number of UEs served by the cell, and cell broadcast information.
* May have separate state machines for various cell procedures like Cell Setup, Cell Delete, Cell Start, Cell Stop, and Cell Reconfiguration.
4. **UE Procedure Management**
* Manages the **UE Access Control and signalling procedures at O-CU** by binding together UE associated RRC, NGAP, XnAP, and F1AP signalling transactions into end-to-end procedures.
* Maintains
* Multiple state machines to handle various UE associated procedures.
* Context of each UE to store information like UE state, various UE AP Ids, and ongoing procedure related information
* May have separate state machines for different UE procedures like UE attach, UE handover, UE context modification, and UE measurement.
5. **RRC Encoder & Decoder**
* **Encodes and decodes all RRC ASN content**.
* RRC ASN encoding is performed for sending message to UE and for preparing containers to be exchanged during handover, etc.
* RRC ASN decoding is performed on receiving messages from UE and on receiving containers exchanged during handover, etc.
* Accessed by Cell Procedure Management and UE Procedure Management functional blocks.
* Cell Procedure Management accesses it for RRC ASN encoding of broadcast messages and paging message.
* UE Procedure Management accesses it for encoding and decoding of all the messages exchanged with UE and for populating the RRC ASN content in handover containers.
6. **NGAP Encoder & Decoder**
* **Encodes and decodes all NGAP ASN message**.
* NGAP ASN encoding is be performed for sending message to AMF.
* NGAP ASN decoding is performed on receiving messages from AMF.
* Accessed by gNB Procedure Management and UE Procedure Management functional blocks
* gNB Procedure Management accesses it for non-UE associated procedures between O-CU and AMF.
* UE Procedure Management accesses it for encoding and decoding of all the UE associated messages exchanged with AMF.
7. **XnAP Encoder & Decoder**
* **Encodes and decodes all F1AP ASN content at O-CU**.
* F1AP ASN encoding is performed for sending message to O-DU.
* F1AP ASN decoding is performed on receiving messages from O-DU.
* Accessed by gNB Procedure Management and UE Procedure Management functional blocks.
* gNB Procedure Management accesses it to perform non-UE associated procedures with O-DU.
* UE Procedure Management accesses it for encoding and decoding of all the UE associated messages exchanged with O-DU.
8. **O-CU-UP Control**
- **Configures and controls the CU User Plane entities** as per the E1 interface defined by 3GPP.
---
#### O-CU-UP Functional Blocks (User plane)
It consisted of 4 main components as below.
1. **O-CU-UP-OAM-Agent**
- Manages:
- **Configuration and Control Management** (may perform spawning modules and software downloading for O-CU-UP)
- **Performance Counter Management*
- **Fault Management**
2. **eGTPu**
The simple eFTPU architectures can be seen as below.

* **eGTPu Encaps & Decaps**: handles the eGTPu protocol stack, performs eGTPu encapsulation and decapsulation.
* **Data Application**: receives the data packet from UPF, peer O-CU and O-DU over eGTPu interface. It also processes the data packets received from SDAP.
* **NGU**: exchanges ECHO request and response over NGU interface, takes care of the error handling on NGU interface.
* **XnU**: exchanges ECHO request and response over XnU interface, takes care of the error handling on XnU interface.
* **F1U**: exchanges ECHO request and response over F1U interface, takes care of the error handling on F1U interface.
3. **NR PDCP**
* **Transfers user plane and control plane data**.
* Performs:
* header compression and decompression,
* integrity protection and verification,
* ciphering and deciphering,
* timer based SDU discard,
* routing for split bearers,
* duplication,
* reordering and in-order delivery,
* out of order delivery, and
* duplicate discarding.
4. **SDAP**
* Performs **QoS flow to DRB mapping and implements the procedure** described in 3GPP TS 37.324.
---
### 2. Install Acumos AI on NTUST Server
> In this note Writer use [Previous Notes](https://hackmd.io/@christofel04/TEEP_Daily_Notes_10_7_2020) as study sources.
In this installation , Writer used PrepDeploy Process to install Acumos AIO in NTUST Server. The steps can be seen as below.
#### 1. Clone Needed File from Github
First Writer clone needed file using code as below.
```
$ git clone https://gerrit.acumos.org/r/system-integration
```
The cloning success as below.

Then check if the user is part of the docker group, and add if not using code as below.
```
$ if [[ "$(id -nG "$USER" | grep docker)" == "" ]]; then sudo usermod -aG docker $USER; fi
```
#### 2. Set Up Kubernetes Cluster
Then set up K8s Cluster using code from Github using command as below.
```
bash system-integration/tools/setup_k8s_stack.sh setup
```
The result can be seen as below.

But in the process the set up failed because error in no available port.

:::warning
After I discussed with Kevin, the problem is because **there are another K8s Cluster using that port**. After uninstall the old Cluster, the problem solved.
:::
:::info
**Next Writer Will Continue to Install Acumos AIO in NTUST Server**
:::
---
## Reference
1. https://wiki.o-ran-sc.org/display/ORANDU/O-DU+High
2. https://www.o-ran.org/specification-access
3. https://docs.o-ran-sc.org/en/latest/architecture/architecture.html
4. https://docs.acumos.org/en/clio/submodules/system-integration/docs/oneclick-deploy/user-guide.html