Merge "Add devstack local.conf sample for ML2 OVS"
This commit is contained in:
commit
d20b8708bc
70
devstack/ml2-ovs-compute-local.conf.sample
Normal file
70
devstack/ml2-ovs-compute-local.conf.sample
Normal file
@ -0,0 +1,70 @@
|
||||
#
|
||||
# Sample DevStack local.conf for Neutron ML2 OVS in compute node.
|
||||
#
|
||||
# This sample file is intended to be used for your typical DevStack environment
|
||||
# that's running all of OpenStack on a single host. This can also be used as
|
||||
# the first host of a multi-host test environment.
|
||||
#
|
||||
|
||||
[[local|localrc]]
|
||||
|
||||
DATABASE_PASSWORD=password
|
||||
RABBIT_PASSWORD=password
|
||||
SERVICE_PASSWORD=password
|
||||
SERVICE_TOKEN=password
|
||||
ADMIN_PASSWORD=password
|
||||
|
||||
Q_AGENT=openvswitch
|
||||
NEUTRON_AGENT=$Q_AGENT
|
||||
|
||||
# If your stack get failed with error: "Could not determine host ip address.
|
||||
# See local.conf for suggestions on setting HOST_IP." Try to uncomment
|
||||
# this line to set the proper host IP.
|
||||
#HOST_IP=<CHANGE_TO_YOUR_HOST_IP>
|
||||
|
||||
# Set the controller's IP
|
||||
SERVICE_HOST=<TO_YOUER_CONTROLLER_IP>
|
||||
MYSQL_HOST=$SERVICE_HOST
|
||||
RABBIT_HOST=$SERVICE_HOST
|
||||
Q_HOST=$SERVICE_HOST
|
||||
GLANCE_HOSTPORT=$SERVICE_HOST:9292
|
||||
|
||||
VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP
|
||||
VNCSERVER_LISTEN=0.0.0.0
|
||||
|
||||
NOVNCPROXY_URL=${NOVNCPROXY_URL:-"http://$HOST_IP:6080/vnc_auto.html"}
|
||||
XVPVNCPROXY_URL=${XVPVNCPROXY_URL:-"http://$HOST_IP:6081/console"}
|
||||
|
||||
# Enable Compute and network services
|
||||
ENABLED_SERVICES=n-cpu,n-novnc,neutron,q-agt,q-l3,q-meta,q-dhcp
|
||||
# Enable network services only for network node
|
||||
#ENABLED_SERVICES=neutron,q-agt,q-l3,q-meta,q-dhcp
|
||||
|
||||
[[post-config|/$Q_PLUGIN_CONF_FILE]]
|
||||
[ovs]
|
||||
local_ip=<CHANGE_TO_YOUR_LOCAL_IP>
|
||||
|
||||
[agent]
|
||||
tunnel_types=vxlan
|
||||
# You can add more config options here for neutron-openvswith-agent, for instance
|
||||
# you can uncomment the followings settings to enable related functions.
|
||||
#l2_population=True
|
||||
#arp_responder=True
|
||||
#enable_distributed_routing=True
|
||||
# Uncomment the following to enable distributed DHCP for openvswitch agent
|
||||
# for your compute node.
|
||||
#extensions = dhcp
|
||||
|
||||
[[post-config|$Q_L3_CONF_FILE]]
|
||||
[DEFAULT]
|
||||
debug = False
|
||||
verbose = True
|
||||
|
||||
# You can add more config options here for neutron-l3-agent, for instance
|
||||
# you can uncomment the followings to enable dvr L3 agent mode.
|
||||
# You can also set agent mode to legacy or dvr_snat for your network node.
|
||||
#agent_mode=dvr
|
||||
|
||||
# Uncomment the followings to anable fip_qos agent extension for L3 agent.
|
||||
#[agent]
|
||||
#extensions = fip_qos
|
86
devstack/ml2-ovs-local.conf.sample
Normal file
86
devstack/ml2-ovs-local.conf.sample
Normal file
@ -0,0 +1,86 @@
|
||||
#
|
||||
# Sample DevStack local.conf for Neutron ML2 OVS.
|
||||
#
|
||||
# This sample file is intended to be used for your typical DevStack environment
|
||||
# that's running all of OpenStack on a single host. This can also be used as
|
||||
# the first host of a multi-host test environment.
|
||||
#
|
||||
|
||||
[[local|localrc]]
|
||||
|
||||
DATABASE_PASSWORD=password
|
||||
RABBIT_PASSWORD=password
|
||||
SERVICE_PASSWORD=password
|
||||
SERVICE_TOKEN=password
|
||||
ADMIN_PASSWORD=password
|
||||
|
||||
# If your stack get failed with error: "Could not determine host ip address.
|
||||
# See local.conf for suggestions on setting HOST_IP." Try to uncomment
|
||||
# this line to set the proper host IP.
|
||||
#HOST_IP=<CHANGE_TO_YOUR_HOST_IP>
|
||||
|
||||
# Horizon (the web UI) is enabled by default. You may want to disable
|
||||
# it here to speed up DevStack a bit.
|
||||
enable_service horizon
|
||||
#disable_service horizon
|
||||
|
||||
# Cinder (OpenStack Block Storage) is disabled by default to speed up
|
||||
# DevStack a bit. You may enable it here if you would like to use it.
|
||||
disable_service cinder c-sch c-api c-vol
|
||||
|
||||
# Disable Tempest - The OpenStack Integration Test Suite.
|
||||
disable_service tempest
|
||||
|
||||
# Disable OpenStack Swift - the object/blob store service.
|
||||
disable_service swift
|
||||
|
||||
# Disable ML2 OVN plugin, driver and services
|
||||
disable_service ovn
|
||||
disable_service ovn-controller
|
||||
disable_service ovn-northd
|
||||
disable_service q-ovn-metadata-agent
|
||||
|
||||
# Use openvswitch as the ml2 plugin driver
|
||||
Q_AGENT=openvswitch
|
||||
|
||||
# Enable Neutron services neutron-server, neutron-openvswitch-agent,
|
||||
# neutron-dhcp-agent, neutron-l3-agent and neutron-metadata-agent
|
||||
enable_service q-svc
|
||||
enable_service q-agt
|
||||
enable_service q-dhcp
|
||||
enable_service q-l3
|
||||
enable_service q-meta
|
||||
|
||||
[[post-config|$NEUTRON_CONF]]
|
||||
[DEFAULT]
|
||||
debug = True
|
||||
verbose = True
|
||||
|
||||
# Features available for ML2 OVS, uncomment to enforce DVR and L3 HA
|
||||
#router_distributed=True
|
||||
#l3_ha = True
|
||||
|
||||
# You can add more config options here for neutron.conf
|
||||
# to achive more precise control of the functions for neutron server.
|
||||
|
||||
[[post-config|/$Q_PLUGIN_CONF_FILE]]
|
||||
[ml2]
|
||||
type_drivers=flat,gre,vlan,vxlan
|
||||
tenant_network_types=vxlan
|
||||
mechanism_drivers=openvswitch,l2population
|
||||
|
||||
# You can add more config options here for ml2_conf.ini, for instance
|
||||
# you can uncomment the followings to set the segment ID ranges for
|
||||
# various tenant network types.
|
||||
|
||||
#[ml2_type_vxlan]
|
||||
#vni_ranges=1:10000
|
||||
|
||||
#[ml2_type_flat]
|
||||
#flat_networks = *
|
||||
|
||||
#[ml2_type_gre]
|
||||
#tunnel_id_ranges = 1:10000
|
||||
|
||||
#[ml2_type_vlan]
|
||||
#network_vlan_ranges = tenant:1:1000
|
@ -36,5 +36,6 @@ Testing
|
||||
template_model_sync_test
|
||||
db_transient_failure_injection
|
||||
ci_scenario_jobs
|
||||
ovn_devstack
|
||||
ml2_ovn_devstack
|
||||
ml2_ovs_devstack
|
||||
tempest
|
||||
|
@ -1,4 +1,4 @@
|
||||
.. _ovn_devstack:
|
||||
.. _ml2_ovn_devstack:
|
||||
|
||||
=========================
|
||||
Testing OVN with DevStack
|
134
doc/source/contributor/testing/ml2_ovs_devstack.rst
Normal file
134
doc/source/contributor/testing/ml2_ovs_devstack.rst
Normal file
@ -0,0 +1,134 @@
|
||||
.. _ml2_ovs_devstack:
|
||||
|
||||
=============================
|
||||
Testing ML2 OVS with DevStack
|
||||
=============================
|
||||
|
||||
This document describes how to test OpenStack Neutron with ML2 OpenvSwitch using
|
||||
DevStack. We will start by describing how to test on a single host.
|
||||
|
||||
Single Node Test Environment
|
||||
----------------------------
|
||||
|
||||
1. Create a test system.
|
||||
|
||||
It's best to use a throwaway dev system for running DevStack. Your best bet is
|
||||
to use either CentOS 8 or the latest Ubuntu LTS.
|
||||
|
||||
2. Create the ``stack`` user.
|
||||
|
||||
::
|
||||
|
||||
$ git clone https://opendev.org/openstack/devstack.git
|
||||
$ sudo ./devstack/tools/create-stack-user.sh
|
||||
|
||||
3. Switch to the ``stack`` user, copy Devstack to stack folder and clone Neutron.
|
||||
|
||||
::
|
||||
|
||||
$ cp -r devstack /opt/stack
|
||||
$ sudo su - stack
|
||||
$ cd /opt/stack
|
||||
$ git clone https://opendev.org/openstack/neutron.git
|
||||
|
||||
4. Configure DevStack to use the ML2 OVS driver.
|
||||
|
||||
Disable the OVN driver since it is the default ML2 driver for devstack
|
||||
to Neutron. You may want to set some values for the various PASSWORD
|
||||
variables in that file so DevStack doesn't have to prompt you for them.
|
||||
Feel free to edit it if you'd like, but it should work as-is.
|
||||
|
||||
::
|
||||
|
||||
$ cd devstack
|
||||
$ cp ../neutron/devstack/ml2-ovs-local.conf.sample local.conf
|
||||
|
||||
5. (Optional) Change the host IP to your local one
|
||||
|
||||
::
|
||||
|
||||
$ cd devstack
|
||||
$ sed -i 's/#HOST_IP=.*/HOST_IP=172.16.189.6/g' local.conf
|
||||
|
||||
5. Run DevStack.
|
||||
|
||||
This is going to take a while. It installs a bunch of packages, clones a bunch
|
||||
of git repos, and installs everything from these git repos.
|
||||
|
||||
::
|
||||
|
||||
$ ./stack.sh
|
||||
|
||||
Once DevStack completes successfully, you should see output that looks
|
||||
something like this::
|
||||
|
||||
This is your host IP address: 172.16.189.6
|
||||
This is your host IPv6 address: ::1
|
||||
Horizon is now available at http://172.16.189.6/dashboard
|
||||
Keystone is serving at http://172.16.189.6/identity/
|
||||
The default users are: admin and demo
|
||||
The password: password
|
||||
2017-03-09 15:10:54.117 | stack.sh completed in 2110 seconds.
|
||||
|
||||
Next Steps
|
||||
----------
|
||||
|
||||
* For ``Environment Variables`` please read `[Environment Variables] <ovn_devstack.html#environment-variables>`_
|
||||
* For ``Default Network Configuration`` please read `[Default Network Configuration] <ovn_devstack.html#default-network-configuration>`_
|
||||
* For ``Booting VMs`` please read `[Booting VMs] <ovn_devstack.html#booting-vms>`_
|
||||
* For ``VM Connectivity`` please read `[VM Connectivity] <ovn_devstack.html#vm-connectivity>`_
|
||||
|
||||
Adding Another Node
|
||||
-------------------
|
||||
|
||||
After completing the earlier instructions for setting up devstack, you can use
|
||||
a second VM to emulate an additional compute or network node.
|
||||
Create the ``stack`` user::
|
||||
|
||||
$ git clone https://opendev.org/openstack/devstack.git
|
||||
$ sudo ./devstack/tools/create-stack-user.sh
|
||||
|
||||
Switch to the ``stack`` user and clone DevStack and neutron::
|
||||
|
||||
$ sudo su - stack
|
||||
$ git clone https://opendev.org/openstack/devstack.git
|
||||
$ git clone https://opendev.org/openstack/neutron.git
|
||||
|
||||
Use the compute node sample configuration file to add new node, you
|
||||
can enable some features or extensions like DVR, L2pop in this conf::
|
||||
|
||||
$ cd devstack
|
||||
$ cp ../neutron/devstack/ml2-ovs-compute-local.conf.sample local.conf
|
||||
|
||||
.. note:: The config differences between compute node and network node are whether
|
||||
run the compute services and the L3 agent mode. So this sample local.conf
|
||||
can be used to add new network node.
|
||||
|
||||
You must set SERVICE_HOST in local.conf. The value should be the IP address of
|
||||
the main DevStack host. You must also set HOST_IP to the IP address of this
|
||||
new host. See the text in the sample configuration file for more
|
||||
information. Once that is complete, run DevStack::
|
||||
|
||||
$ ./stack.sh
|
||||
|
||||
This should complete in less time than before, as it's only running a single
|
||||
OpenStack service (nova-compute) along with neutron-openvswitch-agent,
|
||||
neutron-l3-agent, neutron-dhcp-agent and neutron-metadata-agent.
|
||||
The final output will look something like this::
|
||||
|
||||
|
||||
This is your host IP address: 172.16.189.30
|
||||
This is your host IPv6 address: ::1
|
||||
2017-03-09 18:39:27.058 | stack.sh completed in 1149 seconds.
|
||||
|
||||
Now go back to your main DevStack host to verify the install::
|
||||
|
||||
$ . openrc
|
||||
$ openstack network agent list
|
||||
$ openstack compute service list
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
Then we can following the steps at the testing page to do the following works,
|
||||
for reference please read `Testing Neutron\'s related sections <testing.html>`_
|
Loading…
Reference in New Issue
Block a user