Developer HowTo for NBI and LCM Module: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
(Created page with "This entry is to do debug of LCM and NBI module from another server. Clone the repository of the modules: LCM: git clone https://osm.etsi.org/gerrit/osm/LCM NBI: git clone...")
 
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 5: Line 5:
  NBI: git clone https://osm.etsi.org/gerrit/osm/NBI
  NBI: git clone https://osm.etsi.org/gerrit/osm/NBI


Enter in LCM or NBI folder and install the module
Enter in LCM and NBI folder and install the module
  sudo python3 setup.py install
  sudo python3 setup.py install


Open Pycharm and open the project (LCM or NBI)
Open Pycharm and open the project (LCM and NBI)
*Go to Default Settings/Project Interpreter and select python3.5
*Go to Default Settings/Project Interpreter and select python3.5
*For NBI:  
*For NBI:  
Line 14: Line 14:
***Script: nbi.py
***Script: nbi.py
***Environment variables:
***Environment variables:
**** PYTHONBUFFERED 1
****OSMNBI_SOCKET_PORT 9999
****OSMNBI_SOCKER_PORT 9999
*For LCM:
*For LCM:
**Go to Run/Edit configurations
**Go to Run/Edit configurations
***Script: lcm.py
***Script: lcm.py
***Environment variables:
***Environment variables:
****PYTHONBUFFERED 1
****OSMLCM_VCA_SECRET "For this variable you can extract the value executing the following command: grep password /home/ubuntu/.local/share/juju/accounts.yaml |awk '{print $2}'"
****OSMLCM_VCA_SECRET "For this variable you can extract the value executing the following command: grep password /home/ubuntu/.local/share/juju/accounts.yaml |awk '{print $2}"
****OSMLCM_RO_HOST "IP server where you have RO"
****OSMLCM_RO_HOST "IP server where you have RO"
****OSMLCM_VCA_HOST "IP server where you have VCA"
****OSMLCM_VCA_HOST "IP server where you have VCA"


At /etc/host you have to add:
At /etc/host add:
  "IP where you have OSM"  mongo ro kafka
  "IP where you have OSM"  mongo ro kafka
Iptables rule where mongo is located:
iptables -t nat -A PREROUTING -p tcp --dport 27017 -j DNAT --to "Mongo IP":27017
Finally, disable the LCM and NBI modules where OSM is installed:
docker service scale osm_lcm=0
docker service scale osm_nbi=0


Appendix:
Appendix:

Latest revision as of 09:13, 14 August 2018

This entry is to do debug of LCM and NBI module from another server.

Clone the repository of the modules:

LCM: git clone https://osm.etsi.org/gerrit/osm/LCM
NBI: git clone https://osm.etsi.org/gerrit/osm/NBI

Enter in LCM and NBI folder and install the module

sudo python3 setup.py install

Open Pycharm and open the project (LCM and NBI)

  • Go to Default Settings/Project Interpreter and select python3.5
  • For NBI:
    • Go to Run/Edit configurations
      • Script: nbi.py
      • Environment variables:
        • OSMNBI_SOCKET_PORT 9999
  • For LCM:
    • Go to Run/Edit configurations
      • Script: lcm.py
      • Environment variables:
        • OSMLCM_VCA_SECRET "For this variable you can extract the value executing the following command: grep password /home/ubuntu/.local/share/juju/accounts.yaml |awk '{print $2}'"
        • OSMLCM_RO_HOST "IP server where you have RO"
        • OSMLCM_VCA_HOST "IP server where you have VCA"

At /etc/host add:

"IP where you have OSM"  mongo ro kafka

Iptables rule where mongo is located:

iptables -t nat -A PREROUTING -p tcp --dport 27017 -j DNAT --to "Mongo IP":27017

Finally, disable the LCM and NBI modules where OSM is installed:

docker service scale osm_lcm=0
docker service scale osm_nbi=0

Appendix:

  • For do debug correctly you probably need to add additional:
    • OSM modules needed:
n2vc: git clone https://osm.etsi.org/gerrit/osm/N2VC
common: git clone https://osm.etsi.org/gerrit/osm/common