---
# System prepended metadata

title: DoIT 5G E2E Solution Installation Guide.

---

# DoIT 5G E2E Solution Installation Guide.

## Prepare Environment
**Target Node**
1 server with following software/hardware  
* Ubuntu 18 LTS server  
* At least 1 SRIOV NIC with 2 physical ports  
* One SmartNIC  
* All the physical network wire and IP plan were ready.  

**Deploy Node**
Ubuntu 18.04 LTS

## 2. Install required package  
**On Deploy Node**  
```bash=
apt-get install python3
apt-get install python3-pip
```

## 3. Pre-configure system  
**On Target Node**  
1. Disable and delete swap.  
2. Enable root account and allow root remote login.  
3. Set password-free login for root of deploy node   

**On Deploy Node**  
```bash=
# at root of deploy node
ssh-copy-id <targetNode_ip>
```

## 2. Install x-k8s  
**On Deploy Node**  
1. Clone this repo.  
2. Install requirement.  

    ```=bash
    cd x-k8s
    sudo pip3 install -r requirements.txt
    ```  

3. Edit hosts.ini in `/x-k8s/kubespray/inventory/mycluster/hosts.ini`  
For example your hosts.ini might look like this  
    ```yaml=
    [all]
    node1 	 ansible_host=100.86.1.104 ip=100.86.1.104

    [kube-master]
    node1

    [etcd]
    node1

    [kube-node]
    node1

    [k8s-cluster:children]
    kube-master
    kube-node

    [sriov-node]
    node1

    [p4-node]
    node1
    ```

    **sriov-node** is for the nodes with SRIOV NIC  
    **p4-node** is for the nodes with SmartNIC  


4. Edit /x-k8s/kubespray/extraVars.yml.  
Change the siorv part to meet your target node configuration  
**For each PF we will create a resource pool, you can change the pool's name with `netpool`**  
**The VF will created automatically by the number of `sriov_numvfs`**  

```yaml=
## Helm deployment
helm_enabled: true

## Multus deployment
kube_network_plugin: flannel
kube_network_plugin_multus: true

## CMK Support
cmk_enabled: false

## SRIOV Support
sriov_enabled : true
#SRIOV PF names
sriov_nics: 
  - name: enp6s0f0
    netpool: sriov_vEPC_Trunk
  - name: enp3s0f0
    netpool: imec_sriov_enb
  - name: enp3s0f1
    netpool: imec_sriov_epc
  - name: enp3s0f2
    netpool: imec_sriov_data

sriov_numvfs: 8

e2e_network:
  p4:
    network: 192.168.102.48/28
    ipStart: 192.168.100.49
    ipEnd: 192.168.200.61
    gateway: 192.168.100.62
    nicName: macvlan-p4-api
  nsbi:
    network: 192.168.102.16/28
    ipStart: 192.168.102.17
    ipEnd: 192.168.102.29
    gateway: 192.168.102.30
    nicName: sriov-private
    vlan: 3012
  n4:
    network: 192.168.102.32/28
    ipStart: 192.168.102.33
    ipEnd: 192.168.102.45
    gateway: 192.168.102.46
    nicName: sriov-private
    vlan: 3202
  n2:
    network: 192.168.102.0/28
    ipStart: 192.168.102.1
    ipEnd: 192.168.102.13
    gateway: 192.168.102.14
    vlan: 3002


## Monitor install Prometheus and Grafana
monitor_enabled: false
## Grafana Password (Default: password)
#grafana_password: "admin"

## Enable basic auth
kube_basic_auth: true
## User defined api password
kube_api_pwd: xk8suser

## Change default NodePort range 
kube_apiserver_node_port_range: "9000-32767"

## Install Elasticsearch, Fluentd, Kibana
install_efk : false

install_5gc : true
```

4. Prepare required file
    a. Put EPC images (.tar) to 
    `x-k8s-e2e/kubespray/roles/install_5gc/files/images`

5. Deploy  

   ```=bash
   su -
   ./x-k8s install
   ```