diff --git a/ci-scripts/Jenkinsfile-GitLab-Docker-Check b/ci-scripts/Jenkinsfile-GitLab-Docker-Check index 83e87e853461a8c03134a0ba13e485fc903a7f79..fd91704cbf2ec8a968356ae9f81103efd43086e7 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Docker-Check +++ b/ci-scripts/Jenkinsfile-GitLab-Docker-Check @@ -59,10 +59,11 @@ pipeline { JOB_TIMESTAMP = JOB_TIMESTAMP.trim() sh "git clean -x -d -f > /dev/null 2>&1" + sh 'git log -n1' if (params.CheckAnotherBranch != null) { if (params.CheckAnotherBranch) { if (params.BranchToCheck != null) { - sh 'git checkout params.BranchToCheck' + sh 'git checkout '+ params.BranchToCheck sh 'git log -n1' } } @@ -70,13 +71,14 @@ pipeline { sh "mkdir -p archives/cn5g" sh "mkdir -p archives/cn5gwithnoNRF" + sh "mkdir -p archives/gnbsim" } } } stage ('Deploy Whole 5G Core Network with NRF') { steps { script { - echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose with NRF\u001B[0m' + echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose with NRF\u001B[0m' dir('docker-compose') { sh 'sed -i -e "s@latest@develop@g" docker-compose.yaml' sh 'docker-compose -f docker-compose.yaml up -d > ../archives/cn5g/compose_5gcn_up.log 2>&1' @@ -87,17 +89,17 @@ pipeline { ret = ret.trim() if (ret != '5') { error "Deployment went wrong!" - } + } } } } post { always { script { - sh 'docker logs oai-nrf > archives/cn5g/oai_nrf.log' - sh 'docker logs oai-amf > archives/cn5g/oai_amf.log' - sh 'docker logs oai-smf > archives/cn5g/oai_smf.log' - sh 'docker logs oai-spgwu > archives/cn5g/oai_spgwu.log' + sh 'docker logs oai-nrf > archives/cn5g/oai_nrf.log 2>&1 || true' + sh 'docker logs oai-amf > archives/cn5g/oai_amf.log 2>&1 || true' + sh 'docker logs oai-smf > archives/cn5g/oai_smf.log 2>&1 || true' + sh 'docker logs oai-spgwu > archives/cn5g/oai_spgwu.log 2>&1 || true' } } success { @@ -123,61 +125,126 @@ pipeline { } } - stage ('Deploy Whole 5G Core Network with no NRF') { + stage ('Deploy Whole 5G Core Network without NRF') { steps { script { - echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose with no NRF\u001B[0m' + echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose without NRF\u001B[0m' dir('docker-compose') { sh 'sed -i -e "s@latest@develop@g" docker-compose-no-nrf.yaml' sh 'docker-compose -f docker-compose-no-nrf.yaml up -d > ../archives/cn5gwithnoNRF/compose_5gcn_up.log 2>&1' sh 'sleep 100' // Do a check on number of healthy containers // 4 == mysql + amf + smf + upf(spgwu-tiny) - ret = sh returnStdout: true, script: 'docker-compose ps -a | grep -v unhealthy | grep -c healthy || true' + ret = sh returnStdout: true, script: 'docker-compose -f docker-compose-no-nrf.yaml ps -a | grep -v unhealthy | grep -c healthy || true' ret = ret.trim() if (ret != '4') { - error "Deployment went wrong with no NRF!" - } + error "Deployment went wrong without NRF!" + } + } + } + } + post { + always { + script { + sh 'docker logs oai-amf > archives/cn5gwithnoNRF/oai_amf.log 2>&1 || true' + sh 'docker logs oai-smf > archives/cn5gwithnoNRF/oai_smf.log 2>&1 || true' + sh 'docker logs oai-spgwu > archives/cn5gwithnoNRF/oai_spgwu.log 2>&1 || true' + } + } + success { + script { + sh 'echo "DEPLOYMENT: OK without NRF"' + } + } + unsuccessful { + script { + sh 'docker-compose -f docker-compose-no-nrf.yaml down || true' + sh 'echo "DEPLOYMENT: KO without NRF"' + } + } + } + } + stage ('Undeploy 5G-CN without NRF') { + steps { + script { + echo '\u2705 \u001B[32mUn-Deploy CN5G without NRF\u001B[0m' + dir('docker-compose') { + sh 'docker-compose -f docker-compose-no-nrf.yaml down > ../archives/cn5gwithnoNRF/compose_normal_down.log 2>&1' + } + } + } + } + + stage ('gnbsim tutorial') { + steps { + script { + echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose with NRF\u001B[0m' + dir('docker-compose') { + sh 'docker-compose -f docker-compose.yaml up -d > ../archives/gnbsim/compose_5gcn_up.log 2>&1' + sh 'sleep 100' + // Do a check on number of healthy containers + // 5 == mysql + nrf + amf + smf + upf(spgwu-tiny) + ret = sh returnStdout: true, script: 'docker-compose ps -a | grep -v unhealthy | grep -c healthy || true' + ret = ret.trim() + if (ret != '5') { + error "Deployment went wrong!" + } + sh 'docker-compose -f docker-compose-gnbsim.yaml up -d gnbsim > ../archives/gnbsim/gnbsim_up.log 2>&1' + sh 'sleep 20' + // Do a check if gnbsim is healthy + ret = sh returnStdout: true, script: 'docker-compose -f docker-compose-gnbsim.yaml ps -a | grep -v unhealthy | grep -c healthy || true' + ret = ret.trim() + if (ret != '1') { + error "gnbsim deployment went wrong" + } } } } post { always { script { - sh 'docker logs oai-amf > archives/cn5gwithnoNRF/oai_amf.log' - sh 'docker logs oai-smf > archives/cn5gwithnoNRF/oai_smf.log' - sh 'docker logs oai-spgwu > archives/cn5gwithnoNRF/oai_spgwu.log' + sh 'docker logs oai-nrf > archives/gnbsim/oai_nrf.log 2>&1 || true' + sh 'docker logs oai-amf > archives/gnbsim/oai_amf.log 2>&1 || true' + sh 'docker logs oai-smf > archives/gnbsim/oai_smf.log 2>&1 || true' + sh 'docker logs oai-spgwu > archives/gnbsim/oai_spgwu.log 2>&1 || true' + sh 'docker logs gnbsim > archives/gnbsim/gnbsim.log 2>&1 || true' } } success { script { - sh 'echo "DEPLOYMENT: OK with no NRF"' + sh 'echo "DEPLOYMENT: OK"' } } unsuccessful { script { - sh 'echo "DEPLOYMENT: KO with no NRF"' + dir('docker-compose') { + sh 'docker-compose -f docker-compose-gnbsim.yaml down || true' + sh 'docker-compose down || true' + } + sh 'echo "DEPLOYMENT: KO"' } } } } - stage ('Undeploy 5G-CN with no NRF') { + stage ('Un-deploy gnbsim tutorial') { steps { script { - echo '\u2705 \u001B[32mUn-Deploy CN5G with no NRF\u001B[0m' dir('docker-compose') { - sh 'docker-compose down > ../archives/cn5gwithnoNRF/compose_normal_down.log 2>&1' + sh 'docker-compose -f docker-compose-gnbsim.yaml down > ../archives/gnbsim/gnbsim_down.log 2>&1' + sh 'docker-compose down >> ../archives/gnbsim/cn5g_down.log 2>&1' } } } } } + post { always { script { // Remove any leftover containers/networks dir('docker-compose') { - sh 'docker-compose down' + sh 'docker-compose -f docker-compose-gnbsim.yaml down || true' + sh 'docker-compose down || true' } // Zipping all archived log files sh "zip -r -qq cn5g_deploy_docker_logs.zip archives" diff --git a/docker-compose/docker-compose-gnbsim.yaml b/docker-compose/docker-compose-gnbsim.yaml index ec55302ada6431d1ce9e779b34a9b87cfb8984cc..b1bd8af2d93604debdeecd18d67b4088eb6699ad 100644 --- a/docker-compose/docker-compose-gnbsim.yaml +++ b/docker-compose/docker-compose-gnbsim.yaml @@ -2,7 +2,7 @@ version: '3.8' services: gnbsim: container_name: gnbsim - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -22,6 +22,7 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no - NGAPPeerAddr=192.168.70.132 - GTPuLocalAddr=192.168.70.136 - GTPuIFname=eth0 @@ -35,7 +36,7 @@ services: retries: 5 gnbsim2: container_name: gnbsim2 - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -55,6 +56,7 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no - NGAPPeerAddr=192.168.70.132 - GTPuLocalAddr=192.168.70.137 - GTPuIFname=eth0 @@ -68,7 +70,7 @@ services: retries: 5 gnbsim3: container_name: gnbsim3 - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -88,6 +90,7 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no - NGAPPeerAddr=192.168.70.132 - GTPuLocalAddr=192.168.70.138 - GTPuIFname=eth0 @@ -101,7 +104,7 @@ services: retries: 5 gnbsim4: container_name: gnbsim4 - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -121,6 +124,7 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no - NGAPPeerAddr=192.168.70.132 - GTPuLocalAddr=192.168.70.139 - GTPuIFname=eth0 @@ -134,7 +138,7 @@ services: retries: 5 gnbsim5: container_name: gnbsim5 - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -154,6 +158,7 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no - NGAPPeerAddr=192.168.70.132 - GTPuLocalAddr=192.168.70.140 - GTPuIFname=eth0 @@ -165,9 +170,41 @@ services: interval: 10s timeout: 5s retries: 5 + gnbsim-fqdn: + container_name: gnbsim-fqdn + image: gnbsim:latest + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=5 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000035 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - USE_FQDN=yes + - AMF_FQDN=amf.oai-5gc.eur + - GTPuIFname=eth0 + networks: + public_net: + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 gnbsim-vpp: container_name: gnbsim-vpp - image: gnbsim:develop + image: gnbsim:latest privileged: true environment: - MCC=208 @@ -187,9 +224,12 @@ services: - DNN=default - URL=http://www.asnt.org:8080/ - NRCellID=1 + - USE_FQDN=no +# - USE_FQDN=yes +# - AMF_FQDN=amf.oai-5gc.eur - NGAPPeerAddr=192.168.71.132 - GTPuLocalAddr=192.168.72.141 - - GTPuIFname=eth0 + - GTPuIFname=eth1 networks: public_net_core: ipv4_address: 192.168.71.141 diff --git a/docker-compose/docker-compose-no-nrf.yaml b/docker-compose/docker-compose-no-nrf.yaml index bafb56d7a49fa399801df5fcc7d7f477041b9acf..bb19a309768554de6ad9af9579c5f994efe3513e 100644 --- a/docker-compose/docker-compose-no-nrf.yaml +++ b/docker-compose/docker-compose-no-nrf.yaml @@ -192,10 +192,10 @@ services: networks: # public_net: # external: - # name: demo-oai + # name: demo-oai-public-net public_net: driver: bridge - name: demo-oai + name: demo-oai-public-net ipam: config: - subnet: 192.168.70.128/26 diff --git a/docs/BUILD_IMAGES.md b/docs/BUILD_IMAGES.md index acf4cafbd165afa58196d9b8409e0961ca48fc5e..a5cf864a54ce5a6e331683f08109dea078145e47 100644 --- a/docs/BUILD_IMAGES.md +++ b/docs/BUILD_IMAGES.md @@ -251,4 +251,4 @@ $ sudo podman build --target oai-spgwu-tiny --tag oai-spgwu-tiny:latest \ The above command is with podman, in case of docker it can be changed with its docker equivalent. -You are ready to [Configure the Containers](./CONFIGURE_CONTAINERS.md) or deploying the images using [helm-charts] (./DEPLOY_SA5G_HC.md) +You are ready to [Configure the Containers](./CONFIGURE_CONTAINERS.md) or deploying the images using [helm-charts](./DEPLOY_SA5G_HC.md) diff --git a/docs/CONFIGURE_CONTAINERS.md b/docs/CONFIGURE_CONTAINERS.md index a1aa60cc9cee2dcfbcd7056212858d68a726651a..ce8a0ac52c663491875945aa673f30954bca4aa3 100644 --- a/docs/CONFIGURE_CONTAINERS.md +++ b/docs/CONFIGURE_CONTAINERS.md @@ -20,6 +20,7 @@ 3. [Networking](#3-networking) # 1. Configure the containers # + - **Core Network Configuration**: The [docker-compose](../docker-compose/docker-compose.yaml) file has configuration parameters of all the core network components. The file is pre-configured with parameters related to an [example scenario](./DEPLOY_SA5G_WITH_DS_TESTER.md). The table contains the location of the configuration files. These files contains allowed configurable parameters. **Keep checking this file it is possible that we will add new parameters for new features.** | File Name | Repository | Location | @@ -99,23 +100,47 @@ # 3. Networking # -- The [docker-compose.yaml](../docker-compose/docker-compose.yaml) can create the network automatically, currently in the file automatic network creation is disabled. It can be enabled by uncommenting the lines. - - ```bash - networks: - public_net: - driver: bridge - name: demo-oai - ipam: - config: - - subnet: 192.168.70.128/26 - driver_opts: - com.docker.network.bridge.name: "demo-oai" - ``` - -- In user wants to create manual network then below is the command - -components. To capture initial message exchange between smf<-->nrf<-->upf. +## 3.1. Automatic docker network deployment. ## + +The [docker-compose.yaml](../docker-compose/docker-compose.yaml) will create the network automatically. The bottom section of the file SHALL look like this: + +```bash +networks: + # public_net: + # external: + # name: demo-oai-public-net + public_net: + driver: bridge + name: demo-oai-public-net + ipam: + config: + - subnet: 192.168.70.128/26 + driver_opts: + com.docker.network.bridge.name: "demo-oai" +``` + +## 3.2. Manual docker network deployment. ## + +At the deployment, if you want to capture initial transactions between the CN5G components, you will have to manually create the network. + +First edit [docker-compose.yaml](../docker-compose/docker-compose.yaml) to look like this: + +```bash +networks: + public_net: + external: + name: demo-oai-public-net + # public_net: + # driver: bridge + # name: demo-oai-public-net + # ipam: + # config: + # - subnet: 192.168.70.128/26 + # driver_opts: + # com.docker.network.bridge.name: "demo-oai" +``` + +Then create the docker network: ```bash (docker-compose-host)$ docker network create \ @@ -138,7 +163,15 @@ components. To capture initial message exchange between smf<-->nrf<-->upf. 455631b3749c demo-oai-public-net bridge local ``` -- If the `docker-compose-host` machine is not configured with packet forwarding then it can be done using below command, +Finally you can start capturing. + +```bash +tshark -i demo-oai -w 5gcn-deployment.pcap +``` + +## 3.3. In case you forgot! ## + +If the `docker-compose-host` machine is not configured with packet forwarding then it can be done using below command, ```bash (docker-compose-host)$ sudo sysctl net.ipv4.conf.all.forwarding=1 diff --git a/docs/DEPLOY_SA5G_WITH_DS_TESTER.md b/docs/DEPLOY_SA5G_WITH_DS_TESTER.md index e6af16f983cc5e4e4f5a53a6d131b0e2392de467..c09e31bc06e7ba1051ea32c998e7b3e211fddb69 100644 --- a/docs/DEPLOY_SA5G_WITH_DS_TESTER.md +++ b/docs/DEPLOY_SA5G_WITH_DS_TESTER.md @@ -83,14 +83,16 @@ To know how to configure the machine with the above requirements vist [pre-requi ## 3. Configuring Host Machines ## -All the network functions are connected using `demo-oai-net` bridge. +All the network functions are connected using `demo-oai` bridge. There are two ways to create this bridge either manually or automatically using docker-compose. -* The manual version will allow packet capturing while network functions are getting deployed. So the initial tested setup packets can be captured for debugging purposes or checking if network functions registered properly to nrf. +* The manual version will allow packet capturing while network functions are getting deployed. So the initial tested setup packets can be captured for debugging purposes or checking if network functions registered properly to NRF. * The second option of automatic deployment is good when initial packet capture is not important. -### 3.1 Creating bridge manually +**NOTE** This tutorial needs that the bridge is created manually to analyse NRF packet exchange. + +### 3.1 Creating bridge manually - The bottom section of [docker-compose file](../docker-compose/docker-compose.yaml) SHALL look like this: @@ -109,7 +111,7 @@ There are two ways to create this bridge either manually or automatically using # com.docker.network.bridge.name: "demo-oai" ``` -- The `docker-compose-host` machine needs to be configured with `demo-oai-net` bridge before deploying core network components. To capture initial message exchange between smf<-->nrf<-->upf. +- The `docker-compose-host` machine needs to be configured with `demo-oai` bridge before deploying core network components. To capture initial message exchange between smf<-->nrf<-->upf. ```bash (docker-compose-host)$ docker network create \ @@ -154,6 +156,8 @@ The bottom section SHALL look like this: com.docker.network.bridge.name: "demo-oai" ``` +### 3.3 In case you forgot. True for manual or automatic network creation. + - If the `docker-compose-host` machine is not configured with packet forwarding then it can be done using below command (**important step**), ```bash @@ -331,7 +335,7 @@ The bottom section SHALL look like this: (docker-compose-host)$ docker logs oai-smf > smf.log (docker-compose-host)$ docker logs oai-nrf > nrf.log (docker-compose-host)$ docker logs oai-spgwu > spgwu.log - (docker-compose-host)$ ./core-network.sh stop nrf + (docker-compose-host)$ ./core-network.sh stop nrf spgwu Stopping the core network... Stopping oai-ext-dn ... done Stopping oai-smf ... done diff --git a/docs/DEPLOY_SA5G_WITH_GNBSIM.md b/docs/DEPLOY_SA5G_WITH_GNBSIM.md index 99158f5a82544b24724b5948ded0ae55699d249f..fbedafd6148a992a0c5c6c5a380e8ee78b9207ee 100644 --- a/docs/DEPLOY_SA5G_WITH_GNBSIM.md +++ b/docs/DEPLOY_SA5G_WITH_GNBSIM.md @@ -27,32 +27,37 @@ Note: In case readers are interested in deploying debuggers/developers core netw 3. Configuring Host Machines 4. Configuring OAI 5G Core Network Functions 5. Deploying OAI 5G Core Network -6. [Configuring gnbsim Scenario](#6-configuring-gnbsim-scenario) -7. [Executing gnbsim Scenario](#7-executing-the-gnbsim-scenario) +6. [Getting a `gnbsim` docker image](#6-getting-a-gnbsim-docker-image) +7. [Executing `gnbsim` Scenario](#7-executing-the-gnbsim-scenario) 8. [Analysing Scenario Results](#8-analysing-the-scenario-results) 9. [Trying some advanced stuff](#9-trying-some-advanced-stuff) -* In this demo the image tags and commits which were used are listed below, follow the [Building images](./BUILD_IMAGES.md) to build images with below tags. +* In this demo the image tags and commits which were used are listed below, follow the [Building images](./BUILD_IMAGES.md) to build images with below tags. | CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 | | ----------- |:----------------------- | ------------------------------------------ | ------------ | ---------------| -| AMF | `develop` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | X | -| SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | X | -| NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | X | -| SPGW-U-TINY | `gtp_extension_header` | `b628036d2e6060da8ba77c5e4cdde35bf18a62a5` | X | X | +| AMF | `master` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | X | +| SMF | `master` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | X | +| NRF | `master` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | X | +| SPGW-U-TINY | `master` | `b628036d2e6060da8ba77c5e4cdde35bf18a62a5` | X | X | <br/> -This tutorial is a extension of previous tutorial of [testing with dsTester](./docs/DEPLOY_SA5G_WITH_DS_TESTER.md). In previous tutorial we have seen the advanced testing tool dsTester, which is useful for validating even more complex scenarios. Moreover, there are various other opensource gnb/ue simulator tools are available for SA5G test. In this tutorial we use opensource simulator tool called gnbsim. With the help of gnbsim tool, we can perform very basic SA5G test by simulating one gnb and one ue. +This tutorial is a extension of previous tutorial of [testing with dsTester](./docs/DEPLOY_SA5G_WITH_DS_TESTER.md). In previous tutorial we have seen the advanced testing tool dsTester, which is useful for validating even more complex scenarios. + +Moreover, there are various other opensource gnb/ue simulator tools are available for SA5G test. In this tutorial we use opensource simulator tool called gnbsim. With the help of gnbsim tool, we can perform very basic SA5G test by simulating one gnb and one ue. ##### About gnbsim - + [Gnbsim](https://github.com/hhorai/gnbsim) is a 5G SA gNB/UE (Rel. 16) simulator for testing 5G System. It 3rd party opensource tool written in golang and more information can be found [here.](https://github.com/hhorai/gnbsim) Gnbsim simulates NGAP, NAS and GTPU protocols. Current version of gnbsim simulates one gnb and one ue. Let's begin !! + * Steps 1 to 5 are similar as previous tutorial. Please follow these steps to deploy OAI 5G core network components. -* We depoloy gnbsim docker service on same host as of core network, so there is no need to create additional route as +* We depoloy gnbsim docker service on same host as of core network, so there is no need to create additional route as we did for dsTest-host. -* Before we procced further for end to end SA5G test, make sure you have healthy docker services for OAI cn5g - +* Before we proceed further for end-to-end SA5G test, make sure you have healthy docker services for OAI cn5g + ```bash oai-cn5g-fed/docker-compose$ ./core-network.sh start nrf spgwu Starting 5gcn components in the order nrf, mysql, amf, smf, spgwu... @@ -75,27 +80,42 @@ SMF and UPF are registered to NRF... Core network is configured and healthy, total time taken 43187 milli seconds oai-cn5g-fed/docker-compose$ ``` -```bah + +```bash oai-cn5g-fed/docker-compose$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c25db05aa023 ubuntu:bionic "/bin/bash -c ' apt …" 23 seconds ago Up 22 seconds oai-ext-dn -31b6391a3a41 oai-amf:develop "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf -753ae61f715f oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 23 seconds ago Up 22 seconds (healthy) 2152/udp, 8805/udp oai-spgwu -84c164ab8136 oai-smf:develop "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf -6f0ce91e4efb oai-nrf:develop "/bin/bash /openair-…" 24 seconds ago Up 23 seconds (healthy) 80/tcp, 9090/tcp oai-nrf +31b6391a3a41 oai-amf:latest "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +753ae61f715f oai-spgwu-tiny:latest "/openair-spgwu-tiny…" 23 seconds ago Up 22 seconds (healthy) 2152/udp, 8805/udp oai-spgwu +84c164ab8136 oai-smf:latest "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +6f0ce91e4efb oai-nrf:latest "/bin/bash /openair-…" 24 seconds ago Up 23 seconds (healthy) 80/tcp, 9090/tcp oai-nrf 565617169b42 mysql:5.7 "docker-entrypoint.s…" 24 seconds ago Up 23 seconds (healthy) 3306/tcp, 33060/tcp mysql -rohan@rohan:~/gitrepo/oai-cn5g-fed/docker-compose$ +oai-cn5g-fed/docker-compose$ ``` -## 6. Configuring gnbsim Scenario ## -* Build gnbsim docker image +## 6. Getting a `gnbsim` docker image ## + +You have the choice: + +* Build `gnbsim` docker image + ```bash $ git clone https://gitlab.eurecom.fr/kharade/gnbsim.git $ cd gnbsim -$ docker build --tag gnbsim:develop --target gnbsim --file docker/Dockerfile.ubuntu.18.04 . +$ docker build --tag gnbsim:latest --target gnbsim --file docker/Dockerfile.ubuntu.18.04 . +``` + +OR + +* You can pull a prebuilt docker image for `gnbsim` + +```bash +docker pull rohankharade/gnbsim +docker image tag rohankharade/gnbsim:latest gnbsim:latest ``` -## 7. Executing the gnbsim Scenario ## +## 7. Executing the `gnbsim` Scenario ## + * The configuration parameters, are preconfigured in [docker-compose.yaml](../docker-compose/docker-compose.yaml) and [docker-compose-gnbsim.yaml](../docker-compose/docker-compose-gnbsim.yaml) and one can modify it for test. * Launch gnbsim docker service ```bash @@ -107,12 +127,12 @@ Creating gnbsim ... done ```bash oai-cn5g-fed/docker-compose$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -2ad428f94fb0 gnbsim:develop "/gnbsim/bin/entrypo…" 33 seconds ago Up 32 seconds (healthy) gnbsim +2ad428f94fb0 gnbsim:latest "/gnbsim/bin/entrypo…" 33 seconds ago Up 32 seconds (healthy) gnbsim c25db05aa023 ubuntu:bionic "/bin/bash -c ' apt …" 4 minutes ago Up 4 minutes oai-ext-dn -31b6391a3a41 oai-amf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf -753ae61f715f oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 4 minutes ago Up 4 minutes (healthy) 2152/udp, 8805/udp oai-spgwu -84c164ab8136 oai-smf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf -6f0ce91e4efb oai-nrf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp oai-nrf +31b6391a3a41 oai-amf:latest "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +753ae61f715f oai-spgwu-tiny:latest "/openair-spgwu-tiny…" 4 minutes ago Up 4 minutes (healthy) 2152/udp, 8805/udp oai-spgwu +84c164ab8136 oai-smf:latest "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +6f0ce91e4efb oai-nrf:latest "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp oai-nrf 565617169b42 mysql:5.7 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes (healthy) 3306/tcp, 33060/tcp mysql ``` Now we are ready to perform some traffic test. @@ -220,17 +240,17 @@ Please make sure status of instance is healthy before creating one more instance ```bash $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -a25174c51297 gnbsim:develop "/gnbsim/bin/entrypo…" 3 minutes ago Up 3 minutes (healthy) gnbsim5 -00c6207b0064 gnbsim:develop "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim4 -ed440f95fb19 gnbsim:develop "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim3 -8c4e4098955d gnbsim:develop "/gnbsim/bin/entrypo…" 14 minutes ago Up 14 minutes (healthy) gnbsim2 -895b1838c62a gnbsim:develop "/gnbsim/bin/entrypo…" 15 minutes ago Up 15 minutes (healthy) gnbsim +a25174c51297 gnbsim:latest "/gnbsim/bin/entrypo…" 3 minutes ago Up 3 minutes (healthy) gnbsim5 +00c6207b0064 gnbsim:latest "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim4 +ed440f95fb19 gnbsim:latest "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim3 +8c4e4098955d gnbsim:latest "/gnbsim/bin/entrypo…" 14 minutes ago Up 14 minutes (healthy) gnbsim2 +895b1838c62a gnbsim:latest "/gnbsim/bin/entrypo…" 15 minutes ago Up 15 minutes (healthy) gnbsim d48135fd045c ubuntu:bionic "/bin/bash -c ' apt …" 16 minutes ago Up 16 minutes oai-ext-dn -5e98a708d12b oai-amf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf -c64ae3c7f7c6 oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 16 minutes ago Up 16 minutes (healthy) 2152/udp, 8805/udp oai-spgwu -1cd8319bddb0 oai-smf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +5e98a708d12b oai-amf:latest "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +c64ae3c7f7c6 oai-spgwu-tiny:latest "/openair-spgwu-tiny…" 16 minutes ago Up 16 minutes (healthy) 2152/udp, 8805/udp oai-spgwu +1cd8319bddb0 oai-smf:latest "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf 9cda92a46be4 mysql:5.7 "docker-entrypoint.s…" 16 minutes ago Up 16 minutes (healthy) 3306/tcp, 33060/tcp mysql -cc407925adf2 oai-nrf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp oai-nrf +cc407925adf2 oai-nrf:latest "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp oai-nrf ``` * Let's verify all gnb and ue are registered at our 5G core -