diff --git a/.gitmodules b/.gitmodules index fe521efc68bff3e1a1bcd10987ca17d9b5fd1129..b30ca0c0dc1f367befaef572fb0679bbcc4a22d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,12 @@ [submodule "component/oai-nrf"] path = component/oai-nrf url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf.git +[submodule "component/oai-ausf"] + path = component/oai-ausf + url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-ausf.git +[submodule "component/oai-udm"] + path = component/oai-udm + url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udm.git +[submodule "component/oai-udr"] + path = component/oai-udr + url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udr.git diff --git a/README.md b/README.md index 60d8e07dfd5a7a226058ace81e3c8633b0ce1147..98aeb5c5e1aa13476b840cab6c26702e6593137c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AMF/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-AMF%2F&label=build%20AMF"></a> <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-NRF/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-NRF%2F&label=build%20NRF"></a> <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-SMF/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-SMF%2F&label=build%20SMF"></a> + <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-AUSF/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-AUSF%2F&label=build%20AUSF"></a> + <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDM/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-UDM%2F&label=build%20UDM"></a> + <a href="https://jenkins-oai.eurecom.fr/job/OAI-CN5G-UDR/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FOAI-CN5G-UDR%2F&label=build%20UDR"></a> </p> <h2 align="center"> @@ -17,11 +20,11 @@ At the moment, it contains the following network elements: * Access and Mobility Management Function (**[AMF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf)**) -* Authentication Server Management Function (**AUSF**) +* Authentication Server Management Function (**[AUSF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-ausf)**) * Network Repository Function (**[NRF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf)**) * Session Management Function (**[SMF](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf)**) -* Unified Data Management (**UDM**) -* Unified Data Repository (**UDR**) +* Unified Data Management (**[UDM](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udm)**) +* Unified Data Repository (**[UDR](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-udr)**) * User Plane Function (**UPF**) with 2 variants: * Simple Implementation based on our 4G CUPS component (**[SPGWU-TINY](https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny)**) * VPP-Based Implementation (**UPF-VPP**) diff --git a/ci-scripts/Jenkinsfile-GitLab-Docker b/ci-scripts/Jenkinsfile-GitLab-Docker index e418348080df07ed36ad35c683177376b80f4bda..3880fa2f626f03ed5c83e6369fbb26539c3d845b 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Docker +++ b/ci-scripts/Jenkinsfile-GitLab-Docker @@ -188,7 +188,7 @@ pipeline { sh 'git checkout -f ' + upstreamTagToUse sh "zip -r -qq oai-cn5g-fed.zip .git" sh "mkdir -p archives DS-TEST-RESULTS" - sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + ' --ausf-branch ' + ausfBranch + ' --udm-branch ' + udmBranch + ' --udr-branch ' + udrBranch } if (scmEvent) { sh "git clean -x -d -f > /dev/null 2>&1" @@ -197,11 +197,11 @@ pipeline { } sh "zip -r -qq oai-cn5g-fed.zip .git" sh "mkdir -p archives DS-TEST-RESULTS" - sh './scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop' + sh './scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop --ausf-branch develop --udm-branch develop --udr-branch develop' } if ((!upstreamEvent) && (!scmEvent)) { sh "git clean -x -d -f > /dev/null 2>&1" - sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + ' --ausf-branch ' + ausfBranch + ' --udm-branch ' + udmBranch + ' --udr-branch ' + udrBranch sh "mkdir -p archives DS-TEST-RESULTS" } // Verify that the images are available diff --git a/component/oai-ausf b/component/oai-ausf new file mode 160000 index 0000000000000000000000000000000000000000..93da5c30233453199c0b62ae0eb4cdaaa39e1a26 --- /dev/null +++ b/component/oai-ausf @@ -0,0 +1 @@ +Subproject commit 93da5c30233453199c0b62ae0eb4cdaaa39e1a26 diff --git a/component/oai-udm b/component/oai-udm new file mode 160000 index 0000000000000000000000000000000000000000..c9447d2dc4c9880c0df7fb25fa8632c23ab8f086 --- /dev/null +++ b/component/oai-udm @@ -0,0 +1 @@ +Subproject commit c9447d2dc4c9880c0df7fb25fa8632c23ab8f086 diff --git a/component/oai-udr b/component/oai-udr new file mode 160000 index 0000000000000000000000000000000000000000..88ea191b53264de71d0c32df7f309ddb186b7f9d --- /dev/null +++ b/component/oai-udr @@ -0,0 +1 @@ +Subproject commit 88ea191b53264de71d0c32df7f309ddb186b7f9d diff --git a/docs/BUILD_IMAGES.md b/docs/BUILD_IMAGES.md index a5cf864a54ce5a6e331683f08109dea078145e47..a01d27e2a3021734f37bbdaeeb77c4282b51b540 100644 --- a/docs/BUILD_IMAGES.md +++ b/docs/BUILD_IMAGES.md @@ -100,12 +100,17 @@ $ git rebase origin/master # Synchronize all git submodules $ ./scripts/syncComponents.sh --nrf-branch develop --amf-branch develop \ - --smf-branch develop --spgwu-tiny-branch develop + --smf-branch develop --spgwu-tiny-branch develop \ + --ausf-branch develop --udm-branch develop \ + --udr-branch develop --------------------------------------------------------- OAI-NRF component branch : develop OAI-AMF component branch : develop OAI-SMF component branch : develop OAI-SPGW-U component branch : develop +OAI-AUSF component branch : develop +OAI-UDM component branch : develop +OAI-UDR component branch : develop --------------------------------------------------------- git submodule deinit --all --force git submodule init @@ -196,7 +201,8 @@ The above command is with podman, in case of docker it can be changed with its d ```bash $ docker build --target oai-nrf --tag oai-nrf:latest \ --file component/oai-nrf/docker/Dockerfile.nrf.ubuntu18 \ - --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" component/oai-nrf + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-nrf $ docker image prune --force $ docker image ls oai-nrf latest 04334b29e103 1 minute ago 247MB @@ -227,7 +233,8 @@ The above command is with podman, in case of docker it can be changed with its d ```bash $ docker build --target oai-spgwu-tiny --tag oai-spgwu-tiny:latest \ --file component/oai-upf-equivalent/docker/Dockerfile.ubuntu18.04 \ - --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" component/oai-upf-equivalent + --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-upf-equivalent $ docker image prune --force $ docker image ls oai-spgwu-tiny latest dec6311cef3b 1 minute ago 255MB @@ -251,4 +258,101 @@ $ 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. +# 7. Build AUSF Image # + +## 7.1 On a Ubuntu 18.04 Host ## + +```bash +$ docker build --target oai-ausf --tag oai-ausf:latest \ + --file component/oai-ausf/docker/Dockerfile.ausf.ubuntu18 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-ausf +$ docker image prune --force +$ docker image ls +oai-ausf latest 77a96de94c23 1 minute ago 231MB +... +``` + +## 7.2 On a RHEL8 Host ## + +RHEL base images generally needs a subscription to access the package repository. +For that the base image needs ca and entitlement .pem files. + +Copy the ca and entitlement .pem files in the oai-nrf repository in a new folder named `tmp` before building the image. + +```bash +$ sudo podman build --target oai-ausf --tag oai-ausf:latest \ + --file component/oai-ausf/docker/Dockerfile.ausf.rhel8 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-ausf +... +``` + +The above command is with podman, in case of docker it can be changed with its docker equivalent. + +# 8. Build UDM Image # + +## 8.1 On a Ubuntu 18.04 Host ## + +```bash +$ docker build --target oai-udm --tag oai-udm:latest \ + --file component/oai-udm/docker/Dockerfile.udm.ubuntu18 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-udm +$ docker image prune --force +$ docker image ls +oai-udm latest 10a4334e31be 1 minute ago 229MB +... +``` + +## 8.2 On a RHEL8 Host ## + +RHEL base images generally needs a subscription to access the package repository. +For that the base image needs ca and entitlement .pem files. + +Copy the ca and entitlement .pem files in the oai-nrf repository in a new folder named `tmp` before building the image. + +```bash +$ sudo podman build --target oai-udm --tag oai-udm:latest \ + --file component/oai-udm/docker/Dockerfile.udm.rhel8 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-udm +... +``` + +The above command is with podman, in case of docker it can be changed with its docker equivalent. + +# 9. Build UDR Image # + +## 9.1 On a Ubuntu 18.04 Host ## + +```bash +$ docker build --target oai-udr --tag oai-udr:latest \ + --file component/oai-udr/docker/Dockerfile.udr.ubuntu18 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-udr +$ docker image prune --force +$ docker image ls +oai-udr latest 581e07d59ec3 1 minute ago 234MB +... +``` + +## 9.2 On a RHEL8 Host ## + +RHEL base images generally needs a subscription to access the package repository. +For that the base image needs ca and entitlement .pem files. + +Copy the ca and entitlement .pem files in the oai-nrf repository in a new folder named `tmp` before building the image. + +```bash +$ sudo podman build --target oai-udr --tag oai-udr:latest \ + --file component/oai-udr/docker/Dockerfile.udr.rhel8 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-udr +... +``` + +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) diff --git a/scripts/syncComponents.sh b/scripts/syncComponents.sh index 9b8da663965e22f4d9c1c73480d2b52697c7b4f0..b944945dce14123bfedefd50bae81744efb2f43e 100755 --- a/scripts/syncComponents.sh +++ b/scripts/syncComponents.sh @@ -48,6 +48,15 @@ function usage { echo " --spgwu-tiny-branch ####" echo " Specify the source branch for the OAI-SPGW-U-TINY component" echo "" + echo " --ausf-branch ####" + echo " Specify the source branch for the OAI-AUSF component" + echo "" + echo " --udm-branch ####" + echo " Specify the source branch for the OAI-UDM component" + echo "" + echo " --udr-branch ####" + echo " Specify the source branch for the OAI-UDR component" + echo "" echo " --help OR -h" echo " Print this help message." echo "" @@ -57,6 +66,9 @@ NRF_BRANCH='master' AMF_BRANCH='master' SMF_BRANCH='master' SPGWU_BRANCH='master' +AUSF_BRANCH='master' +UDM_BRANCH='master' +UDR_BRANCH='master' doDefault=1 @@ -94,6 +106,24 @@ case $key in shift shift ;; + --ausf-branch) + AUSF_BRANCH="$2" + doDefault=0 + shift + shift + ;; + --udm-branch) + UDM_BRANCH="$2" + doDefault=0 + shift + shift + ;; + --udr-branch) + UDR_BRANCH="$2" + doDefault=0 + shift + shift + ;; *) echo "Syntax Error: unknown option: $key" echo "" @@ -108,6 +138,9 @@ echo "OAI-NRF component branch : ${NRF_BRANCH}" echo "OAI-AMF component branch : ${AMF_BRANCH}" echo "OAI-SMF component branch : ${SMF_BRANCH}" echo "OAI-SPGW-U component branch : ${SPGWU_BRANCH}" +echo "OAI-AUSF component branch : ${AUSF_BRANCH}" +echo "OAI-UDM component branch : ${UDM_BRANCH}" +echo "OAI-UDR component branch : ${UDR_BRANCH}" echo "---------------------------------------------------------" # First do a clean-up @@ -159,4 +192,31 @@ else git checkout -b $SPGWU_BRANCH origin/$SPGWU_BRANCH > /dev/null 2>&1 fi popd + pushd component/oai-ausf + git fetch --prune > /dev/null 2>&1 + git branch -D $AUSF_BRANCH > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + git checkout $AUSF_BRANCH > /dev/null 2>&1 + else + git checkout -b $AUSF_BRANCH origin/$AUSF_BRANCH > /dev/null 2>&1 + fi + popd + pushd component/oai-udm + git fetch --prune > /dev/null 2>&1 + git branch -D $UDM_BRANCH > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + git checkout $UDM_BRANCH > /dev/null 2>&1 + else + git checkout -b $UDM_BRANCH origin/$UDM_BRANCH > /dev/null 2>&1 + fi + popd + pushd component/oai-udr + git fetch --prune > /dev/null 2>&1 + git branch -D $UDR_BRANCH > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + git checkout $UDR_BRANCH > /dev/null 2>&1 + else + git checkout -b $UDR_BRANCH origin/$UDR_BRANCH > /dev/null 2>&1 + fi + popd fi