...
- Management network: used for ONOS to control virtual switches, and OpenStack to communicate with nova-compute agent running on the compute node
- Data network: used for East-West traffic via VXLAN, GRE or GENEVE tunnel
- External network: used for North-South traffic, normally only gateway nodes have an access to this network
All networks can share a network interface in case your test machine does not have enough interfaces. You can also emulate external router. The figure below shows an example test environment used in the rest of this guide with emulated external router and two network interfaces, one for sharing management and external, and the other for data.
Prerequisite
...
Code Block | ||
---|---|---|
| ||
$ sudo ovs-vsctl show cedbbc0a-f9a4-4d30-a3ff-ef9afa813efb ovs_version: "2.58.02" |
OpenStack Setup
How to deploy OpenStack is out of scope of this documentation. Here, it only describes configurations related to use SONA. All other settings are completely up to your environment.
...
Note |
---|
The guide is based on OpenStack Ocata/Pike version. If you want to install Newton version of OpenStack, please refer to here <TBA>. |
...
Code Block |
---|
/opt/stack$ git clone --branch [stable/ocata or stable/pike] https://github.com/sonaprojectopenstack/networking-onos.git |
Next, please create a file /opt/stack/networking-onos/etc/conf_onos.ini using the following template. Please set the IP_ADDRESS_OF_ONOS to host IP address of ONOS controller.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ git clone -b [stable/ocata or stable/pike] https://git.openstack.org/openstack-dev/devstack |
The following is the example of local.conf. Please set the IP addresses correctly, and the network setting should be set properly as below.(Branches can be modified to stable/queens or stable/rocky for your wish)
Code Block | ||
---|---|---|
| ||
[[local|localrc]] HOST_IP=10.134.231.28 SERVICE_HOST=10.134.231.28 RABBIT_HOST=10.134.231.28 DATABASE_HOST=10.134.231.28 Q_HOST=10.134.231.28 ADMIN_PASSWORD=nova DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD DATABASE_TYPE=mysql # Log USE_SCREEN=True SCREEN_LOGDIR=/opt/stack/logs/screen LOGFILE=/opt/stack/logs/xstack.sh.log LOGDAYS=1 # ImagesForce config drive FORCE_CONFIG_DRIVE=True # Networks Q_ML2_TENANT_NETWORK_TYPE=vxlan Q_ML2_PLUGIN_MECHANISM_DRIVERS=onos_ml2 Q_ML2_PLUGIN_TYPE_DRIVERS=flat,vlan,vxlan ML2_L3_PLUGIN=onos_router NEUTRON_CREATE_INITIAL_NETWORKS=False enable_plugin networking-onos https://github.com/sonaprojectopenstack/networking-onos.git stable/ocatapike ONOS_MODE=controller_only # Services ENABLED_SERVICES=key,nova,n-api,n-cond,n-sch,n-novnc,n-cauth,placement-api,g-api,g-reg,q-svc,horizon,rabbit,mysql # Branches GLANCE_BRANCH=stable/ocatapike HORIZON_BRANCH=stable/ocatapike KEYSTONE_BRANCH=stable/ocatapike NEUTRON_BRANCH=stable/ocatapike NOVA_BRANCH=stable/ocatapike |
If you use other deployment tool or build OpenStack manually, refer to the following Nova and Neutron configurations.
...
Code Block | ||
---|---|---|
| ||
[ml2]
tenant_network_types = vxlan
type_drivers = flat,vlan,vxlan
mechanism_drivers = onos_ml2
[ml2_type_flat]
flat_networks = public1, public2 #Whatever physical networks you want to create
[securitygroup]
enable_security_group = True |
...
Code Block | ||
---|---|---|
| ||
[[local|localrc]] HOST_IP=10.134.231.30 SERVICE_HOST=10.134.231.28 RABBIT_HOST=10.134.231.28 DATABASE_HOST=10.134.231.28 ADMIN_PASSWORD=nova DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD DATABASE_TYPE=mysql NOVA_VNC_ENABLED=True VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP VNCSERVER_LISTEN=$HOST_IP # Force config drive LIBVIRT_TYPE=kvmFORCE_CONFIG_DRIVE=True LIBVIRT_TYPE=kvm # should be qemu if your compute node is a vm # Log USE_SCREEN=True SCREEN_LOGDIR=/opt/stack/logs/screen LOGFILE=/opt/stack/logs/xstack.sh.log LOGDAYS=1 # Services ENABLED_SERVICES=n-cpu,placement-client,neutron enable_plugin networking-onos https://github.com/sonaprojectopenstack/networking-onos.git stable/ocatapike ONOS_MODE=compute # Branches NOVA_BRANCH=stable/ocatapike KEYSTONE_BRANCH=stable/ocatapike NEUTRON_BRANCH=stable/ocatapike |
Note |
---|
If your compute node is a VM, try http://docs.openstack.org/developer/devstack/guides/devstack-with-nested-kvm.html this first or set |
...
3. Check all nodes are registered and all COMPUTE type node's states are COMPLETE with openstack-nodes command. Use openstack-node-check command for more detailed states if the state is INCOMPLETE. If you want to reinitialize only a particular compute node, use openstack-node-init command with hostname. For If you have no physical peer switch, for GATEWAY type node, leave it in the state of the node would be DEVICE_CREATED state. You'll need additional configurations explained later for gateway nodes.
Code Block |
---|
onos> openstack-nodes Hostname Type Integration Bridge Router Bridge Management IP Data IP VLAN Intf State sona-compute-01 COMPUTE of:00000000000000a1 10.1.1.162 10.1.1.162 COMPLETE sona-compute-02 COMPUTE of:00000000000000a2 10.1.1.163 10.1.1.163 COMPLETE sona-gateway-02 GATEWAY of:00000000000000a4 of:00000000000000b4 10.1.1.165 10.1.1.165 DEVICE_CREATEDCOMPLETE Total 3 nodes |
Switch Setup
...
Code Block |
---|
$ sudo ovs-vsctl show
427d7ee0-218f-4d68-b503-a5639a367357
Manager "ptcp:6640"
Bridge br-int
Controller "tcp:10.1.1.30:6653"
is_connected: true
fail_mode: secure
Port br-int
Interface br-int
Port vxlan
Interface vxlan
type: vxlan
options: {key=flow, remote_ip=flow}
Port router
Interface router
ovs_version: "2.5.2" |
3. Download sona-setup scripts as well.
Code Block | ||
---|---|---|
| ||
$ git clone -b 1.13 https://github.com/sonaproject/sona-setup.git
$ cd sona-setup |
...