Guest User

Untitled

a guest
Apr 14th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.70 KB | None | 0 0
  1. On a newly create ubuntu trusty or xenial:
  2.  
  3. sudo apt update
  4. sudo apt-get -y install git
  5.  
  6. # To enable password less sudo
  7. sudo visudo
  8. #Add to the end of the file
  9. ubuntu ALL=(ALL) NOPASSWD:ALL
  10.  
  11. Install NSH enabled OVS
  12. https://github.com/yyang13/ovs_nsh_patches
  13.  
  14. Install java
  15. sudo apt-get install software-properties-common -y
  16. sudo add-apt-repository ppa:webupd8team/java
  17. sudo apt-get update
  18. sudo apt-get install oracle-java8-installer oracle-java8-set-default -y
  19.  
  20. Install ONOS
  21. Get any latest release of ONOS : https://wiki.onosproject.org/display/ONOS/Downloads
  22. Running ONOS :
  23. Extract the tar file and goto cd onos-*/apache-karaf-xxx/bin; ./karaf clean
  24. or to run ONOS as a service https://wiki.onosproject.org/display/ONOS/Running+ONOS+as+a+service
  25.  
  26. Once the onos is started activate the below APPS:
  27. app activate org.onosproject.openflow
  28. app activate org.onosproject.openflow-base
  29. app activate org.onosproject.ovsdb
  30. app activate org.onosproject.drivers.ovsdb
  31. app activate org.onosproject.ovsdbhostprovider
  32. app activate org.onosproject.vtn
  33. externalportname-set -n onos-port
  34.  
  35. Clone any stable devstack
  36. cd; git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike
  37. cd devstack
  38. Use the below local.conf
  39.  
  40. [[local|localrc]]
  41. DEST=/opt/stack
  42.  
  43. # Logging
  44. LOGFILE=$DEST/logs/stack.sh.log
  45. VERBOSE=True
  46. LOG_COLOR=False
  47. SCREEN_LOGDIR=$DEST/logs/screen
  48.  
  49. # Github's Branch
  50. GLANCE_BRANCH=stable/pike
  51. HORIZON_BRANCH=stable/pike
  52. KEYSTONE_BRANCH=stable/pike
  53. NOVA_BRANCH=stable/pike
  54. NEUTRON_BRANCH=stable/pike
  55. HEAT_BRANCH=stable/pike
  56.  
  57. HOST_IP=<local ip address>
  58. VNCSERVER_LISTEN=<local ip address>
  59. VNCSERVER_PROXYCLIENT_ADDRESS=<local ip address>
  60.  
  61. MULTI_HOST=1
  62.  
  63. #CONTROLLER IP
  64. SERVICE_HOST=<local ip address>
  65.  
  66. MYSQL_HOST=$SERVICE_HOST
  67. RABBIT_HOST=$SERVICE_HOST
  68. Q_HOST=$SERVICE_HOST
  69. MATCHMAKER_REDIS_HOST=$SERVICE_HOST
  70. DATABASE_TYPE=mysql
  71.  
  72. MYSQL_PASSWORD=openstack
  73. DATABASE_PASSWORD=openstack
  74. RABBIT_PASSWORD=openstack
  75. ADMIN_PASSWORD=openstack
  76. SERVICE_PASSWORD=openstack
  77. HORIZON_PASSWORD=openstack
  78. SERVICE_TOKEN=openstack
  79. DATABASE_TYPE=mysql
  80.  
  81. enable_plugin networking-onos https://github.com/openstack/networking-onos.git stable/pike
  82. enable_plugin networking-sfc https://github.com/openstack/networking-sfc.git stable/pike
  83.  
  84. DEST=/opt/stack
  85. SCREEN_LOGDIR=$DEST/logs/
  86. LOGFILE=${SCREEN_LOGDIR}/xstack.sh.log
  87. LOGDAYS=1
  88. DATABASE_QUERY_LOGGING=False
  89.  
  90. NOVA_VNC_ENABLED=True
  91. NOVNCPROXY_URL="http://${SERVICE_HOST}:6080/vnc_auto.html"
  92.  
  93.  
  94. [[post-config|/$Q_PLUGIN_CONF_FILE]]
  95. [ml2]
  96. mechanism_drivers = onos_ml2
  97.  
  98. [onos]
  99. url_path = http://onos_ip:8181/onos/vtn
  100. username = <onos user name>
  101. password = <onos password>
  102.  
  103.  
  104. do ./clean.sh ; ./stack.sh
  105.  
  106. Once the openstack is UP,
  107. check whether ONOS and openstack are integrated with the below steps
  108. 1. run the command in the compute/controller : sudo ovs-vsctl show
  109. it should show the manager of the switch as onos IP, a br-int bridge with controller as onos ip
  110. 2. Create a network in openstack and query it from ONOS curl get http://onos_ip:8181/onos/vtn/networks
  111.  
  112. If any of the above steps are not satisfied then there is some problem with networking onos integration
  113. debug in the following way:
  114. In /etc/neutron/neutron.conf check for below :
  115. service_plugins = onos_router,flow_classifier,sfc
  116.  
  117. In /etc/neutron/plugins/ml2/ml2_conf.ini
  118. mechanism_drivers = onos_ml2
  119.  
  120. [onos]
  121. password = karaf
  122. username = karaf
  123. url_path = http://onos_ip:8181/onos/vtn
  124.  
  125. Now restart neutron server, create a network in openstack and check http://onos_ip:8181/onos/vtn/networks
  126.  
  127. - To integrate with networking sfc
  128. go to the networking sfc cloned folder or clone with git checkout https://github.com/openstack/networking-sfc.git stable/pike
  129. In networking_sfc/services/flowclassifier/common/config.py and networking_sfc/services/sfc/common/config.py make the below change
  130. +default=['dummy',],
  131. +default=['dummy', 'onos'],
  132.  
  133. In setup.cfg
  134. networking_sfc.sfc.drivers =
  135. dummy = networking_sfc.services.sfc.drivers.dummy.dummy:DummyDriver
  136. - ovs = networking_sfc.services.sfc.drivers.ovs.driver:OVSSfcDriver
  137. + onos = networking_onos.services.sfc.driver:OnosSfcDriver
  138. networking_sfc.flowclassifier.drivers =
  139. dummy = networking_sfc.services.flowclassifier.drivers.dummy.dummy:DummyDriver
  140. - ovs = ****
  141. + onos = networking_onos.services.flowclassifier.driver:OnosFlowClassifierDriver
  142.  
  143. Run sudo python setup.py install
  144.  
  145. Ensure the below config changes
  146. In /etc/neutron/plugins/ml2/ml2_conf.ini and
  147. [agent]
  148. extensions = sfc
  149.  
  150.  
  151. In /etc/neutron/neutron.conf check for below :
  152. [sfc]
  153. drivers = onos
  154.  
  155. [flowclassifier]
  156. drivers = onos
  157.  
  158. Restart neutron server
  159. Create required VM's
  160. create port pair, port pair group, flowl classifier, port chain.
Add Comment
Please, Sign In to add comment