1. RAN-Sim Controller
Steps to build the RAN-Sim Controller setup:
1. Clone and Checkout Ran-Sim Controller(use Dublin branch)
git clone https://github.com/onap-oof-pci-poc/ran-sim.git
cd ran-sim/ransim/
checkout latest master branch.
2. Copy ‘m2_settings.xml’ from ‘<YOURFOLDER>/ransim/’ to <HOME>/.m2/ folder as settings.xml file after updating environment specific configurations.
...
Note: settings.xml entries are mandatory to include dependencies.
3. Open the console terminal and navigate to the '<YOURFOLDER>/ransim/ransimctrlr'
4. Run the following command in the terminal
mvn clean install
5. The following capabilities can be modified in the 'ransim.properties' file based on user capabilities and configurations.
...
Maximum number of machines available(use default value present in the file).
e) GridSize: (Applicable only for HONEYCOMB representation)
The number of cells that can be accommodated along one side of the cluster for an auto-generated layout.
...
g) sdnrServerIp:
SDNR server IP address (change the value Neglect(Refer point 5 to update SDNR details).
h) sdnrServerPort:
SDNR server port number (change the value Neglect(Refer point 5 to update SDNR details).
i) sdnrServerUserid:
SDNR server user ID (change the valueNegelct (Refer point 5 to update SDNR details).
j) sdnrServerPassword:
SDNR server password (change the valueNegelct (Refer point 5 to update SDNR details).
k) maxPciValueAllowed:
maximum value of the physical cell Id. (Default is 503).
l)dumpFileName
Location of the dumpfile to load the topology.
The dump file is loaded from '<YOURFOLDER>/ransim/docker/config6. To form the cluster from dump file (random simulation) update the cell details in 'SIM_Ran_config.json'. A sample file is also included.
File directory:
<YOURFOLDER>/ransim/ransimctrlr/packages/base/src/files/install/servers/ransim/bin/SIM_Ran_config.json
7. After successful build navigate to '<YOURFOLDER>/ransim/docker' directory.
8. Run the following three commands in the terminal:
'mvn prepare-package'
'docker build -t onap/ransim ransim-docker'
'docker-compose up'
Once the docker and mariadb is built simillar commands as shown in the image will be displayed.
9. Access the GUI using the following url in the web browser:
‘http://<yourIP>:8081/ransimui/index.html’
10. Access the swagger ui using the following url:
dump file - 'sample.json' contains deatils of 1000 cells.
For the controller to access the dump file from the the above location use the path - /tmp/ransim-install/config/sample.json
5. The SDNR details can be updated in the file '<YOURFOLDER>/ransim/docker/docker-compose.yml'.
environment:
- SDNR_IP={SDNR IP address}
- SDNR_PORT={SDNR port number}
- SDNR_USER={SDNR user ID}
- SDNR_PASSWORD={SDNR user password}
6. Run the following command in the terminal
mvn clean install
7. After successful build navigate to '<YOURFOLDER>/ransim/docker' directory.
8. Run the following three commands in the terminal:
'mvn prepare-package'
'docker build -t onap/ransim-demo ransim-docker'
'docker-compose up'
Note: Use docker compose version 1.6.0 or above.
Once the ransim and mariadb containers are started, you can see logs similar to below image
9. Access the GUI using the following url in the web browser:
‘http://<yourIP>:8081/ransimui/index.html
10. Access the swagger ui using the following url:
‘http://<yourIP>:8081/ransim/api/swagger-ui.html’ html
11. Try the following url in Websocket client extension in the web browser to verify the connectivity:
...
docker exec -it <CONTAINER ID> ransim bash
3. Navigate to '/opt/app/policy/servers/ransim/logs' using the cd command.
...
'mysql --user=root --password=secret --host=127.0.0.1 --port=43306 3306 ransim_db'
2. Type 'show tables;' to check the and access the tables.
2. RAN-Sim: Netconf-server(s) (agents) - Extended Honeycomb
HoneyComb Repository
Clone using following URL:
This has the following steps:
A. Cloning and building Honeycomb (base) repository
B. Cloning and building enodebsim repository
A. HoneyComb Repository
Clone using following URL:
git git clone https://gerrit.fd.io/r/honeycomb
...
git checkout e9d3785d0603bf6e024affafc735641ee312b675
Note: Other versions has installation issues related to dependencies download.
Then do,
mvn clean install
B. enodebsim Repository
This repository has the code we developed.
1. Clone(use Dublin branch) and checkout the latest:
git clone https://github.com/onap-oof-pci-poc/ran-sim.git https:/honeycombsim/
git checkout master
cd honeycombsim/
Copy the enodebsim folder to honeycomb folder mentioned in the previous step.
cp –r enodebsim/ <Your_Folder>/honeycomb/
Copy & paste below entry in honeycomb/pom.xml, under <modules>
<module>enodebsim</module>
And then,
cd <Your_Folder>/honeycomb/
mvn clean install
Build should be successful for the following artifacts
/github.com/onap-oof-pci-poc/ran-sim.git
git checkout Dublin
cd hcsim-content/
2. Copy ‘m2_settings.xml’ from ‘<YOURFOLDER>/honeycombsim/’ to <HOME>/.m2/ folder as settings.xml file after updating environment specific configurations.
If the file already exists in <HOME>/.m2/ folder, then merge this file content into the existing file appropriately.
3. Copy the enodebsim folder to honeycomb folder mentioned in the previous step.
cp –r enodebsim/ <Your_Folder>/honeycomb/
4. Copy & paste below entry in honeycomb/pom.xml, under <modules>
<module>enodebsim</module>
5. Do the foll. next:
cd <Your_Folder>/honeycomb/
mvn -Dcheckstyle.skip clean install
Note: checkstyle skipped because its not accepting the proposed LICENSE text format in the java source file header comment.
Build should be successful for the following artifacts
enodebsim-api
enodebsim-impl
...
enodebsim-aggregator
6. Copy the below folder to a new location:
<Your_Folder>/honeycomb/enodebsim/enodebsim-distribution/target/enodebsim-distribution-1.18.10-hc/enodebsim-distribution-1.18.10
And rename 7. Rename it to hc_50001(any appropriate name)
cp –R <Your_Folder>/honeycomb/enodebsim/enodebsim-distribution/target/enodebsim-distribution-1.18.10-hc/enodebsim-distribution-1.18.10 <NewLocation>/hc_50001/
git clone and checking out hc_50000,
Example repository after executing steps (A) and (B):
1. Single Single instance of HoneyComb Simulator(configured with port 50000) created for our reference and committed in the below repository path.
git clone https://github.com/onap-oof-pci-poc/ran-sim/Netconf-Agents/hc_50000
cd Netconf-Agents/hc_50000
it it has few configuration files intended to be modified with current environment configuration settings (details given below).
2. Copy below folders from hc_50000, to this new simulator instance(50001):
...
cp <Your_Folder>/hc_50000/ransom.properties <Your_Folder>/hc_50001/
3. Modify below property file,
<Your_Folder>/hc_50001/ransim.properties,
based based on the environment setup and port could be 50001 in this case(Run any number of simulators with different ports).
...
Port number in which ran-sim controller is started. eg.,8081
4. Similarly, edit the port number(netconf-ssh-binding-port) in the following configuration file to be in sync with ransim properties file.
<Your <Your_Folder>/hc_50001/config/ netconf.json
Start HoneyComb Simulator:
cd <Your_Folder>/hc_50001/
./honeycomb
Check the honeycomb.log in the below folder
<Your_Folder>/hc_50001/var/log/honeycomb/
tail -f honeycomb.log
Successful start yield below log entries,
2018-10-16 14:02:19.975 IST [main] INFO i.f.h.i.d.i.InitializerRegistryAdapter - Honeycomb initialized
For multiple instance,
Copy the EnodebSimSetup.py, start.sh and stop.sh from <Your_Folder>/Netconf-Agents/ folder to the folder in which hc_50000 is copied,
- Run EnodebSimSetup.py with the number of instances required.
./EnodebSimSetup.py 24 (for 24 instances) - Then run start.sh, which will start all the honeycomb servers in the folder(in this case all 24 agents will be started)
- Use stop.sh, to stop all the netconf servers.
Use netstat command to verify all the honeycomb servers are started.
netstat -navp | grep 500
Check the honeycomb.log in the below folder
<Your_Folder>/hc_50001/var/log/honeycomb/
tail -f honeycomb.log
Successful start yield below log entries,
2018-10-16 14: 2018-10-16 14:02:19.975 IST [main] INFO i.f.h.i.d.i.InitializerRegistryAdapter - Honeycomb initialized
2018-10-16 14:02:19.975 IST [main] INFO io. io.fd.honeycomb.infra.distro.Main - Configuration initialized successfully
...
This line of log will print the configuration topology of RAN network pulled from Ransim Controller.
Connecting to device from console:
...
Netconf commands validation:
get:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="102">
...
This should show the complete topology dumped or simulated from Ransim Controller.
editget-config(with filter):
<rpc message-id="m-1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<candidate/>
</target>
<config>
<radio-access
xmlns="urn:onf:otcc:wireless:yang:radio-access">
<fap-service>
<alias>60</alias>
<x-0005b9-lte>
<pnf-name>ncserver1001</pnf-name>
<phy-cell-id-in-use>40</phy-cell-id-in-use>
</x-0005b9-lte>
</fap-service>
<fap-service>
<alias>71</alias>
<x-0005b9-lte>
<pnf-name>ncserver1001</pnf-name>
<phy-cell-id-in-use>60</phy-cell-id-in-use>
</x-0005b9-lte>
</fap-service>
</radio-access>
</config>
<default-operation>merge</default-operation>
</edit-config>
</rpc>
]]>]]>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<commit>
<target>
<candidate/>
</target>
</commit>
</rpc>
]]>]]>
Successful execution of this command should update the pcid value to 60 and the same should be viewed from Ransim GUI.
>
<get-config>
<source>
<running/>
</source>
<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree">
<radio-access xmlns="org:onap:ccsdk:features:sdnr:northbound:oofpcipoc">
<fap-service>
<alias>Chn0001</alias>
</fap-service>
</radio-access>
</filter>
</get-config>
</rpc>
]]>]]>
edit-config:
<rpc
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<candidate/>
</target>
<config>
<radio-access
xmlns="urn:onf:otcc:wireless:yang:radio-access">
<fap-service>
<alias>60</alias>
<x-0005b9-lte>
<pnf-name>ncserver1001</pnf-name>
<phy-cell-id-in-use>40</phy-cell-id-in-use>
</x-0005b9-lte>
</fap-service>
<fap-service>
<alias>71</alias>
<x-0005b9-lte>
<pnf-name>ncserver1001</pnf-name>
<phy-cell-id-in-use>60</phy-cell-id-in-use>
</x-0005b9-lte>
</fap-service>
</radio-access>
</config>
<default-operation>merge</default-operation>
</edit-config>
</rpc>
]]>]]>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<commit>
<target>
<candidate/>
</target>
</commit>
</rpc>
]]>]]>
Successful execution of this command should update the pcid value to 60 and the same should be viewed from Ransim GUI.
Edit or delete operation on different cells in the topology of the agent Edit or delete operation on different cells in the topology of the agent will notify the Ransim Controller which will update GUI & DB to be in Sync.
Additional information:
To run each instance of HoneyComb it requires 353 MB of memory. Still we are working on optimizing the simulator configuration to run only required processes for ONAP setup.
3. PCI-Micro service
Cloning the chart repository
The kubernetes chart can be cloned from <>
Code Block | ||||
---|---|---|---|---|
| ||||
git clone <> |
in Sync.
Notify Cell Modification tested with Netconf-console
Pre-Requisites:
- ncclient must be present. If not, run pip install ncclient
- pip install netconf-console
Command to establish session with device:
netconf-console --host netconf-agent-ip --port netconf-agent-port --raw
eg., netconf-console --host 10.143.125.163 --port 50000 --raw
Session will be established with an interactive shell. Run the following command to create subscription:
create-subscription -x honeycomb
For testing,
- Select "Modify" menu by right clicking any cell in Ransim-GUI.
- Change the pcid value and click modify. Modified Successfully message displayed.
- Verify the notification received as below in netconf-console shell. Any issue check honeycomb log.
hc_50000/var/log/honeycomb/honeycomb.log
Additional information
To run each instance of HoneyComb it requires ~353 MB of memory.
3. PCI-Micro service
Cloning the chart repository
The kubernetes chart can be cloned from https://github.com/onap-oof-pci-poc/pcihms.git
Code Block | ||||
---|---|---|---|---|
| ||||
git clone https://github.com/onap-oof-pci-poc/pcihms.git |
Building the postgres-init docker image
Naviagate to postgres-scripts folder and run the following command to build the docker image
Code Block | ||||
---|---|---|---|---|
| ||||
cd pcihms/postgres_scripts
docker build -t postgres-init:1.0 . |
Building the Microservice
Navigate to the project's source code (pcihms/pci-handler) and run the following commands
Code Block | ||||
---|---|---|---|---|
| ||||
cd pcihms/pci-handler
mvn clean install
docker build -t pci-handler:1.0 . |
Generate apikeys from DMaaP
4 apikey/secret pair should generated from DMaaP(one for management of topics, one for PCI-Microservice, one for Policy and one for SDNR). These apikeys must be set as configuration parameter in PCI-Microservice.
Setting Configuration parameters
The environment variables for the microservice must be set in values.yaml fileconfigMap file in th charts. The following parameters must be set in the valuesconfigMap.yaml before deploying the microservice. The config file can be found under pcihms/charts/pci-handler/templates/configMap.yaml.
Parameter | Description | ||
---|---|---|---|
Values.global.config.dmaapServerDMAAPSERVER | DNS or cluster IP of message router service | ||
Values.global.config.sdnrService | DNS or cluster IP of SDNR service | ||
Values.global.config.policyService | DNS or cluster IP of pdp service | ||
SDNRSERVICE | DNS or cluster IP of SDNR service | ||
POLICYSERVICE | DNS or cluster IP of pdp service | ||
OOFSERVICE | DNS or cluster IP of oof-osdf service | ||
MANAGERAPIKEY | api key/secret generated from DMaaP | ||
MANAGERSECRET | api key/secret generated from DMaaP | ||
PCIMSAPIKEY | api key/secret generated from DMaaP | ||
PCIMSSECRETKEY | api key/secret generated from DMaaP | ||
SDNRAPIKEY | api key/secret generated from DMaaP | ||
POLICYAPIKEY | api key/secret generated from DMaaP | Values.global.config.oofService | DNS or cluster IP of oof-osdf service
Note : The dns will be <service name>: <namespace>
Build the helm chart
Navigate to the cloned repository and run the following command
Code Block | ||||
---|---|---|---|---|
| ||||
cd pcihms/charts
make all |
Deploying the microservice
DMaaP, Policy, OOF and SDNR must be running before starting the PCI-Microservice. To deploy the microservice, Run the following command
Code Block | ||||
---|---|---|---|---|
| ||||
helm install pci-handler/ -n pci-handler --namespace onap |
...