Prerequsite
Please prepare four VMs or host machines with the following specification
No | usage | CPU | Memory | Disk |
---|---|---|---|---|
1 | Openstack Controller & Network Node | 4 Core | 8 GB | 100GB |
2 | ONOS Controller | 2 Core | 4 GB | 100GB |
3 | Compute Node | 1 Core | 2 GB | 100GB |
4 | Compute Node | 1 Core | 2 GB | 100GB |
Set up Control node (and network node)
Install devstack on the Openstack Controller node
$ git clone git://github.com/openstack-dev/devstack.git
Creates local.conf file using the following options
[[local|localrc]] HOST_IP=1.1.1.1 SERVICE_HOST=1.1.1.1 RABBIT_HOST=1.1.1.1 DATABASE_HOST=1.1.1.1 Q_HOST=1.1.1.1 ADMIN_PASSWORD=nova DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD DATABASE_TYPE=mysql # Log SCREEN_LOGDIR=/opt/stack/logs/screen # Images IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img,http://jaist.dl.sourceforge.net/project/gns-3/Qemu%20Appliances/linux-tinycore-3.4.img" NOVA_VNC_ENABLED=true VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP VNCSERVER_LISTEN=$HOST_IP NEUTRON_CREATE_INITIAL_NETWORKS=False Q_ML2_PLUGIN_MECHANISM_DRIVERS=onos_ml2 Q_PLUGIN_EXTRA_CONF_PATH=~/networking-onos/etc Q_PLUGIN_EXTRA_CONF_FILES=(conf_onos.ini) # Services enable_service q-svc enable_service q-agt enable_service q-l3 disable_service n-net disable_service n-cpu disable_service tempest disable_service c-sch disable_service c-api disable_service c-vol
* The IP address 1.1.1.1 needs to be changed to your host IP address for Openstack controller. Here control node and network nodes are the same.
* You can choose a different admin password if you want.
* If you installed the onos ml2 plugin in a different place, you need to change the Q_PLUGIN_EXTRA_CONF_PATH properly.Install onos ml2 plugin
$ git clone https://github.com/openstack/networking-onos.git $ cd networking-onos ~/networking-onos$ sudo python setup.py install
If you find the following error, please install python-setuptools using apt-get.
Traceback (most recent call last): File "setup.py", line 17, in <module> import setuptools ImportError: No module named setuptools
$ sudo apt-get install python-setuptools
Configure the onos ml2 plugin by editing the conf_onos.ini file in networking-onos/etc folder, which is just created
#Configuration options for ONOS driver [onos] # (StrOpt) ONOS ReST interface URL. This is a mandatory field. url_path = http://ONOS_HOST_IP:8181/onos/openstackswitching # (StrOpt) Username for authentication. This is a mandatory field. username = onos # (StrOpt) Password for authentication. This is a mandatory field. password = rocks
You need to set the proper IP address for ONOS controller in ONOS_HOST_IP
Set up devstack
~/devstack$ ./stack.sh
It would take quite long up to 1 hour depending on the network status and host performance. If it is setup correctly, you will see the following message.
............. This is your host IP address:1.1.1.1 This is your host IPv6 address: ::1 Horizon is now available at http://1.1.1.1/dashboard Keystone is serving at http://1.1.1.1:5000/ The default users are: admin and demo The password: nova 2015-12-03 05:49:10.116 | stack.sh completed in 264 seconds.
Please check if you can log in to the dashboard with the users.
Set up Compute node
Install Openvswitch
Even though any version higher than 2.0 would work, but we have tested with 2.3.2.
$ wget http://openvswitch.org/releases/openvswitch-2.3.2.tar.gz $ tar xzvf openvswitch-2.3.2.tar.gz $ cd openvswitch-2.3.2/ ~/openvswitch-2.3.2$ ./configure ~/openvswitch-2.3.2$ make ~/openvswitch-2.3.2$ sudo make install ~/openvswitch-2.3.2$ sudo modprobe openvswitch
You can check if openvswitch is loaded properly
~/openvswitch-2.3.2$ sudo lsmod Module Size Used by openvswitch 71004 0 vxlan 37619 1 openvswitch ip_tunnel 23768 1 vxlan gre 13796 1 openvswitch libcrc32c 12644 1 openvswitch
Set up OVS
Please see the following link for detail, but here are the simple way to set up the OVS.
https://github.com/openvswitch/ovs/blob/master/INSTALL.md~/openvswitch-2.3.2$ mkdir -p /usr/local/etc/openvswitch ~/openvswitch-2.3.2$ sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema ~/openvswitch-2.3.2$ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ --private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --pidfile --detach ~/openvswitch-2.3.2$ sudo ovs-vsctl --no-wait init ~/openvswitch-2.3.2$ sudo ovs-vswitchd --pidfile --detach
You can check if it is installed correctly
~/openvswitch-2.3.2$ sudo ovs-vsctl --version ovs-vsctl (Open vSwitch) 2.3.2 Compiled Dec 3 2015 14:49:51 DB Schema 7.6.2
Install devstack on the Compute node
$ git clone git://github.com/openstack-dev/devstack.git
Please use the following local.conf for the compute nodes
[[local|localrc]] HOST_IP=2.2.2.2 SERVICE_HOST=1.1.1.1 RABBIT_HOST=1.1.1.1 DATABASE_HOST=1.1.1.1 Q_HOST=1.1.1.1 ADMIN_PASSWORD=nova DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD DATABASE_TYPE=mysql # Log SCREEN_LOGDIR=/opt/stack/logs/screen LIBVIRT_TYPE=qemu # Services ENABLED_SERVICES=n-cpu,neutron
HOST_IP should be the IP address of the compute node host, and Controller node IP address needs to be set for other settings.
Prerequsite
Please prepare four VMs or host machines with the following specification
No | usage | CPU | Memory | Disk |
---|---|---|---|---|
1 | Openstack Controller & Network Node | 4 Core | 8 GB | 100GB |
2 | ONOS Controller | 2 Core | 4 GB | 100GB |
3 | Compute Node | 1 Core | 2 GB | 100GB |
4 | Compute Node | 1 Core | 2 GB | 100GB |
Set up Control node (and network node)
Install devstack on the Openstack Controller node
$ git clone git://github.com/openstack-dev/devstack.git
Creates local.conf file using the following options
[[local|localrc]] HOST_IP=1.1.1.1 SERVICE_HOST=1.1.1.1 RABBIT_HOST=1.1.1.1 DATABASE_HOST=1.1.1.1 Q_HOST=1.1.1.1 ADMIN_PASSWORD=nova DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=$ADMIN_PASSWORD DATABASE_TYPE=mysql # Log SCREEN_LOGDIR=/opt/stack/logs/screen # Images IMAGE_URLS="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img,http://jaist.dl.sourceforge.net/project/gns-3/Qemu%20Appliances/linux-tinycore-3.4.img" NOVA_VNC_ENABLED=true VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP VNCSERVER_LISTEN=$HOST_IP NEUTRON_CREATE_INITIAL_NETWORKS=False Q_ML2_PLUGIN_MECHANISM_DRIVERS=onos_ml2 Q_PLUGIN_EXTRA_CONF_PATH=~/networking-onos/etc Q_PLUGIN_EXTRA_CONF_FILES=(conf_onos.ini) # Services enable_service q-svc enable_service q-agt enable_service q-l3 disable_service n-net disable_service n-cpu disable_service tempest disable_service c-sch disable_service c-api disable_service c-vol
* The IP address 1.1.1.1 needs to be changed to your host IP address for Openstack controller. Here control node and network nodes are the same.
* You can choose a different admin password if you want.
* If you installed the onos ml2 plugin in a different place, you need to change the Q_PLUGIN_EXTRA_CONF_PATH properly.Install onos ml2 plugin
$ git clone https://github.com/openstack/networking-onos.git $ cd networking-onos ~/networking-onos$ sudo python setup.py install
If you find the following error, please install python-setuptools using apt-get.
Traceback (most recent call last): File "setup.py", line 17, in <module> import setuptools ImportError: No module named setuptools
$ sudo apt-get install python-setuptools
Configure the onos ml2 plugin by editing the conf_onos.ini file in networking-onos/etc folder, which is just created
#Configuration options for ONOS driver [onos] # (StrOpt) ONOS ReST interface URL. This is a mandatory field. url_path = http://ONOS_HOST_IP:8181/onos/openstackswitching # (StrOpt) Username for authentication. This is a mandatory field. username = onos # (StrOpt) Password for authentication. This is a mandatory field. password = rocks
You need to set the proper IP address for ONOS controller in ONOS_HOST_IP
Set up devstack
~/devstack$ ./stack.sh
It would take quite long up to 1 hour depending on the network status and host performance. If it is setup correctly, you will see the following message.
............. This is your host IP address:1.1.1.1 This is your host IPv6 address: ::1 Horizon is now available at http://1.1.1.1/dashboard Keystone is serving at http://1.1.1.1:5000/ The default users are: admin and demo The password: nova 2015-12-03 05:49:10.116 | stack.sh completed in 264 seconds.
Please check if you can log in to the dashboard with the users.
Set up Compute node
Install Openvswitch
Even though any version higher than 2.0 would work, but we have tested with 2.3.2.
$ wget http://openvswitch.org/releases/openvswitch-2.3.2.tar.gz $ tar xzvf openvswitch-2.3.2.tar.gz $ cd openvswitch-2.3.2/ ~/openvswitch-2.3.2$ ./configure ~/openvswitch-2.3.2$ make ~/openvswitch-2.3.2$ sudo make install ~/openvswitch-2.3.2$ sudo modprobe openvswitch
You can check if openvswitch is loaded properly
~/openvswitch-2.3.2$ sudo lsmod Module Size Used by openvswitch 71004 0 vxlan 37619 1 openvswitch ip_tunnel 23768 1 vxlan gre 13796 1 openvswitch libcrc32c 12644 1 openvswitch
Set up OVS
Please see the following link for detail, but here are the simple way to set up the OVS.
https://github.com/openvswitch/ovs/blob/master/INSTALL.md~/openvswitch-2.3.2$ mkdir -p /usr/local/etc/openvswitch ~/openvswitch-2.3.2$ sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema ~/openvswitch-2.3.2$ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ --private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --pidfile --detach ~/openvswitch-2.3.2$ sudo ovs-vsctl --no-wait init ~/openvswitch-2.3.2$ sudo ovs-vswitchd --pidfile --detach
You can check if it is installed correctly
~/openvswitch-2.3.2$ sudo ovs-vsctl --version ovs-vsctl (Open vSwitch) 2.3.2 Compiled Dec 3 2015 14:49:51 DB Schema 7.6.2
- Install devstack on the compute node