This page describes how to build release G version of Non-RT RIC. 

Do you really need to build?

In general, there is no need to build the images manually.

Building from scratch is error-prone, and some development experience is required.

All images for the release are available in nexus image repositories. 

Please refer to the page  Release G - Run in Docker for running the release G Non-RT RIC.  


Details of the architecture can be found from  Release G page. 

(Note: The actual docker image version numbers/tags may be different from the instructions below as development continues in the relevant repositories)

Project Requirements

  • Java 11 (make sure that JAVA_HOME environment variable points to correct Java version).
  • Docker and docker-compose (latest).
  • git (latest) -  for downloading code repos.
  • Maven 3.6.

Build Code

Build nonrtric Docker containers

Download the following repos:

     git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/a1policymanagementservice" -b g-release  --recursive

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/dmaapadapter" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/helmmanager" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/informationcoordinatorservice" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/rappcatalogue" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/dmaapmediatorproducer" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/rapp/ransliceassurance" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/rapp/orufhrecovery" -b g-release

git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/sme" -b g-release        


           

To build docker images of a1policymanagementservice, dmaapadapter, helmmanager, informationcoordinatorservice, and rappcatalogue; go into the repo of each product and run the following command:

mvn clean install -Dmaven.test.skip=true


To build docker image of nonrtric, go into the repo run the commands below. Use the version found in the file container-tag.yaml.

cd auth-token-fetch
docker build -t o-ran-sc/nonrtric-plt-auth-token-fetch:<image-version> .


To build docker image of the enhanced rappcatalogue, go into the repo rappcatalogue run the commands below. Use the version found in the file container-tag.yaml.

cd catalogue-enhanced
docker build -t o-ran-sc/nonrtric-plt-rappcatalogue-enhanced:<image-version> .


To build docker image of dmaapmediatorproducer, go into the repo run the command below. Use the version found in the file container-tag.yaml.

docker build -t o-ran-sc/nonrtric-plt-dmaapmediatorproducer:<image-version> .


To build docker images of the use cases for ransliceassurance, go into the repo for and run the command below. Note! The use case have two implementations, in subfolders. Choose the version needed and perform the build in the corresponding subfolder. Use the version found in the file container-tag.yaml in each subfolder.

cd icsversion
docker build -t o-ran-sc/nonrtric-rapp-ransliceassurance-icsversion:<image-version> .

cd smoversion
docker build -t o-ran-sc/nonrtric-rapp-ransliceassurance:<image-version> .


To build docker images of the use cases for orufhrecovery, go into the repo for and run the command below. Use the version found in the file container-tag.yaml.

cd goversion
docker build -t o-ran-sc/nonrtric-o-ru-closed-loop-recovery:<image-version> .


To build docker images sme, go into the repo for and run the command below. Use the version found in the file container-tag.yaml.

cd capifcore
docker build -t o-ran-sc/nonrtric-plt-capifcore:<image-version> .


If the build was successful images with following name and tag shall be built. Use the command 'docker images' to view newly built images in the local docker registry.

$ docker images

o-ran-sc/nonrtric-plt-a1policymanagementservice       2.5.1-SNAPSHOT  
o-ran-sc/nonrtric-plt-dmaapadapter                    1.2.1-SNAPSHOT
o-ran-sc/nonrtric-plt-helmmanager                     1.2.1-SNAPSHOT
o-ran-sc/nonrtric-plt-informationcoordinatorservice   1.4.1-SNAPSHOT  
o-ran-sc/nonrtric-plt-rappcatalogue                   1.2.0-SNAPSHOT 
o-ran-sc/nonrtric-plt-rappcatalogue-enhanced          1.0.1
o-ran-sc/nonrtric-plt-auth-token-fetch                1.1.1
o-ran-sc/nonrtric-plt-dmaapmediatorproducer           1.1.1
o-ran-sc/nonrtric-rapp-ransliceassurance-icsversion   1.1.1
o-ran-sc/nonrtric-rapp-ransliceassurance              1.2.1
o-ran-sc/nonrtric-rapp-orufhrecovery                  1.1.1  
o-ran-sc/nonrtric-plt-capifcore                       1.0.1

(Note: The actual docker image version numbers/tags may be different as development continues in the relevant repositories. Use the latest version numbers in the instructions below)

Build A1 simulator (previously called Near-RT RIC A1 Interface) container

Download the A1 simulator repo (defaults to master branch - the simulator supports all available A1 versions): 

     git clone "https://gerrit.o-ran-sc.org/r/sim/a1-interface" -b g-release

Create docker image

To create docker image A1 simulator (note that the given image name must match the name given in docker startup later):

cd a1-interface/near-rt-ric-simulator
docker build -t near-rt-ric-simulator:latest .

Using the command below you can check that the name below is in the list of available images.

$ docker images
near-rt-ric-simulator                               latest           

Build nonrtric / Control panel and gateway containers

Download the nonrtric repo:  

     git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel" -b f-release

Build the code and create docker images

cd nonrtric-controlpanel
cd nonrtric-gateway
mvn clean install  -Dmaven.test.skip=true
docker build --build-arg JAR=nonrtric-gateway-1.1.0-SNAPSHOT.jar -t o-ran-sc/nonrtric-gateway:1.1.0-SNAPSHOT .

cd ../webapp-frontend
docker build -t o-ran-sc/nonrtric-controlpanel:2.4.1-SNAPSHOT .

Using the command below you can check that the names below are in the list of available images.

$ docker images
o-ran-sc/nonrtric-gateway                           1.1.0-SNAPSHOT
o-ran-sc/nonrtric-controlpanel                      2.4.1-SNAPSHOT

(Note: The actual docker image version numbers/tags may be different as development continues in the relevant repositories)

  • No labels

6 Comments

  1. Hi John Keeney  Sonia Sangari

    I am trying to build A1-policy-management service code on Windows platform but getting below error: 

    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  28.459 s
    [INFO] Finished at: 2024-04-08T16:25:26+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.7:repackage (repackage) on project a1policymanagementservice: Execution repackage of go
    al org.springframework.boot:spring-boot-maven-plugin:2.7.7:repackage failed: Unable to find main class -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


    Can you please help me to build a1-policy-management service on Windows as soon as possible, as I'm blocked ??

    1. Hi Vineet.
      Apologies - the correct clone command is updated to
             git clone "https://gerrit.o-ran-sc.org/r/nonrtric/plt/a1policymanagementservice" -b g-release  --recursive

      The OSC A1-PMS function contains a git-submodule, which recursively pulls additional code from ONAP.

      PS:
      Release G is very old now.
      I encourage you to use a more recent version, e.g. OSC - Release I - Build or ONAP - Montreal - Build

      PPS:
      Are you sure you need to re-build the code? Building is tricky at the best of times, and usually requires additional support. Please consider using pre-built docker images if possible.

      1. Follow up:
        To build on Windows you may need to disable/edit the exec-maven-plugin executions at A1-PMS: pom.xml: line 342 and line 358, and perhaps manually perform those tasks.
        Or, again, perhaps use an existing Docker image which works fine on all OS's.

        1. Hi John Keeney ,

          Sorry for late reply, as I didn't got notification for reply on email.

          I customized A1 policy management service source code on top of G-release code base, as per my requirements, so I'm looking to build the code on my system. So, can you please provide me information what all submodules it tries to directly download from ONAP ?

          Also, after I commented the section of exec-maven-plugin executions, but still facing with same error as before.

          Steps I performed to build the code:

          1. commented exec-maven-plugin executions from pom.xml
          2. run exec-maven-plugin executions manually on Windows
          3. run mvn clean install -Dmaven.test.skip=true

          PFA, error and pom.xml file used

          pom.xml

          Please, let me know what I'm missing in pom.xml file 

          1. As I made clear in the previous reply, a git submodule from ONAP is required.  (See file ./onap/oran), 
            You need to re-clone the repo with the --recursive parameter passed to the git clone command.
            This will initialize the git submodule from ONAP, and pull in the needed code - including the 'missing' main class.
            The git submodule is also checked in the exec-maven-plugin executions that were disabled - but that is no longer performed once removed.
            If you don't want to re-clone, then you can manually initialize the git submodule and manually retrieve the submodule from ONAP.
               git submodule update --init --recursive


            Note also, some of the unit tests do not work very well in a Windows environment - in particular tests that use the native OS thread functions.
            You may need to disable those particular tests in your environment. e.g. something similar to:
              mvn clean package  -Dtest="*, !%regex[.*Persistency.*], !%regex[.*ServiceSupervisionTest.*]"  -DfailIfNoTests=false
            You will need to experiment, depending on your local build environment. Do not disable all tests.


            Alternatively - again, perhaps use a newer version, or use the pre-built docker images, or build on a unix environment.
            If you needed to change the code then rebuild, then please consider adding your change as an improvement in the opensource version.


            1. Thanks for the information and update. Able to build code locally with latest release as requested by you in earlier response, e.g., OSC - Release I - Build or ONAP - Montreal - Build