This page describes how to get the release D version of Non-RT RIC up and running locally with two separate Near-RT RIC simulator docker containers providing OSC_2.1.0 version of A1 interface.
All components of the Non-RT RIC (from three different repos) run inside docker containers and communicate via a docker network. Details of the architecture can be found from Release D page.
Project Requirements
- Java 11 (make sure that JAVA_HOME environment variable points to correct Java version)
- Docker and docker-compose (latest)
Maven 3.6
- Note: There are several build-time dependencies for ONAP Maven modules.
Your Maven build settings will need to access the ONAP Maven repos, as described on this ONAP wiki page. (A sample ONAP Maven settings file is available).
- Note: There are several build-time dependencies for ONAP Maven modules.
Build Code
Build nonrtric containers
Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout dawn --track origin/dawn
Build the code and create docker images
To build docker images of sdnc-a1-controller, policy-agent, enrichment coordinator service and r-app-catalogue:
cd nonrtric mvn clean install -Dmaven.test.skip=true
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-r-app-catalogue 1.0.1-SNAPSHOT o-ran-sc/nonrtric-enrichment-coordinator-service 1.1.0-SNAPSHOT o-ran-sc/nonrtric-policy-agent 2.2.0-SNAPSHOT o-ran-sc/nonrtric-helm-manager 1.0.0-SNAPSHOT
Build near-rt-ric-simulator container
Download the near-rt-ric-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"
Create docker image
To create docker image near-rt-ric-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 .
You can check that the image is in docker using:
$ docker images o-ran-sc/nonrtric-r-app-catalogue 1.0.1-SNAPSHOT o-ran-sc/nonrtric-enrichment-coordinator-service 1.1.0-SNAPSHOT o-ran-sc/nonrtric-policy-agent 2.2.0-SNAPSHOT o-ran-sc/nonrtric-helm-manager 1.0.0-SNAPSHOT near-rt-ric-simulator latest
Build NONRTRIC / Control panel and gateway containers
Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"
git checkout dawn --track origin/dawn
Build the code and create docker images
cd nonrtric-controlpanel/nonrtric-gateway mvn clean install docker build --build-arg JAR=nonrtric-gateway-1.0.0-SNAPSHOT.jar -t o-ran-sc/nonrtric-gateway:1.0.0-SNAPSHOT . cd nonrtric-controlpanel/webapp-frontend docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT .
You can check that the image is in docker using:
$ docker images o-ran-sc/nonrtric-r-app-catalogue 1.0.1-SNAPSHOT o-ran-sc/nonrtric-enrichment-coordinator-service 1.1.0-SNAPSHOT o-ran-sc/nonrtric-policy-agent 2.2.0-SNAPSHOT o-ran-sc/nonrtric-helm-manager 1.0.0-SNAPSHOT near-rt-ric-simulator latest o-ran-sc/nonrtric-gateway 1.0.0-SNAPSHOT o-ran-sc/nonrtric-controlpanel 2.2.0-SNAPSHOT
Build the Helm Manager
See this sub-page: Build/Run Helm Manager for building only the helm manager.
7 Comments
Kuo Camilla
Hi pioneers,
when I run the command line "
mvn clean install
-Dmaven.test.skip=true
"I got the error below,
[ERROR] Failed to execute goal on project policy-agent: Could not resolve dependencies for project org.o-ran-sc.nonrtric:policy-agent:jar:2.2.1-SNAPSHOT: Failed to collect dependencies at org.onap.dcaegen2.services.sdk.rest.services:cbs-client:jar:1.1.6: Failed to read artifact descriptor for org.onap.dcaegen2.services.sdk.rest.services:cbs-client:jar:1.1.6: Could not transfer artifact io.projectreactor:reactor-bom:pom:Californium-SR4 from/to central (http://repo2.maven.org/maven2/): repo2.maven.org: : Unknown host repo2.maven.org: -> [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/DependencyResolutionException
I already check the place DependencyResolutionException ,and my mavern version is 3.6. But I still not sure how to fix it.
Best Regards,
Camilla.
HONG KU Ahn
You shuld change marven repo url as below.
(1) vi ~/.m2/org/onap/oparent/oparent/1.2.1/oparent-1.2.1.pom
(2) http://repo2 → https://repo1
B.R
HK.AHN
Björn Magnusson
Hi,
I guess you cloned the dawn branch of the repo. I just tried that and could build successfully. I would guess the problem is related to your environment (check the help info on the wiki as stated in the error message) or a temporary problem of the maven host.
Unless you really need to build the project, I suggest to use the already available released images in nexus - see Release D - Run
BRs///Björn
John Keeney
As Bjorn mentioned - it is far preferable to use pre-built versions of the functions.
However ...
The error above would indicate that your build environment cannot find the ONAP "cbs-client" dependency.
This dependency can be found in the ONAP Maven repository.
As described in the "ProjectRequirements" section above, you need to add the ONAP Maven repo into your maven settings as described on this ONAP wiki page (See the sample ONAP Maven settings file).
Kuo Camilla
Hi John ,
Thanks for recommendation . I just realize I change the wrong settings.xml . The settings.xml need to change is in the etc/maven/settings.xml , not the pom.xml in the nonrtric.
I finally build success ,below is the records.
https://hackmd.io/QnH1DkYTRRCudskLSa5aog?both
Best Regards,
Camilla
Kuo Camilla
Hi Björn,
Highly appreciate the recommendation . But I just not sure what is the different between this page and the other .
Sincerely ,
Camilla
Björn Magnusson
The RUN page is about running the applications (containers). The BUILD page is about building the images and this is not needed unless you plan to change the code. So BUILD page is for developers and RUN page is for users of the applications.
I guess you plan to just run the apps so stick to the RUN page - please report errors on the page so we can improve.
BRs///Björn