diff --git a/.gitmodules b/.gitmodules index aa158f9a679ef9530050dbb75e992a7fdd37401f..3ab0555974ed914744e72588b3d9f87aa70fcab1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "component/oai-upf-vpp"] path = component/oai-upf-vpp url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp.git +[submodule "component/oai-nssf"] + path = component/oai-nssf + url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nssf.git diff --git a/ci-scripts/Jenkinsfile-GitLab-Docker b/ci-scripts/Jenkinsfile-GitLab-Docker index 8bd407273c0f7544ce4601475b83a65a6b03e714..7b147afe9a4e089e417a2d176d30b95dd54c2c2f 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Docker +++ b/ci-scripts/Jenkinsfile-GitLab-Docker @@ -76,6 +76,8 @@ def udrBranch = params.udrBranch def nssfTag = params.udrTag def nssfBranch = params.udrBranch +def upfVppBranch = 'develop' + //------------------------------------------------------------------------------- // Pipeline start pipeline { @@ -214,7 +216,7 @@ pipeline { sh 'git checkout -f ' + upstreamTagToUse sh "zip -r -qq oai-cn5g-fed.zip .git" sh "mkdir -p archives" - 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 './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 + ' --upf-vpp-branch ' + upfVppBranch + ' --nssf-branch ' + nssfBranch } if (scmEvent) { mini = true @@ -226,14 +228,14 @@ pipeline { } sh "zip -r -qq oai-cn5g-fed.zip .git" sh "mkdir -p archives" - 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' + 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 --upf-vpp-branch develop --nssf-branch develop' } if ((!upstreamEvent) && (!scmEvent)) { mini = true basic = true slice = true 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 + ' --ausf-branch ' + ausfBranch + ' --udm-branch ' + udmBranch + ' --udr-branch ' + udrBranch + 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 + ' --upf-vpp-branch ' + upfVppBranch + ' --nssf-branch ' + nssfBranch sh "mkdir -p archives" } // Verify that the images are available diff --git a/component/oai-nssf b/component/oai-nssf new file mode 160000 index 0000000000000000000000000000000000000000..a60d6b84e30e25d255734289e93ed4f9dfe68f28 --- /dev/null +++ b/component/oai-nssf @@ -0,0 +1 @@ +Subproject commit a60d6b84e30e25d255734289e93ed4f9dfe68f28 diff --git a/docs/BUILD_IMAGES.md b/docs/BUILD_IMAGES.md index e3594319721863cc2b201a1fd338589281266456..de6f060dd14791cdd191a3c3c1449f15969f555b 100644 --- a/docs/BUILD_IMAGES.md +++ b/docs/BUILD_IMAGES.md @@ -30,26 +30,27 @@ We recommend to synchronize with the master branches on all git sub-modules. We also recommend that you synchronize this "tutorial" repository with a provided tag. By doing so, the `docker-compose` files will be aligned with feature sets of each cNF. -**At the time of writing (2021/10/29), the release tag is `v1.2.1`.** +**At the time of writing (2022/01/17), the release tag is `v1.3.0`.** | CNF Name | Branch Name | Tag | Ubuntu 18.04 | RHEL8 (UBI8) | | ----------- | ----------- | -------- | ------------ | ----------------| -| FED REPO | N/A | `v1.2.1` | | | -| AMF | `master` | `v1.2.1` | X | X | -| SMF | `master` | `v1.2.1` | X | X | -| NRF | `master` | `v1.2.1` | X | X | -| SPGW-U-TINY | `master` | `v1.1.4` | X | X | -| UDR | `master` | `v1.2.1` | X | X | -| UDM | `master` | `v1.2.1` | X | X | -| AUSF | `master` | `v1.2.1` | X | X | -| UPF-VPP | `master` | `v1.2.1` | X | X | +| FED REPO | N/A | `v1.3.0` | | | +| AMF | `master` | `v1.3.0` | X | X | +| SMF | `master` | `v1.3.0` | X | X | +| NRF | `master` | `v1.3.0` | X | X | +| SPGW-U-TINY | `master` | `v1.1.5` | X | X | +| UDR | `master` | `v1.3.0` | X | X | +| UDM | `master` | `v1.3.0` | X | X | +| AUSF | `master` | `v1.3.0` | X | X | +| UPF-VPP | `master` | `v1.3.0` | X | X | +| NSSF | `master` | `v1.3.0` | X | X | ```bash # Clone directly on the latest release tag -$ git clone --branch v1.2.1 https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git +$ git clone --branch v1.3.0 https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git $ cd oai-cn5g-fed # If you forgot to clone directly to the latest release tag -$ git checkout -f v1.2.1 +$ git checkout -f v1.3.0 # Synchronize all git submodules $ ./scripts/syncComponents.sh @@ -62,6 +63,7 @@ OAI-AUSF component branch : master OAI-UDM component branch : master OAI-UDR component branch : master OAI-UPF-VPP component branch : master +OAI-NSSF component branch : master --------------------------------------------------------- git submodule deinit --all --force git submodule init @@ -71,19 +73,21 @@ git submodule update or a little bit more dangerous ```bash -$ ./scripts/syncComponents.sh --nrf-branch v1.2.1 --amf-branch v1.2.1 \ - --smf-branch v1.2.1 --spgwu-tiny-branch v1.1.4 \ - --udr-branch v1.2.1 --udm-branch v1.2.1 \ - --ausf-branch v1.2.1 --upf-vpp-branch v1.2.1 +$ ./scripts/syncComponents.sh --nrf-branch v1.3.0 --amf-branch v1.3.0 \ + --smf-branch v1.3.0 --spgwu-tiny-branch v1.1.5 \ + --udr-branch v1.3.0 --udm-branch v1.3.0 \ + --ausf-branch v1.3.0 --upf-vpp-branch v1.3.0 \ + --nssf-branch v1.3.0 --------------------------------------------------------- -OAI-NRF component branch : v1.2.1 -OAI-AMF component branch : v1.2.1 -OAI-SMF component branch : v1.2.1 -OAI-SPGW-U component branch : v1.1.4 -OAI-UDR component branch : v1.2.1 -OAI-UDM component branch : v1.2.1 -OAI-AUSF component branch : v1.2.1 -OAI-UPF-VPP component branch : v1.2.1 +OAI-NRF component branch : v1.3.0 +OAI-AMF component branch : v1.3.0 +OAI-SMF component branch : v1.3.0 +OAI-SPGW-U component branch : v1.1.5 +OAI-UDR component branch : v1.3.0 +OAI-UDM component branch : v1.3.0 +OAI-AUSF component branch : v1.3.0 +OAI-UPF-VPP component branch : v1.3.0 +OAI-NSSF component branch : v1.3.0 --------------------------------------------------------- git submodule deinit --all --force git submodule init @@ -116,7 +120,8 @@ $ git rebase origin/master $ ./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 --upf-vpp-branch develop + --udr-branch develop --upf-vpp-branch develop \ + --nssf-branch develop --------------------------------------------------------- OAI-NRF component branch : develop OAI-AMF component branch : develop @@ -126,6 +131,7 @@ OAI-AUSF component branch : develop OAI-UDM component branch : develop OAI-UDR component branch : develop OAI-UPF-VPP component branch : develop +OAI-NSSF component branch : develop --------------------------------------------------------- git submodule deinit --all --force git submodule init @@ -372,7 +378,7 @@ The above command is with podman, in case of docker it can be changed with its d # 10. Build UPF-VPP Image # -## 9.1 On a Ubuntu 18.04 Host ## +## 10.1 On a Ubuntu 18.04 Host ## ```bash $ docker build --target oai-upf-vpp --tag oai-upf-vpp:latest \ @@ -385,7 +391,7 @@ oai-upf-vpp latest 581e07d59ec3 1 minute ago ... ``` -## 9.2 On a RHEL8 Host ## +## 10.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. @@ -402,5 +408,39 @@ $ sudo podman build --target oai-upf-vpp --tag oai-upf-vpp:latest \ The above command is with podman, in case of docker it can be changed with its docker equivalent. +# 11. Build NSSF Image # + +## 11.1 On a Ubuntu 18.04 Host ## + +```bash +$ docker build --target oai-nssf --tag oai-nssf:latest \ + --file component/oai-nssf/docker/Dockerfile.nssf.ubuntu18 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-nssf +$ docker image prune --force +$ docker image ls +oai-nssf latest 77a96de94c23 1 minute ago 231MB +... +``` + +## 11.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-nssf --tag oai-nssf:latest \ + --file component/oai-nssf/docker/Dockerfile.nssf.rhel8 \ + --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ + component/oai-nssf +... +``` + +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 can also go [back](./DEPLOY_HOME.md) to the list of tutorials. diff --git a/docs/RETRIEVE_OFFICIAL_IMAGES.md b/docs/RETRIEVE_OFFICIAL_IMAGES.md index 866de4f32fca554f7240a40a015e494fde0f0550..5575612d6b91d6dd2a543b7e3174a69f4a6eff47 100644 --- a/docs/RETRIEVE_OFFICIAL_IMAGES.md +++ b/docs/RETRIEVE_OFFICIAL_IMAGES.md @@ -48,6 +48,7 @@ $ docker pull rdefosseoai/oai-udr:latest $ docker pull rdefosseoai/oai-udm:latest $ docker pull rdefosseoai/oai-ausf:latest $ docker pull rdefosseoai/oai-upf-vpp:latest +$ docker pull rdefosseoai/oai-nssf:latest ``` And **re-tag** them for tutorials' docker-compose file to work. @@ -61,6 +62,7 @@ $ docker image tag rdefosseoai/oai-udr:latest oai-udr:latest $ docker image tag rdefosseoai/oai-udm:latest oai-udm:latest $ docker image tag rdefosseoai/oai-ausf:latest oai-ausf:latest $ docker image tag rdefosseoai/oai-upf-vpp:latest oai-upf-vpp:latest +$ docker image tag rdefosseoai/oai-nssf:latest oai-nssf:latest ``` Finally you may logoff --> your token is stored in plain text.. @@ -77,26 +79,27 @@ We will push new versions when new features are validated. This repository only has tutorials and Continuous Integration scripts. -**At the time of writing (2021/10/29), the release tag is `v1.2.1`.** +**At the time of writing (2022/01/17), the release tag is `v1.3.0`.** | CNF Name | Branch Name | Tag | Ubuntu 18.04 | RHEL8 (UBI8) | | ----------- | ----------- | -------- | ------------ | ----------------| -| FED REPO | N/A | `v1.2.1` | | | -| AMF | `master` | `v1.2.1` | X | X | -| SMF | `master` | `v1.2.1` | X | X | -| NRF | `master` | `v1.2.1` | X | X | -| SPGW-U-TINY | `master` | `v1.1.4` | X | X | -| UDR | `master` | `v1.2.1` | X | X | -| UDM | `master` | `v1.2.1` | X | X | -| AUSF | `master` | `v1.2.1` | X | X | -| UPF-VPP | `master` | `v1.2.1` | X | X | +| FED REPO | N/A | `v1.3.0` | | | +| AMF | `master` | `v1.3.0` | X | X | +| SMF | `master` | `v1.3.0` | X | X | +| NRF | `master` | `v1.3.0` | X | X | +| SPGW-U-TINY | `master` | `v1.1.5` | X | X | +| UDR | `master` | `v1.3.0` | X | X | +| UDM | `master` | `v1.3.0` | X | X | +| AUSF | `master` | `v1.3.0` | X | X | +| UPF-VPP | `master` | `v1.3.0` | X | X | +| NSSF | `master` | `v1.3.0` | X | X | ```bash # Clone directly on the latest release tag -$ git clone --branch v1.2.1 https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git +$ git clone --branch v1.3.0 https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git $ cd oai-cn5g-fed # If you forgot to clone directly to the latest release tag -$ git checkout -f v1.2.1 +$ git checkout -f v1.3.0 # Synchronize all git submodules $ ./scripts/syncComponents.sh @@ -109,6 +112,7 @@ OAI-AUSF component branch : master OAI-UDM component branch : master OAI-UDR component branch : master OAI-UPF-VPP component branch : master +OAI-NSSF component branch : master --------------------------------------------------------- git submodule deinit --all --force git submodule init @@ -118,3 +122,5 @@ git submodule update Later versions of the `master` branch may not work with the pulled images. You are ready to [Configure the Containers](./CONFIGURE_CONTAINERS.md). + +You can also go [back](./DEPLOY_HOME.md) to the list of tutorials. diff --git a/scripts/syncComponents.sh b/scripts/syncComponents.sh index 00d1e9757a6c2ca43cdc222b60bccd8294aa5958..68e142f1c35afd08b12caeb339f9a5a41bea38c9 100755 --- a/scripts/syncComponents.sh +++ b/scripts/syncComponents.sh @@ -60,6 +60,9 @@ function usage { echo " --upf-vpp-branch ####" echo " Specify the source branch for the OAI-UPF-VPP component" echo "" + echo " --nssf-branch ####" + echo " Specify the source branch for the OAI-UDR component" + echo "" echo " --help OR -h" echo " Print this help message." echo "" @@ -73,6 +76,7 @@ AUSF_BRANCH='master' UDM_BRANCH='master' UDR_BRANCH='master' UPF_VPP_BRANCH='master' +NSSF_VPP_BRANCH='master' doDefault=1 @@ -134,6 +138,12 @@ case $key in shift shift ;; + --nssf-branch) + NSSF_BRANCH="$2" + doDefault=0 + shift + shift + ;; *) echo "Syntax Error: unknown option: $key" echo "" @@ -152,6 +162,7 @@ echo "OAI-AUSF component branch : ${AUSF_BRANCH}" echo "OAI-UDM component branch : ${UDM_BRANCH}" echo "OAI-UDR component branch : ${UDR_BRANCH}" echo "OAI-UPF-VPP component branch : ${UPF_VPP_BRANCH}" +echo "OAI-NSSF component branch : ${NSSF_BRANCH}" echo "---------------------------------------------------------" # First do a clean-up @@ -239,4 +250,13 @@ else git checkout -b $UPF_VPP_BRANCH origin/$UPF_VPP_BRANCH > /dev/null 2>&1 fi popd + pushd component/oai-nssf + git fetch --prune > /dev/null 2>&1 + git branch -D $NSSF_BRANCH > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + git checkout $NSSF_BRANCH > /dev/null 2>&1 + else + git checkout -b $NSSF_BRANCH origin/$NSSF_BRANCH > /dev/null 2>&1 + fi + popd fi