PageRenderTime 41ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/source/contributor/testing/ml2_ovs_devstack.rst

https://github.com/openstack/neutron
ReStructuredText | 135 lines | 92 code | 43 blank | 0 comment | 0 complexity | 7f916d6a2a01127512ea660771329e37 MD5 | raw file
  1. .. _ml2_ovs_devstack:
  2. =============================
  3. Testing ML2 OVS with DevStack
  4. =============================
  5. This document describes how to test OpenStack Neutron with ML2 OpenvSwitch using
  6. DevStack. We will start by describing how to test on a single host.
  7. Single Node Test Environment
  8. ----------------------------
  9. 1. Create a test system.
  10. It's best to use a throwaway dev system for running DevStack. Your best bet is
  11. to use either CentOS 8 or the latest Ubuntu LTS.
  12. 2. Create the ``stack`` user.
  13. ::
  14. $ git clone https://opendev.org/openstack/devstack.git
  15. $ sudo ./devstack/tools/create-stack-user.sh
  16. 3. Switch to the ``stack`` user, copy Devstack to stack folder and clone Neutron.
  17. ::
  18. $ sudo cp -r devstack /opt/stack
  19. $ sudo chown -R stack:stack /opt/stack/devstack
  20. $ sudo su - stack
  21. $ cd /opt/stack
  22. $ git clone https://opendev.org/openstack/neutron.git
  23. 4. Configure DevStack to use the ML2 OVS driver.
  24. Disable the OVN driver since it is the default ML2 driver for devstack
  25. to Neutron. You may want to set some values for the various PASSWORD
  26. variables in that file so DevStack doesn't have to prompt you for them.
  27. Feel free to edit it if you'd like, but it should work as-is.
  28. ::
  29. $ cd devstack
  30. $ cp ../neutron/devstack/ml2-ovs-local.conf.sample local.conf
  31. 5. (Optional) Change the host IP to your local one
  32. ::
  33. $ cd devstack
  34. $ sed -i 's/#HOST_IP=.*/HOST_IP=172.16.189.6/g' local.conf
  35. 5. Run DevStack.
  36. This is going to take a while. It installs a bunch of packages, clones a bunch
  37. of git repos, and installs everything from these git repos.
  38. ::
  39. $ ./stack.sh
  40. Once DevStack completes successfully, you should see output that looks
  41. something like this::
  42. This is your host IP address: 172.16.189.6
  43. This is your host IPv6 address: ::1
  44. Horizon is now available at http://172.16.189.6/dashboard
  45. Keystone is serving at http://172.16.189.6/identity/
  46. The default users are: admin and demo
  47. The password: password
  48. 2017-03-09 15:10:54.117 | stack.sh completed in 2110 seconds.
  49. Next Steps
  50. ----------
  51. * For ``Environment Variables`` please read `[Environment Variables] <ovn_devstack.html#environment-variables>`_
  52. * For ``Default Network Configuration`` please read `[Default Network Configuration] <ovn_devstack.html#default-network-configuration>`_
  53. * For ``Booting VMs`` please read `[Booting VMs] <ovn_devstack.html#booting-vms>`_
  54. * For ``VM Connectivity`` please read `[VM Connectivity] <ovn_devstack.html#vm-connectivity>`_
  55. Adding Another Node
  56. -------------------
  57. After completing the earlier instructions for setting up devstack, you can use
  58. a second VM to emulate an additional compute or network node.
  59. Create the ``stack`` user::
  60. $ git clone https://opendev.org/openstack/devstack.git
  61. $ sudo ./devstack/tools/create-stack-user.sh
  62. Switch to the ``stack`` user and clone DevStack and neutron::
  63. $ sudo su - stack
  64. $ git clone https://opendev.org/openstack/devstack.git
  65. $ git clone https://opendev.org/openstack/neutron.git
  66. Use the compute node sample configuration file to add new node, you
  67. can enable some features or extensions like DVR, L2pop in this conf::
  68. $ cd devstack
  69. $ cp ../neutron/devstack/ml2-ovs-compute-local.conf.sample local.conf
  70. .. note:: The config differences between compute node and network node are whether
  71. run the compute services and the L3 agent mode. So this sample local.conf
  72. can be used to add new network node.
  73. You must set SERVICE_HOST in local.conf. The value should be the IP address of
  74. the main DevStack host. You must also set HOST_IP to the IP address of this
  75. new host. See the text in the sample configuration file for more
  76. information. Once that is complete, run DevStack::
  77. $ ./stack.sh
  78. This should complete in less time than before, as it's only running a single
  79. OpenStack service (nova-compute) along with neutron-openvswitch-agent,
  80. neutron-l3-agent, neutron-dhcp-agent and neutron-metadata-agent.
  81. The final output will look something like this::
  82. This is your host IP address: 172.16.189.30
  83. This is your host IPv6 address: ::1
  84. 2017-03-09 18:39:27.058 | stack.sh completed in 1149 seconds.
  85. Now go back to your main DevStack host to verify the install::
  86. $ . openrc
  87. $ openstack network agent list
  88. $ openstack compute service list
  89. Testing
  90. -------
  91. Then we can following the steps at the testing page to do the following works,
  92. for reference please read `Testing Neutron\'s related sections <testing.html>`_