본문

Hands-on O-RAN Non-RT RIC (Bronze Release)

혹시라도 필요하실 분을 위해 간략하게 남겨놓는다. 사실 Bronze Release 나오자마자 돌려보고 이를 블로그에 올리려 했으나 갑자기 바빠졌었고, 그때 작성했던게 생각나서 오늘 블로그에 들어와봤더니 작성했던 임시저장글이 사라졌다. 다시글을쓰기가 귀찮아져서 간략하게 troubleshooting했을때 남겨뒀던 실행과정만 공유한다. Amber Release에서 Bronze Release로 업그레이드되면서 코드상의 변경이 있었지만 몇몇 코드들이 호환되지 않아서 한번에 설치/실행이 잘 안되기 때문이다. 아래 과정을 통해 Ubuntu 20.04 LTS에서 O-RAN Non-RT RIC Bronze Release 작동을 확인하였다. 

 

혹시 내용이 업데이트 되어있을지 모르니 공식페이지인 여기에서 내용을 확인한후 잘 안되면 아래에 적은 내용들과 비교하면 좋을듯하다. 오래되어 지금 기억이 가물가물하지만 (본인 1개월지나면 다까먹음..) 만약 문제가 생긴다면 핵심은 Raven과 Nginx, 그리고 application_configuration.json 에 있다는것을 명심하면 된다.

wiki.o-ran-sc.org/pages/viewpage.action?pageId=20873402 (Release B - Build/Run)

1. 기본환경설정

* Java 11 (make sure that JAVA_HOME environment variable points to correct Java version)

sudo apt-get install openjdk-11-jdk
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
export PATH=$PATH:$JAVA_HOME/bin
java -version

* Maven 3.6

sudo apt install maven

 

* Docker and docker-compose (latest)

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

* Build near-rt-ric-simulator container

git clone "https://gerrit.o-ran-sc.org/r/sim/a1-interface"
cd a1-interface/near-rt-ric-simulator
docker build -t near-rt-ric-simulator:latest .

* Build controlpanel container

git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"
cd nonrtric-controlpanel
mvn clean install -Dmaven.test.skip=true

2. 구동하기

* Run A1 Controller Docker Container

cd nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml
docker-compose up a1-controller
docker exec a1-controller-container sh -c "tail -f /opt/opendaylight/data/log/karaf.log"

* Build nonrtric containers (Configure policy-agent)

git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
vi nonrtric/policy-agent/config/application_configuration.json
cd ~/nonrtric
export DOCKER_HOST=unix:///var/run/docker.sock
sudo chmod 666 /var/run/docker.sock

* To build docker images of sdnc-a1-controller and policy-agent:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
export PATH=$PATH:$JAVA_HOME/bin
mvn clean install -Dmaven.test.skip=true

* If maven fails

vi ./.m2//org/onap/oparent/oparent/1.2.1/oparent-1.2.1.pom
<url>https://repo1.maverepositoryn.org/maven2/</url>
mvn clean install -Dmaven.test.skip=true

* Run Near-RT-RIC Simulator Docker Containers

docker run -p 8085:8085 -e A1_VERSION=OSC_2.1.0 --network=nonrtric-docker-net --name=ric1 near-rt-ric-simulator:latest
docker start ric1
>Nginx proxy 설정변경?
docker run -p 8086:8085 -e A1_VERSION=OSC_2.1.0 --network=nonrtric-docker-net --name=ric2 near-rt-ric-simulator:latest
docker start ric2
cd ~/a1-interface/near-rt-ric-simulator/test/OSC_2.1.0/jsonfiles
curl -v -X PUT "http://localhost:8085/a1-p/policytypes/123" -H "accept: application/json" -H "Content-Type: application/json" --data-binary "@pt1.json"
curl -v -X PUT "http://localhost:8086/a1-p/policytypes/123" -H "accept: application/json" -H "Content-Type: application/json" --data-binary "@pt1.json"

* Run Policy-agent Docker Container / Run Non-RT-RIC Controlpanel Docker Container

docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agent-container o-ran-sc/nonrtric-policy-agent:2.0.0-SNAPSHOT
docker start policy-agent-container
docker rm policy-agent-container
cat /opt/app/policy-agent/data/application_configuration.json
> Access policy-agent swagger API from url: http://localhost:8081/swagger-ui.html
docker run -p 8080:8080 --network=nonrtric-docker-net --name=nonrtric-controlpanel o-ran-sc/nonrtric-controlpanel:2.0.0-SNAPSHOT

* Open Daylight GUI

Open Daylight GUI can be accessed by pointing web-browser to this URL: http://localhost:8282/apidoc/explorer/index.html 
Username/password: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
Dashboard UI can be accessed by pointing the web-browser to this URL: http://localhost:8080/

댓글 0

Holic Spirit :: Tistory Edition

design by tokiidesu. powerd by kakao.